diff --git a/.github/.test/samples.json b/.github/.test/samples.json index 7c1fa1e233..4683eb0198 100644 --- a/.github/.test/samples.json +++ b/.github/.test/samples.json @@ -151,6 +151,12 @@ "Client: Dart" ] }, + { + "input": "dart-dio-petstore.sh", + "matches": [ + "Client: Dart" + ] + }, { "input": "dart-petstore.sh", "matches": [ diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9925a83fba..8a0f48657b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,10 @@ + + + ### PR checklist - [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md). -- [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh`, `./bin/openapi3/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`. If contributing template-only or documentation-only changes which will change sample output, be sure to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) first. -- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.1.x`, `5.0.x`. Default: `master`. -- [ ] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language. - -### Description of the PR - -(details of the change, additional tests that have been done, reference to the issue for tracking, etc) - +- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) before . +- [ ] Run the shell script(s) under `./bin/` (or Windows batch scripts under`.\bin\windows`) to update Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run `./bin/{LANG}-petstore.sh`, `./bin/openapi3/{LANG}-petstore.sh` if updating the code or mustache templates for a language (`{LANG}`) (e.g. php, ruby, python, etc). +- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.1.x`, `5.0.x`. Default: `master`. +- [ ] Copy the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language. diff --git a/.gitignore b/.gitignore index 18d2a7a102..f73850f56b 100644 --- a/.gitignore +++ b/.gitignore @@ -188,6 +188,7 @@ samples/openapi3/client/petstore/kotlin/build samples/server/petstore/kotlin-server/ktor/build samples/server/petstore/kotlin-springboot/build samples/client/petstore/kotlin-multiplatform/build/ +samples/client/petstore/kotlin-okhttp3/build/ \? # haskell diff --git a/.travis.yml b/.travis.yml index 8f0ffe389d..50ec571010 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,11 +97,12 @@ before_install: # install valgrind for C++ memory test - sudo apt-get install valgrind # install Qt 5.10 - - sudo add-apt-repository --yes ppa:beineri/opt-qt-5.10.1-trusty - - sudo apt-get update -qq - - sudo apt-get install qt510-meta-minimal - - source /opt/qt510/bin/qt510-env.sh - - qmake -v + # comment out the following due to failure in downloading http://ppa.launchpad.net/beineri/opt-qt-5.10.1-trusty/ubuntu/dists/xenial/main/binary-amd64/Packages + #- sudo add-apt-repository --yes ppa:beineri/opt-qt-5.10.1-trusty + #- sudo apt-get update -qq + #- sudo apt-get install qt510-meta-minimal + #- source /opt/qt510/bin/qt510-env.sh + #- qmake -v # show host table to confirm petstore.swagger.io is mapped to localhost - cat /etc/hosts diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index 83d26c3eea..5ec1731396 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -21,6 +21,9 @@ elif [ "$NODE_INDEX" = "2" ]; then echo "Running node $NODE_INDEX to test ensure-up-to-date" java -version + # install elm-format + npm install -g elm-format + ./bin/utils/ensure-up-to-date fi #elif [ "$NODE_INDEX" = "3" ]; then diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 657560a745..baea26419b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -85,7 +85,7 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen) To test the templates, please perform the following: -- Update the Petstore sample by running the shell scripts under `bin` and `bin/openapi3` folder. For example, run `./bin/python-client-petstore.sh` and `./bin/openapi3/python-client-petstore.sh` to update the Python PetStore API client under [`samples/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/python) and [`samples/openapi3/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/openapi3/client/petstore/python). For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion) +- Update the Petstore sample by running the shell scripts under `bin` and `bin/openapi3` folder. For example, run `./bin/python-petstore.sh` and `./bin/openapi3/python-petstore.sh` to update the Python PetStore API client under [`samples/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/python) and [`samples/openapi3/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/openapi3/client/petstore/python). For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion) - Run the tests in the sample folder using maven `mvn integration-test -rf :`, e.g. open a shell in `samples/client/petstore/python`, run `mvn integration-test -rf :PythonPetstoreClientTests`. The artifactId of the project can be found in the pom.xml file. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests) - Finally, git commit the updated samples files: `git commit -a` (`git add -A` if added files with new test cases) diff --git a/README.md b/README.md index 9779829546..9ead17a9b6 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,12 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.1.3-SNAPSHOT`): [![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) (`4.2.0-SNAPSHOT`): [![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) [![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/master)](https://cloud.drone.io/OpenAPITools/openapi-generator) -[`4.2.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.2.x) branch: [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/4.2.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) -[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/4.2.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) -[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=4.2.x)](https://app.shippable.com/github/OpenAPITools/openapi-generator) -[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=4.2.x&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu) -[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/4.2.x)](https://cloud.drone.io/OpenAPITools/openapi-generator) - [`5.0.x`](https://github.com/OpenAPITools/openapi-generator/tree/5.0.x) branch: [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/5.0.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/5.0.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=5.0.x)](https://app.shippable.com/github/OpenAPITools/openapi-generator) @@ -108,8 +102,7 @@ OpenAPI Generator Version | Release Date | Notes ---------------------------- | ------------ | ----- 5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback) 4.2.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.2.0-SNAPSHOT/)| 09.10.2019 | Minor release (breaking changes with fallbacks) -4.1.3 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.3-SNAPSHOT/)| 30.09.2019 | Patch release (bug fixes, enhancements) -[4.1.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.1.2) (latest stable release) | 12.09.2019 | Patch release (bug fixes, enhancements) +[4.1.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.1.3) (latest stable release) | 04.10.2019 | Patch release (bug fixes, enhancements) OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 @@ -552,9 +545,11 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Angular.Schule](https://angular.schule/) - [ASKUL](https://www.askul.co.jp) - [b<>com](https://b-com.com/en) +- [Banzai Cloud](https://banzaicloud.com) - [BIMData.io](https://bimdata.io) - [Bithost GmbH](https://www.bithost.ch) - [Boxever](https://www.boxever.com/) +- [California State University, Northridge](https://www.csun.edu) - [CAM](https://www.cam-inc.co.jp/) - [Camptocamp](https://www.camptocamp.com/en) - [codecentric AG](https://www.codecentric.de/) @@ -648,6 +643,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-09-22 - [RESTful APIs: Tutorial of OpenAPI Specification](https://medium.com/@amirm.lavasani/restful-apis-tutorial-of-openapi-specification-eeada0e3901d) by [Amir Lavasani](https://medium.com/@amirm.lavasani) - 2019-09-22 - [Redefining SDKs as software diversity kits](https://devrel.net/dev-rel/redefining-sdks-as-software-diversity-kits) by [Sid Maestre (Xero)](https://twitter.com/sidneyallen) at [DevRelCon San Francisco 2019](https://sf2019.devrel.net/) - 2019-09-23 - [swaggerからOpenApi GeneratorでSpringのコードを自動生成](https://qiita.com/littleFeet/items/492df2ad68a0799a5e5e) by [@littleFeet](https://qiita.com/littleFeet) at [Qiita](https://qiita.com/) +- 2019-10-09 - [openapi-generator で生成した Go クライアントで Bearer 認証をする](https://autopp-tech.hatenablog.com/entry/2019/10/09/222039) by [Akira Tanimura](https://github.com/autopp) +- 2019-10-12 - [OpenApi自动生成client](https://blog.csdn.net/wxid2798226/article/details/102527467) by [郑泽洲](https://me.csdn.net/wxid2798226) ## [6 - About Us](#table-of-contents) @@ -685,6 +682,7 @@ Here is a list of template creators: * Dart (refactor): @joernahrens * Dart 2: @swipesight * Dart (Jaguar): @jaumard + * Dart (Dio): @athornz * Elixir: @niku * Elm: @eriktim * Eiffel: @jvelilla diff --git a/bin/ci/apex-petstore.json b/bin/ci/apex-petstore.json new file mode 100644 index 0000000000..73773132df --- /dev/null +++ b/bin/ci/apex-petstore.json @@ -0,0 +1,6 @@ +{ + "generatorName": "apex", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/apex", + "templateDir": "modules/openapi-generator/src/main/resources/apex" +} \ No newline at end of file diff --git a/bin/ci/csharp-netcore-petstore-1.json b/bin/ci/csharp-netcore-petstore-1.json new file mode 100644 index 0000000000..c2e1797c85 --- /dev/null +++ b/bin/ci/csharp-netcore-petstore-1.json @@ -0,0 +1,11 @@ +{ + "generatorName": "csharp-netcore", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/csharp-netcore/OpenAPIClientCore", + "templateDir": "modules/openapi-generator/src/main/resources/csharp-netcore/", + "additionalProperties": { + "packageGuid": "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}", + "useCompareNetObjects": true, + "targetFramework": "netcoreapp2.0" + } +} \ No newline at end of file diff --git a/bin/ci/csharp-netcore-petstore.json b/bin/ci/csharp-netcore-petstore.json new file mode 100644 index 0000000000..506d74d1ab --- /dev/null +++ b/bin/ci/csharp-netcore-petstore.json @@ -0,0 +1,10 @@ +{ + "generatorName": "csharp-netcore", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/csharp-netcore/OpenAPIClient", + "templateDir": "modules/openapi-generator/src/main/resources/csharp-netcore/", + "additionalProperties": { + "packageGuid": "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}", + "useCompareNetObjects": true + } +} \ No newline at end of file diff --git a/bin/ci/csharp-petstore.json b/bin/ci/csharp-petstore.json new file mode 100644 index 0000000000..fe5a9104e1 --- /dev/null +++ b/bin/ci/csharp-petstore.json @@ -0,0 +1,8 @@ +{ + "generatorName": "csharp", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/csharp/OpenAPIClient", + "additionalProperties": { + "packageGuid": "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}" + } +} \ No newline at end of file diff --git a/bin/ci/dart-flutter-petstore.json b/bin/ci/dart-flutter-petstore.json new file mode 100644 index 0000000000..81213f1c10 --- /dev/null +++ b/bin/ci/dart-flutter-petstore.json @@ -0,0 +1,11 @@ +{ + "generatorName": "dart", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/dart/flutter_petstore/openapi", + "templateDir": "modules/openapi-generator/src/main/resources/dart", + "additionalProperties": { + "hideGenerationTimestamp": true, + "browserClient": false, + "supportDart2": false + } +} \ No newline at end of file diff --git a/bin/ci/dart-jaguar-petstore-1.json b/bin/ci/dart-jaguar-petstore-1.json new file mode 100644 index 0000000000..2226b49c6f --- /dev/null +++ b/bin/ci/dart-jaguar-petstore-1.json @@ -0,0 +1,10 @@ +{ + "generatorName": "dart-jaguar", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/dart-jaguar/flutter_petstore/openapi", + "templateDir": "modules/openapi-generator/src/main/resources/dart-jaguar", + "additionalProperties": { + "hideGenerationTimestamp": true, + "pubName": "openapi" + } +} \ No newline at end of file diff --git a/bin/ci/dart-jaguar-petstore-2.json b/bin/ci/dart-jaguar-petstore-2.json new file mode 100644 index 0000000000..2eed934b1c --- /dev/null +++ b/bin/ci/dart-jaguar-petstore-2.json @@ -0,0 +1,11 @@ +{ + "generatorName": "dart-jaguar", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml", + "outputDir": "samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi", + "templateDir": "modules/openapi-generator/src/main/resources/dart-jaguar", + "additionalProperties": { + "serialization": "proto", + "hideGenerationTimestamp": true, + "pubName": "openapi" + } +} \ No newline at end of file diff --git a/bin/ci/dart-jaguar-petstore-3.json b/bin/ci/dart-jaguar-petstore-3.json new file mode 100644 index 0000000000..d41ef5d40c --- /dev/null +++ b/bin/ci/dart-jaguar-petstore-3.json @@ -0,0 +1,11 @@ +{ + "generatorName": "dart-jaguar", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml", + "outputDir": "samples/client/petstore/dart-jaguar/openapi_proto", + "templateDir": "modules/openapi-generator/src/main/resources/dart-jaguar", + "additionalProperties": { + "serialization": "proto", + "hideGenerationTimestamp": true, + "pubName": "openapi" + } +} \ No newline at end of file diff --git a/bin/ci/dart-jaguar-petstore.json b/bin/ci/dart-jaguar-petstore.json new file mode 100644 index 0000000000..761296fa28 --- /dev/null +++ b/bin/ci/dart-jaguar-petstore.json @@ -0,0 +1,10 @@ +{ + "generatorName": "dart-jaguar", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/dart-jaguar/openapi", + "templateDir": "modules/openapi-generator/src/main/resources/dart-jaguar", + "additionalProperties": { + "hideGenerationTimestamp": true, + "pubName": "openapi" + } +} \ No newline at end of file diff --git a/bin/ci/dart-petstore-flutter.json b/bin/ci/dart-petstore-flutter.json new file mode 100644 index 0000000000..81213f1c10 --- /dev/null +++ b/bin/ci/dart-petstore-flutter.json @@ -0,0 +1,11 @@ +{ + "generatorName": "dart", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/dart/flutter_petstore/openapi", + "templateDir": "modules/openapi-generator/src/main/resources/dart", + "additionalProperties": { + "hideGenerationTimestamp": true, + "browserClient": false, + "supportDart2": false + } +} \ No newline at end of file diff --git a/bin/ci/dart-petstore-openapi-browser-client.json b/bin/ci/dart-petstore-openapi-browser-client.json new file mode 100644 index 0000000000..c26293f2f4 --- /dev/null +++ b/bin/ci/dart-petstore-openapi-browser-client.json @@ -0,0 +1,11 @@ +{ + "generatorName": "dart", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/dart/openapi-browser-client", + "templateDir": "modules/openapi-generator/src/main/resources/dart", + "additionalProperties": { + "hideGenerationTimestamp": true, + "browserClient": true, + "supportDart2": false + } +} \ No newline at end of file diff --git a/bin/ci/dart-petstore.json b/bin/ci/dart-petstore.json new file mode 100644 index 0000000000..3f3691a82e --- /dev/null +++ b/bin/ci/dart-petstore.json @@ -0,0 +1,11 @@ +{ + "generatorName": "dart", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/dart/openapi", + "templateDir": "modules/openapi-generator/src/main/resources/dart", + "additionalProperties": { + "hideGenerationTimestamp": true, + "browserClient": false, + "supportDart2": false + } +} \ No newline at end of file diff --git a/bin/ci/dart2-petstore.json b/bin/ci/dart2-petstore.json new file mode 100644 index 0000000000..c12549e213 --- /dev/null +++ b/bin/ci/dart2-petstore.json @@ -0,0 +1,9 @@ +{ + "generatorName": "dart", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/dart2/openapi", + "templateDir": "modules/openapi-generator/src/main/resources/dart2", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/elixir-petstore.json b/bin/ci/elixir-petstore.json new file mode 100644 index 0000000000..e8ce9b6b11 --- /dev/null +++ b/bin/ci/elixir-petstore.json @@ -0,0 +1,9 @@ +{ + "generatorName": "elixir", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/elixir/", + "templateDir": "modules/openapi-generator/src/main/resources/elixir", + "additionalProperties": { + "invokerPackage": "OpenapiPetstore" + } +} \ No newline at end of file diff --git a/bin/ci/go-gin-petstore-server.json b/bin/ci/go-gin-petstore-server.json new file mode 100644 index 0000000000..9e55159bbc --- /dev/null +++ b/bin/ci/go-gin-petstore-server.json @@ -0,0 +1,10 @@ +{ + "generatorName": "go-gin-server", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/go-gin-api-server", + "templateDir": "modules/openapi-generator/src/main/resources/go-gin-server", + "additionalProperties": { + "packageName": "petstoreserver", + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/go-petstore-withxml.json b/bin/ci/go-petstore-withxml.json new file mode 100644 index 0000000000..6fdc619534 --- /dev/null +++ b/bin/ci/go-petstore-withxml.json @@ -0,0 +1,11 @@ +{ + "generatorName": "go", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/go/go-petstore-withXml", + "templateDir": "modules/openapi-generator/src/main/resources/go", + "additionalProperties": { + "packageName": "petstore", + "withXml": true, + "withGoCodegenComment": true + } +} \ No newline at end of file diff --git a/bin/ci/go-petstore.json b/bin/ci/go-petstore.json new file mode 100644 index 0000000000..ed3ae37ab2 --- /dev/null +++ b/bin/ci/go-petstore.json @@ -0,0 +1,9 @@ +{ + "generatorName": "go", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/go/go-petstore", + "templateDir": "modules/openapi-generator/src/main/resources/go", + "additionalProperties": { + "packageName": "petstore" + } +} \ No newline at end of file diff --git a/bin/ci/groovy-petstore.json b/bin/ci/groovy-petstore.json new file mode 100644 index 0000000000..6ed0f5f8c9 --- /dev/null +++ b/bin/ci/groovy-petstore.json @@ -0,0 +1,9 @@ +{ + "generatorName": "groovy", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/groovy", + "templateDir": "modules/openapi-generator/src/main/resources/Groovy/", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/haskell-http-client-petstore.json b/bin/ci/haskell-http-client-petstore.json new file mode 100644 index 0000000000..49b28a41e5 --- /dev/null +++ b/bin/ci/haskell-http-client-petstore.json @@ -0,0 +1,6 @@ +{ + "generatorName": "haskell-http-client", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/haskell-http-client", + "templateDir": "modules/openapi-generator/src/main/resources/haskell-http-client" +} \ No newline at end of file diff --git a/bin/ci/java-feign.json b/bin/ci/java-feign.json new file mode 100644 index 0000000000..9bbda443d0 --- /dev/null +++ b/bin/ci/java-feign.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/java-petstore-feign-9x.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/feign", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/feign", + "additionalProperties": { + "hideGenerationTimestamp": true, + "booleanGetterPrefix": "is" + } +} \ No newline at end of file diff --git a/bin/ci/java-feign10x.json b/bin/ci/java-feign10x.json new file mode 100644 index 0000000000..77262b0621 --- /dev/null +++ b/bin/ci/java-feign10x.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/java-petstore-feign-10x.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/feign10x", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/feign", + "additionalProperties": { + "hideGenerationTimestamp": true, + "booleanGetterPrefix": "is" + } +} \ No newline at end of file diff --git a/bin/ci/java-google-api-client.json b/bin/ci/java-google-api-client.json new file mode 100644 index 0000000000..1a447f387f --- /dev/null +++ b/bin/ci/java-google-api-client.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/java-petstore-google-api-client.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/google-api-client", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/google-api-client", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-cxf-annotated-base-path.json b/bin/ci/java-jaxrs-cxf-annotated-base-path.json new file mode 100644 index 0000000000..5c914be89c --- /dev/null +++ b/bin/ci/java-jaxrs-cxf-annotated-base-path.json @@ -0,0 +1,12 @@ +{ + "artifactId": "cxf-annotated-basepath", + "generatorName": "jaxrs-cxf", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/jaxrs-cxf-annotated-base-path", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/cxf", + "additionalProperties": { + "hideGenerationTimestamp": true, + "useAnnotatedBasePath": true, + "serverPort": "8082" + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-cxf-cdi.json b/bin/ci/java-jaxrs-cxf-cdi.json new file mode 100644 index 0000000000..2ce07d2215 --- /dev/null +++ b/bin/ci/java-jaxrs-cxf-cdi.json @@ -0,0 +1,9 @@ +{ + "generatorName": "jaxrs-cxf-cdi", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/jaxrs-cxf-cdi", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-cxf-non-spring-app.json b/bin/ci/java-jaxrs-cxf-non-spring-app.json new file mode 100644 index 0000000000..d7864551b2 --- /dev/null +++ b/bin/ci/java-jaxrs-cxf-non-spring-app.json @@ -0,0 +1,12 @@ +{ + "artifactId": "cxf-server-non-spring", + "generatorName": "jaxrs-cxf", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/jaxrs-cxf-non-spring-app", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/cxf", + "additionalProperties": { + "hideGenerationTimestamp": true, + "generateNonSpringApplication": true, + "serverPort": "8082" + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-cxf.json b/bin/ci/java-jaxrs-cxf.json new file mode 100644 index 0000000000..3d80df7a58 --- /dev/null +++ b/bin/ci/java-jaxrs-cxf.json @@ -0,0 +1,10 @@ +{ + "generatorName": "jaxrs-cxf", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/jaxrs-cxf", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/cxf", + "additionalProperties": { + "hideGenerationTimestamp": true, + "serverPort": "8082" + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-datelib-j8.json b/bin/ci/java-jaxrs-datelib-j8.json new file mode 100644 index 0000000000..89e9b9c7fe --- /dev/null +++ b/bin/ci/java-jaxrs-datelib-j8.json @@ -0,0 +1,11 @@ +{ + "!include": "./bin/jaxrs-datelib-j8.json", + "generatorName": "jaxrs-jersey", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/jaxrs-datelib-j8/", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/", + "additionalProperties": { + "hideGenerationTimestamp": true, + "serverPort": "8082" + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-jersey.json b/bin/ci/java-jaxrs-jersey.json new file mode 100644 index 0000000000..5065fb2c38 --- /dev/null +++ b/bin/ci/java-jaxrs-jersey.json @@ -0,0 +1,10 @@ +{ + "artifactId": "openapiv3-jaxrs-jersey-petstore-server", + "generatorName": "jaxrs-jersey", + "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/jaxrs-jersey", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-jersey1-useTags.json b/bin/ci/java-jaxrs-jersey1-useTags.json new file mode 100644 index 0000000000..2b1696d092 --- /dev/null +++ b/bin/ci/java-jaxrs-jersey1-useTags.json @@ -0,0 +1,13 @@ +{ + "artifactId": "jaxrs-jersey1-useTags", + "generatorName": "jaxrs-jersey", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "library": "jersey1", + "outputDir": "samples/server/petstore/jaxrs/jersey1-useTags", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS", + "additionalProperties": { + "hideGenerationTimestamp": true, + "serverPort": "8082", + "useTags": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-jersey1.json b/bin/ci/java-jaxrs-jersey1.json new file mode 100644 index 0000000000..a2dde704e7 --- /dev/null +++ b/bin/ci/java-jaxrs-jersey1.json @@ -0,0 +1,12 @@ +{ + "artifactId": "jaxrs-jersey1-server", + "generatorName": "jaxrs-jersey", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "library": "jersey1", + "outputDir": "samples/server/petstore/jaxrs/jersey1", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS", + "additionalProperties": { + "hideGenerationTimestamp": true, + "serverPort": "8082" + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-jersey2-useTags.json b/bin/ci/java-jaxrs-jersey2-useTags.json new file mode 100644 index 0000000000..6c8aa420d3 --- /dev/null +++ b/bin/ci/java-jaxrs-jersey2-useTags.json @@ -0,0 +1,12 @@ +{ + "artifactId": "jaxrs-jersey2-useTags", + "generatorName": "jaxrs-jersey", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/jaxrs/jersey2-useTags", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS", + "additionalProperties": { + "hideGenerationTimestamp": true, + "serverPort": "8082", + "useTags": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-jersey2.json b/bin/ci/java-jaxrs-jersey2.json new file mode 100644 index 0000000000..7c88d46e05 --- /dev/null +++ b/bin/ci/java-jaxrs-jersey2.json @@ -0,0 +1,11 @@ +{ + "artifactId": "jaxrs-jersey-petstore-server", + "generatorName": "jaxrs-jersey", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/jaxrs/jersey2", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS", + "additionalProperties": { + "hideGenerationTimestamp": true, + "serverPort": "8082" + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-resteasy-eap-java8-server.json b/bin/ci/java-jaxrs-resteasy-eap-java8-server.json new file mode 100644 index 0000000000..d16a63b474 --- /dev/null +++ b/bin/ci/java-jaxrs-resteasy-eap-java8-server.json @@ -0,0 +1,11 @@ +{ + "!include": "./bin/jaxrs-resteasy-eap-java8-petstore-server.json", + "artifactId": "jaxrs-resteasy-eap-java8-server", + "generatorName": "jaxrs-resteasy-eap", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/jaxrs-resteasy/eap-java8", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-resteasy-eap-joda-server.json b/bin/ci/java-jaxrs-resteasy-eap-joda-server.json new file mode 100644 index 0000000000..d974ed72f8 --- /dev/null +++ b/bin/ci/java-jaxrs-resteasy-eap-joda-server.json @@ -0,0 +1,11 @@ +{ + "!include": "./bin/jaxrs-resteasy-eap-joda-petstore-server.json", + "artifactId": "jaxrs-resteasy-eap-joda-server", + "generatorName": "jaxrs-resteasy-eap", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/jaxrs-resteasy/eap-joda", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-resteasy-eap.json b/bin/ci/java-jaxrs-resteasy-eap.json new file mode 100644 index 0000000000..2ce98a184c --- /dev/null +++ b/bin/ci/java-jaxrs-resteasy-eap.json @@ -0,0 +1,9 @@ +{ + "generatorName": "jaxrs-resteasy-eap", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/jaxrs-resteasy/eap", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-resteasy-joda-server.json b/bin/ci/java-jaxrs-resteasy-joda-server.json new file mode 100644 index 0000000000..ea2484571f --- /dev/null +++ b/bin/ci/java-jaxrs-resteasy-joda-server.json @@ -0,0 +1,11 @@ +{ + "!include": "./bin/jaxrs-resteasy-joda-petstore-server.json", + "artifactId": "jaxrs-resteasy-joda-server", + "generatorName": "jaxrs-resteasy", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/jaxrs-resteasy/joda", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-resteasy.json b/bin/ci/java-jaxrs-resteasy.json new file mode 100644 index 0000000000..baf1a65e86 --- /dev/null +++ b/bin/ci/java-jaxrs-resteasy.json @@ -0,0 +1,9 @@ +{ + "generatorName": "jaxrs-resteasy", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/jaxrs-resteasy/default", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-spec-interface.json b/bin/ci/java-jaxrs-spec-interface.json new file mode 100644 index 0000000000..e588bfbacb --- /dev/null +++ b/bin/ci/java-jaxrs-spec-interface.json @@ -0,0 +1,11 @@ +{ + "artifactId": "jaxrs-spec-interface-petstore-server", + "generatorName": "jaxrs-spec", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/jaxrs-spec-interface", + "additionalProperties": { + "hideGenerationTimestamp": true, + "serializableModel": true, + "interfaceOnly": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-spec.json b/bin/ci/java-jaxrs-spec.json new file mode 100644 index 0000000000..b4ba832193 --- /dev/null +++ b/bin/ci/java-jaxrs-spec.json @@ -0,0 +1,10 @@ +{ + "artifactId": "jaxrs-spec-petstore-server", + "generatorName": "jaxrs-spec", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/jaxrs-spec", + "additionalProperties": { + "hideGenerationTimestamp": true, + "serializableModel": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jersey1.json b/bin/ci/java-jersey1.json new file mode 100644 index 0000000000..2982da52b3 --- /dev/null +++ b/bin/ci/java-jersey1.json @@ -0,0 +1,11 @@ +{ + "artifactId": "petstore-java-client-jersey1", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "library": "jersey1", + "outputDir": "samples/client/petstore/java/jersey1", + "templateDir": "modules/openapi-generator/src/main/resources/Java", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-jersey2-java6.json b/bin/ci/java-jersey2-java6.json new file mode 100644 index 0000000000..1420161ffb --- /dev/null +++ b/bin/ci/java-jersey2-java6.json @@ -0,0 +1,12 @@ +{ + "!include": "bin/java-petstore-jersey2.json", + "artifactId": "petstore-jersey2-java6", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/jersey2-java6", + "additionalProperties": { + "hideGenerationTimestamp": true, + "supportJava6": true, + "booleanGetterPrefix": "is" + } +} \ No newline at end of file diff --git a/bin/ci/java-jersey2-java8.json b/bin/ci/java-jersey2-java8.json new file mode 100644 index 0000000000..c1843fb879 --- /dev/null +++ b/bin/ci/java-jersey2-java8.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/java8-petstore-jersey2.json", + "artifactId": "petstore-jersey2-java8", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/jersey2-java8", + "additionalProperties": { + "hideGenerationTimestamp": true, + "serverPort": "8082" + } +} \ No newline at end of file diff --git a/bin/ci/java-jersey2.json b/bin/ci/java-jersey2.json new file mode 100644 index 0000000000..e0ad2e3c28 --- /dev/null +++ b/bin/ci/java-jersey2.json @@ -0,0 +1,9 @@ +{ + "!include": "bin/java-petstore-jersey2.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/jersey2", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-msf4j-petstore-server.json b/bin/ci/java-msf4j-petstore-server.json new file mode 100644 index 0000000000..0389c62a24 --- /dev/null +++ b/bin/ci/java-msf4j-petstore-server.json @@ -0,0 +1,10 @@ +{ + "generatorName": "java-msf4j", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/java-msf4j/", + "templateDir": "modules/openapi-generator/src/main/resources/java-msf4j-server", + "additionalProperties": { + "hideGenerationTimestamp": true, + "artifactId": "java-msf4j-server" + } +} \ No newline at end of file diff --git a/bin/ci/java-native.json b/bin/ci/java-native.json new file mode 100644 index 0000000000..99506422cf --- /dev/null +++ b/bin/ci/java-native.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/java-petstore-native.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/native", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/native", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-okhttp-gson-parcelableModel.json b/bin/ci/java-okhttp-gson-parcelableModel.json new file mode 100644 index 0000000000..31b5cd136e --- /dev/null +++ b/bin/ci/java-okhttp-gson-parcelableModel.json @@ -0,0 +1,12 @@ +{ + "!include": "bin/java-petstore-okhttp-gson.json", + "artifactId": "petstore-okhttp-gson-parcelableModel", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/okhttp-gson-parcelableModel", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson", + "additionalProperties": { + "hideGenerationTimestamp": true, + "parcelableModel": true + } +} \ No newline at end of file diff --git a/bin/ci/java-okhttp-gson.json b/bin/ci/java-okhttp-gson.json new file mode 100644 index 0000000000..78ca97e598 --- /dev/null +++ b/bin/ci/java-okhttp-gson.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/java-petstore-okhttp-gson.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/okhttp-gson", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-petstore-feign-10x.json b/bin/ci/java-petstore-feign-10x.json new file mode 100644 index 0000000000..186e64fc9e --- /dev/null +++ b/bin/ci/java-petstore-feign-10x.json @@ -0,0 +1,11 @@ +{ + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/feign", + "outputDir": "samples/client/petstore/java/feign10x", + "additionalProperties": { + "hideGenerationTimestamp": true, + "booleanGetterPrefix": "is" + }, + "!include": "bin/java-petstore-feign-10x.json" +} \ No newline at end of file diff --git a/bin/ci/java-play-framework-api-package-override.json b/bin/ci/java-play-framework-api-package-override.json new file mode 100644 index 0000000000..6570af2c8b --- /dev/null +++ b/bin/ci/java-play-framework-api-package-override.json @@ -0,0 +1,10 @@ +{ + "generatorName": "java-play-framework", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/java-play-framework-api-package-override", + "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", + "additionalProperties": { + "hideGenerationTimestamp": true, + "apiPackage": "com.puppies.store.apis" + } +} \ No newline at end of file diff --git a/bin/ci/java-play-framework-async.json b/bin/ci/java-play-framework-async.json new file mode 100644 index 0000000000..0b8a369707 --- /dev/null +++ b/bin/ci/java-play-framework-async.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/java-play-framework-petstore-server-async.json", + "generatorName": "java-play-framework", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/java-play-framework-async", + "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-play-framework-controller-only.json b/bin/ci/java-play-framework-controller-only.json new file mode 100644 index 0000000000..4cb2c55db2 --- /dev/null +++ b/bin/ci/java-play-framework-controller-only.json @@ -0,0 +1,10 @@ +{ + "generatorName": "java-play-framework", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/java-play-framework-controller-only", + "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", + "additionalProperties": { + "hideGenerationTimestamp": true, + "controllerOnly": true + } +} \ No newline at end of file diff --git a/bin/ci/java-play-framework-fake-endpoints.json b/bin/ci/java-play-framework-fake-endpoints.json new file mode 100644 index 0000000000..abcf09793b --- /dev/null +++ b/bin/ci/java-play-framework-fake-endpoints.json @@ -0,0 +1,9 @@ +{ + "generatorName": "java-play-framework", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/java-play-framework-fake-endpoints", + "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-play-framework-no-bean-validation.json b/bin/ci/java-play-framework-no-bean-validation.json new file mode 100644 index 0000000000..d0065ff626 --- /dev/null +++ b/bin/ci/java-play-framework-no-bean-validation.json @@ -0,0 +1,10 @@ +{ + "generatorName": "java-play-framework", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/java-play-framework-no-bean-validation", + "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", + "additionalProperties": { + "hideGenerationTimestamp": true, + "useBeanValidation": false + } +} \ No newline at end of file diff --git a/bin/ci/java-play-framework-no-exception-handling.json b/bin/ci/java-play-framework-no-exception-handling.json new file mode 100644 index 0000000000..5eb8619432 --- /dev/null +++ b/bin/ci/java-play-framework-no-exception-handling.json @@ -0,0 +1,10 @@ +{ + "generatorName": "java-play-framework", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/java-play-framework-no-exception-handling", + "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", + "additionalProperties": { + "hideGenerationTimestamp": true, + "handleExceptions": false + } +} \ No newline at end of file diff --git a/bin/ci/java-play-framework-no-interface.json b/bin/ci/java-play-framework-no-interface.json new file mode 100644 index 0000000000..50de0e4d7b --- /dev/null +++ b/bin/ci/java-play-framework-no-interface.json @@ -0,0 +1,10 @@ +{ + "generatorName": "java-play-framework", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/java-play-framework-no-interface", + "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", + "additionalProperties": { + "hideGenerationTimestamp": true, + "useInterfaces": false + } +} \ No newline at end of file diff --git a/bin/ci/java-play-framework-no-swagger-ui.json b/bin/ci/java-play-framework-no-swagger-ui.json new file mode 100644 index 0000000000..388744e3a9 --- /dev/null +++ b/bin/ci/java-play-framework-no-swagger-ui.json @@ -0,0 +1,10 @@ +{ + "generatorName": "java-play-framework", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/java-play-framework-no-swagger-ui", + "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", + "additionalProperties": { + "hideGenerationTimestamp": true, + "useSwaggerUI": false + } +} \ No newline at end of file diff --git a/bin/ci/java-play-framework-no-wrap-calls.json b/bin/ci/java-play-framework-no-wrap-calls.json new file mode 100644 index 0000000000..36bb667246 --- /dev/null +++ b/bin/ci/java-play-framework-no-wrap-calls.json @@ -0,0 +1,10 @@ +{ + "generatorName": "java-play-framework", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/java-play-framework-no-wrap-calls", + "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", + "additionalProperties": { + "hideGenerationTimestamp": true, + "wrapCalls": false + } +} \ No newline at end of file diff --git a/bin/ci/java-play-framework.json b/bin/ci/java-play-framework.json new file mode 100644 index 0000000000..a94f7f54e9 --- /dev/null +++ b/bin/ci/java-play-framework.json @@ -0,0 +1,9 @@ +{ + "generatorName": "java-play-framework", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/java-play-framework", + "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-rest-assured.json b/bin/ci/java-rest-assured.json new file mode 100644 index 0000000000..19119b115c --- /dev/null +++ b/bin/ci/java-rest-assured.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/java-petstore-rest-assured.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/rest-assured", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/rest-assured", + "additionalProperties": { + "hideGenerationTimestamp": true, + "booleanGetterPrefix": "is" + } +} \ No newline at end of file diff --git a/bin/ci/java-resteasy.json b/bin/ci/java-resteasy.json new file mode 100644 index 0000000000..8a86a9be13 --- /dev/null +++ b/bin/ci/java-resteasy.json @@ -0,0 +1,9 @@ +{ + "!include": "bin/java-petstore-resteasy.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/resteasy", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-resttemplate-withXml.json b/bin/ci/java-resttemplate-withXml.json new file mode 100644 index 0000000000..e05ea6c1cc --- /dev/null +++ b/bin/ci/java-resttemplate-withXml.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/java-petstore-resttemplate.json", + "artifactId": "petstore-resttemplate-withxml", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/resttemplate-withXml", + "additionalProperties": { + "hideGenerationTimestamp": true, + "withXml": true + } +} \ No newline at end of file diff --git a/bin/ci/java-resttemplate.json b/bin/ci/java-resttemplate.json new file mode 100644 index 0000000000..9411e39e8b --- /dev/null +++ b/bin/ci/java-resttemplate.json @@ -0,0 +1,9 @@ +{ + "!include": "bin/java-petstore-resttemplate.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/resttemplate", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-retrofit.json b/bin/ci/java-retrofit.json new file mode 100644 index 0000000000..65ded148ba --- /dev/null +++ b/bin/ci/java-retrofit.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/java-petstore-retrofit.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/retrofit", + "additionalProperties": { + "hideGenerationTimestamp": true, + "dateLibrary": "joda" + } +} \ No newline at end of file diff --git a/bin/ci/java-retrofit2-play24.json b/bin/ci/java-retrofit2-play24.json new file mode 100644 index 0000000000..208c9173ae --- /dev/null +++ b/bin/ci/java-retrofit2-play24.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/java-petstore-retrofit2-play24.json", + "artifactId": "petstore-java-client-retrofit2-play24", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/retrofit2-play24", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-retrofit2-play25.json b/bin/ci/java-retrofit2-play25.json new file mode 100644 index 0000000000..e28b883137 --- /dev/null +++ b/bin/ci/java-retrofit2-play25.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/java-petstore-retrofit2-play25.json", + "artifactId": "petstore-java-client-retrofit2-play25", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/retrofit2-play25", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-retrofit2-play26.json b/bin/ci/java-retrofit2-play26.json new file mode 100644 index 0000000000..0068c156b2 --- /dev/null +++ b/bin/ci/java-retrofit2-play26.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/java-petstore-retrofit2-play26.json", + "artifactId": "petstore-java-client-retrofit2-play26", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/retrofit2-play26", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-retrofit2.json b/bin/ci/java-retrofit2.json new file mode 100644 index 0000000000..2b3d251241 --- /dev/null +++ b/bin/ci/java-retrofit2.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/java-petstore-retrofit2.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/retrofit2", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/retrofit2", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-retrofit2rx.json b/bin/ci/java-retrofit2rx.json new file mode 100644 index 0000000000..3479b1d08b --- /dev/null +++ b/bin/ci/java-retrofit2rx.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/java-petstore-retrofit2rx.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/retrofit2rx", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/retrofit2", + "additionalProperties": { + "useRxJava": true, + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-retrofit2rx2.json b/bin/ci/java-retrofit2rx2.json new file mode 100644 index 0000000000..c3a6d84168 --- /dev/null +++ b/bin/ci/java-retrofit2rx2.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/java-petstore-retrofit2rx2.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/retrofit2rx2", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/retrofit2", + "additionalProperties": { + "useRxJava2": true, + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-vertx.json b/bin/ci/java-vertx.json new file mode 100644 index 0000000000..0e6bf3edd7 --- /dev/null +++ b/bin/ci/java-vertx.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/java-petstore-vertx.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/vertx", + "templateDir": "modules/openapi-generator/src/main/resources/Java/libraries/vertx", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/java-webclient.json b/bin/ci/java-webclient.json new file mode 100644 index 0000000000..6c2dfdee88 --- /dev/null +++ b/bin/ci/java-webclient.json @@ -0,0 +1,9 @@ +{ + "!include": "bin/java-petstore-webclient.json", + "generatorName": "java", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/java/webclient", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/javascript-petstore-1.json b/bin/ci/javascript-petstore-1.json new file mode 100644 index 0000000000..820982bd59 --- /dev/null +++ b/bin/ci/javascript-petstore-1.json @@ -0,0 +1,11 @@ +{ + "generatorName": "javascript", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/javascript-promise", + "templateDir": "modules/openapi-generator/src/main/resources/Javascript", + "additionalProperties": { + "usePromises": true, + "useES6": false, + "appName": "PetstoreClient" + } +} \ No newline at end of file diff --git a/bin/ci/javascript-petstore-2.json b/bin/ci/javascript-petstore-2.json new file mode 100644 index 0000000000..5d545ded32 --- /dev/null +++ b/bin/ci/javascript-petstore-2.json @@ -0,0 +1,9 @@ +{ + "generatorName": "javascript", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/javascript-es6", + "templateDir": "modules/openapi-generator/src/main/resources/Javascript/es6", + "additionalProperties": { + "appName": "PetstoreClient" + } +} \ No newline at end of file diff --git a/bin/ci/javascript-petstore-3.json b/bin/ci/javascript-petstore-3.json new file mode 100644 index 0000000000..662aca5320 --- /dev/null +++ b/bin/ci/javascript-petstore-3.json @@ -0,0 +1,11 @@ +{ + "generatorName": "javascript", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/javascript-promise-es6", + "templateDir": "modules/openapi-generator/src/main/resources/Javascript/es6", + "additionalProperties": { + "appName": "PetstoreClient", + "usePromises": true, + "useES6": true + } +} \ No newline at end of file diff --git a/bin/ci/javascript-petstore.json b/bin/ci/javascript-petstore.json new file mode 100644 index 0000000000..0e85caf8cf --- /dev/null +++ b/bin/ci/javascript-petstore.json @@ -0,0 +1,10 @@ +{ + "generatorName": "javascript", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/javascript", + "templateDir": "modules/openapi-generator/src/main/resources/Javascript", + "additionalProperties": { + "appName": "PetstoreClient", + "useES6": false + } +} \ No newline at end of file diff --git a/bin/ci/kotlin-client-petstore-multiplatform.json b/bin/ci/kotlin-client-petstore-multiplatform.json new file mode 100644 index 0000000000..1459a1dbf7 --- /dev/null +++ b/bin/ci/kotlin-client-petstore-multiplatform.json @@ -0,0 +1,11 @@ +{ + "artifactId": "kotlin-client-petstore-multiplatform", + "generatorName": "kotlin", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/kotlin-multiplatform", + "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", + "library": "multiplatform", + "additionalProperties": { + "dateLibrary": "java8" + } +} \ No newline at end of file diff --git a/bin/ci/kotlin-client-petstore.json b/bin/ci/kotlin-client-petstore.json new file mode 100644 index 0000000000..55faa24802 --- /dev/null +++ b/bin/ci/kotlin-client-petstore.json @@ -0,0 +1,11 @@ +{ + "artifactId": "kotlin-petstore-client", + "generatorName": "kotlin", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/kotlin", + "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", + "additionalProperties": { + "dateLibrary": "java8", + "serializableModel": "true" + } +} \ No newline at end of file diff --git a/bin/ci/kotlin-client-string.json b/bin/ci/kotlin-client-string.json new file mode 100644 index 0000000000..52f68e53b4 --- /dev/null +++ b/bin/ci/kotlin-client-string.json @@ -0,0 +1,11 @@ +{ + "artifactId": "kotlin-petstore-string", + "generatorName": "kotlin", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/kotlin-string", + "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", + "additionalProperties": { + "dateLibrary": "string", + "serializableModel": "true" + } +} \ No newline at end of file diff --git a/bin/ci/kotlin-client-threetenbp.json b/bin/ci/kotlin-client-threetenbp.json new file mode 100644 index 0000000000..9f12cd38b2 --- /dev/null +++ b/bin/ci/kotlin-client-threetenbp.json @@ -0,0 +1,10 @@ +{ + "artifactId": "kotlin-petstore-threetenbp", + "generatorName": "kotlin", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/kotlin-threetenbp", + "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", + "additionalProperties": { + "dateLibrary": "threetenbp" + } +} \ No newline at end of file diff --git a/bin/ci/kotlin-server-petstore.json b/bin/ci/kotlin-server-petstore.json new file mode 100644 index 0000000000..dfd64c1425 --- /dev/null +++ b/bin/ci/kotlin-server-petstore.json @@ -0,0 +1,11 @@ +{ + "generatorName": "kotlin-server", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "library": "ktor", + "outputDir": "samples/server/petstore/kotlin-server/ktor", + "templateDir": "modules/openapi-generator/src/main/resources/kotlin-server", + "additionalProperties": { + "hideGenerationTimestamp": true, + "serializableModel": "true" + } +} \ No newline at end of file diff --git a/bin/ci/kotlin-springboot-petstore-server-reactive.json b/bin/ci/kotlin-springboot-petstore-server-reactive.json new file mode 100644 index 0000000000..fd2e318f8b --- /dev/null +++ b/bin/ci/kotlin-springboot-petstore-server-reactive.json @@ -0,0 +1,13 @@ +{ + "generatorName": "kotlin-spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/kotlin-springboot-reactive", + "templateDir": "modules/openapi-generator/src/main/resources/kotlin-spring", + "additionalProperties": { + "library": "spring-boot", + "beanValidations": true, + "swaggerAnnotations": true, + "serviceImplementation": true, + "reactive": true + } +} \ No newline at end of file diff --git a/bin/ci/kotlin-springboot-petstore-server.json b/bin/ci/kotlin-springboot-petstore-server.json new file mode 100644 index 0000000000..71597b8df2 --- /dev/null +++ b/bin/ci/kotlin-springboot-petstore-server.json @@ -0,0 +1,12 @@ +{ + "generatorName": "kotlin-spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/kotlin-springboot", + "templateDir": "modules/openapi-generator/src/main/resources/kotlin-spring", + "additionalProperties": { + "library": "spring-boot", + "beanValidations": true, + "swaggerAnnotations": true, + "serviceImplementation": true + } +} \ No newline at end of file diff --git a/bin/ci/mysql-schema-petstore.json b/bin/ci/mysql-schema-petstore.json new file mode 100644 index 0000000000..6937721ece --- /dev/null +++ b/bin/ci/mysql-schema-petstore.json @@ -0,0 +1,6 @@ +{ + "generatorName": "mysql-schema", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/schema/petstore/mysql", + "templateDir": "modules/openapi-generator/src/main/resources/mysql-schema" +} \ No newline at end of file diff --git a/bin/ci/openapi3-jaxrs-jersey-petstore.json b/bin/ci/openapi3-jaxrs-jersey-petstore.json new file mode 100644 index 0000000000..5065fb2c38 --- /dev/null +++ b/bin/ci/openapi3-jaxrs-jersey-petstore.json @@ -0,0 +1,10 @@ +{ + "artifactId": "openapiv3-jaxrs-jersey-petstore-server", + "generatorName": "jaxrs-jersey", + "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/jaxrs-jersey", + "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/openapi3-php-petstore.json b/bin/ci/openapi3-php-petstore.json new file mode 100644 index 0000000000..47e2dba985 --- /dev/null +++ b/bin/ci/openapi3-php-petstore.json @@ -0,0 +1,6 @@ +{ + "generatorName": "php", + "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/openapi3/client/petstore/php/OpenAPIClient-php", + "templateDir": "modules/openapi-generator/src/main/resources/php" +} \ No newline at end of file diff --git a/bin/ci/openapi3-python-petstore.json b/bin/ci/openapi3-python-petstore.json new file mode 100644 index 0000000000..7945bd9d6d --- /dev/null +++ b/bin/ci/openapi3-python-petstore.json @@ -0,0 +1,9 @@ +{ + "generatorName": "python", + "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/openapi3/client/petstore/python/", + "templateDir": "modules/openapi-generator/src/main/resources/python", + "additionalProperties": { + "packageName": "petstore_api" + } +} \ No newline at end of file diff --git a/bin/ci/openapi3-ruby-client-faraday-petstore.json b/bin/ci/openapi3-ruby-client-faraday-petstore.json new file mode 100644 index 0000000000..be0b61db99 --- /dev/null +++ b/bin/ci/openapi3-ruby-client-faraday-petstore.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/openapi3/ruby-petstore-faraday.json", + "generatorName": "ruby", + "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/openapi3/client/petstore/ruby-faraday", + "templateDir": "modules/openapi-generator/src/main/resources/ruby-client", + "additionalProperties": { + "skipFormModel": true + } +} \ No newline at end of file diff --git a/bin/ci/openapi3-ruby-client-petstore.json b/bin/ci/openapi3-ruby-client-petstore.json new file mode 100644 index 0000000000..91018e54a4 --- /dev/null +++ b/bin/ci/openapi3-ruby-client-petstore.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/ruby-petstore.json", + "generatorName": "ruby", + "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/openapi3/client/petstore/ruby", + "templateDir": "modules/openapi-generator/src/main/resources/ruby-client", + "additionalProperties": { + "skipFormModel": true + } +} \ No newline at end of file diff --git a/bin/ci/perl-petstore-1.json b/bin/ci/perl-petstore-1.json new file mode 100644 index 0000000000..985f6b3bd1 --- /dev/null +++ b/bin/ci/perl-petstore-1.json @@ -0,0 +1,10 @@ +{ + "generatorName": "perl", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/perl/deep_module_test", + "outputDir": "samples/client/petstore/perl/deep_module_test", + "additionalProperties": { + "hideGenerationTimestamp": true, + "moduleName": "Something::Deep" + } +} \ No newline at end of file diff --git a/bin/ci/perl-petstore.json b/bin/ci/perl-petstore.json new file mode 100644 index 0000000000..d726e633bd --- /dev/null +++ b/bin/ci/perl-petstore.json @@ -0,0 +1,8 @@ +{ + "generatorName": "perl", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/perl", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/php-lumen-petstore-server.json b/bin/ci/php-lumen-petstore-server.json new file mode 100644 index 0000000000..87755152ea --- /dev/null +++ b/bin/ci/php-lumen-petstore-server.json @@ -0,0 +1,6 @@ +{ + "generatorName": "php-lumen", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/php-lumen", + "templateDir": "modules/openapi-generator/src/main/resources/php-lumen" +} \ No newline at end of file diff --git a/bin/ci/php-petstore.json b/bin/ci/php-petstore.json new file mode 100644 index 0000000000..fd3f1d1c24 --- /dev/null +++ b/bin/ci/php-petstore.json @@ -0,0 +1,6 @@ +{ + "generatorName": "php", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/php/OpenAPIClient-php", + "templateDir": "modules/openapi-generator/src/main/resources/php" +} \ No newline at end of file diff --git a/bin/ci/php-silex-petstore-server.json b/bin/ci/php-silex-petstore-server.json new file mode 100644 index 0000000000..fa79498518 --- /dev/null +++ b/bin/ci/php-silex-petstore-server.json @@ -0,0 +1,6 @@ +{ + "generatorName": "php-silex", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/server/petstore/php-silex/OpenAPIServer", + "templateDir": "modules/openapi-generator/src/main/resources/php-silex" +} \ No newline at end of file diff --git a/bin/ci/php-slim-server-petstore.json b/bin/ci/php-slim-server-petstore.json new file mode 100644 index 0000000000..c189ba439c --- /dev/null +++ b/bin/ci/php-slim-server-petstore.json @@ -0,0 +1,6 @@ +{ + "generatorName": "php-slim", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/php-slim", + "templateDir": "modules/openapi-generator/src/main/resources/php-slim-server" +} \ No newline at end of file diff --git a/bin/ci/php-symfony-petstore.json b/bin/ci/php-symfony-petstore.json new file mode 100644 index 0000000000..81f5f6296b --- /dev/null +++ b/bin/ci/php-symfony-petstore.json @@ -0,0 +1,6 @@ +{ + "generatorName": "php-symfony", + "inputSpec": "/Users/jim/projects/openapi-generator/bin/../modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "/Users/jim/projects/openapi-generator/bin/../samples/server/petstore/php-symfony/SymfonyBundle-php", + "templateDir": "/Users/jim/projects/openapi-generator/bin/../modules/openapi-generator/src/main/resources/php-symfony" +} \ No newline at end of file diff --git a/bin/ci/php-ze-ph-petstore-server.json b/bin/ci/php-ze-ph-petstore-server.json new file mode 100644 index 0000000000..2f02c99e22 --- /dev/null +++ b/bin/ci/php-ze-ph-petstore-server.json @@ -0,0 +1,6 @@ +{ + "generatorName": "php-ze-ph", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/php-ze-ph", + "templateDir": "modules/openapi-generator/src/main/resources/php-ze-ph" +} \ No newline at end of file diff --git a/bin/ci/python-petstore-1.json b/bin/ci/python-petstore-1.json new file mode 100644 index 0000000000..730545175c --- /dev/null +++ b/bin/ci/python-petstore-1.json @@ -0,0 +1,9 @@ +{ + "generatorName": "python", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/python", + "templateDir": "modules/openapi-generator/src/main/resources/python", + "additionalProperties": { + "packageName": "petstore_api" + } +} \ No newline at end of file diff --git a/bin/ci/python-petstore-2.json b/bin/ci/python-petstore-2.json new file mode 100644 index 0000000000..1a48b15b60 --- /dev/null +++ b/bin/ci/python-petstore-2.json @@ -0,0 +1,10 @@ +{ + "generatorName": "python", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "library": "tornado", + "outputDir": "samples/client/petstore/python-tornado", + "templateDir": "modules/openapi-generator/src/main/resources/python", + "additionalProperties": { + "packageName": "petstore_api" + } +} \ No newline at end of file diff --git a/bin/ci/python-petstore.json b/bin/ci/python-petstore.json new file mode 100644 index 0000000000..5af62cb71e --- /dev/null +++ b/bin/ci/python-petstore.json @@ -0,0 +1,10 @@ +{ + "generatorName": "python", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "library": "asyncio", + "outputDir": "samples/client/petstore/python-asyncio", + "templateDir": "modules/openapi-generator/src/main/resources/python", + "additionalProperties": { + "packageName": "petstore_api" + } +} \ No newline at end of file diff --git a/bin/ci/r-petstore.json b/bin/ci/r-petstore.json new file mode 100644 index 0000000000..26889a24f9 --- /dev/null +++ b/bin/ci/r-petstore.json @@ -0,0 +1,9 @@ +{ + "generatorName": "r", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/R", + "templateDir": "modules/openapi-generator/src/main/resources/r", + "additionalProperties": { + "packageName": "petstore" + } +} \ No newline at end of file diff --git a/bin/ci/ruby-client-petstore-faraday.json b/bin/ci/ruby-client-petstore-faraday.json new file mode 100644 index 0000000000..cc3a4a6993 --- /dev/null +++ b/bin/ci/ruby-client-petstore-faraday.json @@ -0,0 +1,7 @@ +{ + "!include": "bin/ruby-petstore-faraday.json", + "generatorName": "ruby", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/ruby-faraday", + "templateDir": "modules/openapi-generator/src/main/resources/ruby-client" +} \ No newline at end of file diff --git a/bin/ci/ruby-client-petstore.json b/bin/ci/ruby-client-petstore.json new file mode 100644 index 0000000000..409f07df11 --- /dev/null +++ b/bin/ci/ruby-client-petstore.json @@ -0,0 +1,7 @@ +{ + "!include": "bin/ruby-petstore.json", + "generatorName": "ruby", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/client/petstore/ruby", + "templateDir": "modules/openapi-generator/src/main/resources/ruby-client" +} \ No newline at end of file diff --git a/bin/ci/rust-server-petstore-1.json b/bin/ci/rust-server-petstore-1.json new file mode 100644 index 0000000000..9094bb9072 --- /dev/null +++ b/bin/ci/rust-server-petstore-1.json @@ -0,0 +1,11 @@ +{ + "generateAliasAsModel": true, + "generatorName": "rust-server", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml", + "outputDir": "samples/server/petstore/rust-server/output/rust-server-test", + "templateDir": "modules/openapi-generator/src/main/resources/rust-server", + "additionalProperties": { + "packageName": "rust-server-test", + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/rust-server-petstore-2.json b/bin/ci/rust-server-petstore-2.json new file mode 100644 index 0000000000..1ddfe29dd9 --- /dev/null +++ b/bin/ci/rust-server-petstore-2.json @@ -0,0 +1,11 @@ +{ + "generateAliasAsModel": true, + "generatorName": "rust-server", + "inputSpec": "modules/openapi-generator/src/test/resources/3_0/rust-server/multipart-v3.yaml", + "outputDir": "samples/server/petstore/rust-server/output/multipart-v3", + "templateDir": "modules/openapi-generator/src/main/resources/rust-server", + "additionalProperties": { + "packageName": "multipart-v3", + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/rust-server-petstore-3.json b/bin/ci/rust-server-petstore-3.json new file mode 100644 index 0000000000..7291e9c73d --- /dev/null +++ b/bin/ci/rust-server-petstore-3.json @@ -0,0 +1,11 @@ +{ + "generateAliasAsModel": true, + "generatorName": "rust-server", + "inputSpec": "modules/openapi-generator/src/test/resources/3_0/rust-server/openapi-v3.yaml", + "outputDir": "samples/server/petstore/rust-server/output/openapi-v3", + "templateDir": "modules/openapi-generator/src/main/resources/rust-server", + "additionalProperties": { + "packageName": "openapi-v3", + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/rust-server-petstore-4.json b/bin/ci/rust-server-petstore-4.json new file mode 100644 index 0000000000..0e85d34e8e --- /dev/null +++ b/bin/ci/rust-server-petstore-4.json @@ -0,0 +1,11 @@ +{ + "generateAliasAsModel": true, + "generatorName": "rust-server", + "inputSpec": "modules/openapi-generator/src/test/resources/3_0/rust-server/ops-v3.yaml", + "outputDir": "samples/server/petstore/rust-server/output/ops-v3", + "templateDir": "modules/openapi-generator/src/main/resources/rust-server", + "additionalProperties": { + "packageName": "ops-v3", + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/rust-server-petstore.json b/bin/ci/rust-server-petstore.json new file mode 100644 index 0000000000..e258a06008 --- /dev/null +++ b/bin/ci/rust-server-petstore.json @@ -0,0 +1,11 @@ +{ + "generateAliasAsModel": true, + "generatorName": "rust-server", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing", + "templateDir": "modules/openapi-generator/src/main/resources/rust-server", + "additionalProperties": { + "packageName": "petstore-with-fake-endpoints-models-for-testing", + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/spring-cloud-async.json b/bin/ci/spring-cloud-async.json new file mode 100644 index 0000000000..8589521935 --- /dev/null +++ b/bin/ci/spring-cloud-async.json @@ -0,0 +1,12 @@ +{ + "!include": "bin/spring-cloud-feign-petstore.json", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/spring-cloud-async", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud", + "additionalProperties": { + "hideGenerationTimestamp": true, + "java8": true, + "async": true + } +} \ No newline at end of file diff --git a/bin/ci/spring-cloud-feign-petstore.json b/bin/ci/spring-cloud-feign-petstore.json new file mode 100644 index 0000000000..b402ba8c00 --- /dev/null +++ b/bin/ci/spring-cloud-feign-petstore.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/spring-cloud-feign-petstore.json", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/spring-cloud", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud", + "additionalProperties": { + "hideGenerationTimestamp": true, + "responseWrapper": "HystrixCommand" + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-10.json b/bin/ci/spring-petstore-10.json new file mode 100644 index 0000000000..ba76388c1b --- /dev/null +++ b/bin/ci/spring-petstore-10.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/springboot-petstore-server-beanvalidation.json", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/springboot-beanvalidation", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "hideGenerationTimestamp": true, + "java8": false + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-11.json b/bin/ci/spring-petstore-11.json new file mode 100644 index 0000000000..6f2efc5529 --- /dev/null +++ b/bin/ci/spring-petstore-11.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/springboot-petstore-server-implicitHeaders.json", + "artifactId": "springboot-implicitHeaders", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/springboot-implicitHeaders", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-12.json b/bin/ci/spring-petstore-12.json new file mode 100644 index 0000000000..cab75e7ae3 --- /dev/null +++ b/bin/ci/spring-petstore-12.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/springboot-petstore-server-useOptional.json", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/springboot-useoptional", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-13.json b/bin/ci/spring-petstore-13.json new file mode 100644 index 0000000000..375efe85a7 --- /dev/null +++ b/bin/ci/spring-petstore-13.json @@ -0,0 +1,11 @@ +{ + "!include": "bin/springboot-virtualan-petstore-server.json", + "artifactId": "springboot-virtualan", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/springboot-virtualan", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-2.json b/bin/ci/spring-petstore-2.json new file mode 100644 index 0000000000..ba55139885 --- /dev/null +++ b/bin/ci/spring-petstore-2.json @@ -0,0 +1,11 @@ +{ + "artifactId": "spring-stubs", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/spring-stubs", + "additionalProperties": { + "interfaceOnly": true, + "singleContentTypes": true, + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-3.json b/bin/ci/spring-petstore-3.json new file mode 100644 index 0000000000..36ee23c72b --- /dev/null +++ b/bin/ci/spring-petstore-3.json @@ -0,0 +1,13 @@ +{ + "!include": "bin/spring-mvc-petstore-server.json", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/spring-mvc", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "hideGenerationTimestamp": true, + "java8": false, + "serverPort": "8002", + "booleanGetterPrefix": "get" + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-4.json b/bin/ci/spring-petstore-4.json new file mode 100644 index 0000000000..5b9f3b774a --- /dev/null +++ b/bin/ci/spring-petstore-4.json @@ -0,0 +1,12 @@ +{ + "!include": "bin/spring-mvc-petstore-j8-async.json", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/spring-mvc-j8-async", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "hideGenerationTimestamp": true, + "async": true, + "serverPort": "8002" + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-5.json b/bin/ci/spring-petstore-5.json new file mode 100644 index 0000000000..9978d15d09 --- /dev/null +++ b/bin/ci/spring-petstore-5.json @@ -0,0 +1,12 @@ +{ + "!include": "bin/spring-mvc-petstore-j8-localdatetime.json", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/spring-mvc-j8-localdatetime", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "hideGenerationTimestamp": true, + "booleanGetterPrefix": "get", + "serverPort": "8002" + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-6.json b/bin/ci/spring-petstore-6.json new file mode 100644 index 0000000000..4a5aed031f --- /dev/null +++ b/bin/ci/spring-petstore-6.json @@ -0,0 +1,12 @@ +{ + "artifactId": "springboot-delegate", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/springboot-delegate", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "delegatePattern": true, + "hideGenerationTimestamp": true, + "java8": false + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-7.json b/bin/ci/spring-petstore-7.json new file mode 100644 index 0000000000..7863b8d9d7 --- /dev/null +++ b/bin/ci/spring-petstore-7.json @@ -0,0 +1,11 @@ +{ + "artifactId": "springboot-delegate-j8", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/springboot-delegate-j8", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "delegatePattern": true, + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-8.json b/bin/ci/spring-petstore-8.json new file mode 100644 index 0000000000..d275fbabac --- /dev/null +++ b/bin/ci/spring-petstore-8.json @@ -0,0 +1,10 @@ +{ + "artifactId": "springboot", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/springboot", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/spring-petstore-9.json b/bin/ci/spring-petstore-9.json new file mode 100644 index 0000000000..1955fd5794 --- /dev/null +++ b/bin/ci/spring-petstore-9.json @@ -0,0 +1,12 @@ +{ + "artifactId": "springboot-reactive", + "generatorName": "spring", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", + "outputDir": "samples/server/petstore/springboot-reactive", + "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", + "additionalProperties": { + "reactive": true, + "delegatePattern": true, + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/spring-stubs.json b/bin/ci/spring-stubs.json new file mode 100644 index 0000000000..583fed6e25 --- /dev/null +++ b/bin/ci/spring-stubs.json @@ -0,0 +1,11 @@ +{ + "generatorName": "spring", + "artifactId": "spring-stubs", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/spring-stubs", + "additionalProperties": { + "interfaceOnly": true, + "singleContentTypes": true, + "hideGenerationTimestamp": true + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-1.json b/bin/ci/typescript-angular-petstore-1.json new file mode 100644 index 0000000000..a82cb8c048 --- /dev/null +++ b/bin/ci/typescript-angular-petstore-1.json @@ -0,0 +1,9 @@ +{ + "!include": "bin/typescript-petstore-npm.json", + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v2/npm", + "additionalProperties": { + "ngVersion": "2" + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-10.json b/bin/ci/typescript-angular-petstore-10.json new file mode 100644 index 0000000000..0bbd411378 --- /dev/null +++ b/bin/ci/typescript-angular-petstore-10.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json", + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm", + "additionalProperties": { + "ngVersion": "7.0.0", + "providedInRoot": false + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-11.json b/bin/ci/typescript-angular-petstore-11.json new file mode 100644 index 0000000000..8f62c2a7f0 --- /dev/null +++ b/bin/ci/typescript-angular-petstore-11.json @@ -0,0 +1,8 @@ +{ + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default", + "additionalProperties": { + "ngVersion": "7.0.0" + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-12.json b/bin/ci/typescript-angular-petstore-12.json new file mode 100644 index 0000000000..3a7f640939 --- /dev/null +++ b/bin/ci/typescript-angular-petstore-12.json @@ -0,0 +1,9 @@ +{ + "!include": "bin/typescript-angular-v7-petstore-provided-in-root-with-npm.json", + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm", + "additionalProperties": { + "ngVersion": "7.0.0" + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-13.json b/bin/ci/typescript-angular-petstore-13.json new file mode 100644 index 0000000000..1fa9f8a20d --- /dev/null +++ b/bin/ci/typescript-angular-petstore-13.json @@ -0,0 +1,9 @@ +{ + "!include": "bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json", + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm", + "additionalProperties": { + "ngVersion": "8.0.0" + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-2.json b/bin/ci/typescript-angular-petstore-2.json new file mode 100644 index 0000000000..2e79f71fa8 --- /dev/null +++ b/bin/ci/typescript-angular-petstore-2.json @@ -0,0 +1,9 @@ +{ + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v2/with-interfaces", + "additionalProperties": { + "ngVersion": "2", + "withInterfaces": true + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-3.json b/bin/ci/typescript-angular-petstore-3.json new file mode 100644 index 0000000000..3b343648d9 --- /dev/null +++ b/bin/ci/typescript-angular-petstore-3.json @@ -0,0 +1,9 @@ +{ + "!include": "bin/typescript-petstore-npm.json", + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v4/npm", + "additionalProperties": { + "ngVersion": "4" + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-4.json b/bin/ci/typescript-angular-petstore-4.json new file mode 100644 index 0000000000..ffd19d1656 --- /dev/null +++ b/bin/ci/typescript-angular-petstore-4.json @@ -0,0 +1,9 @@ +{ + "!include": "bin/typescript-petstore-npm.json", + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v4.3/npm", + "additionalProperties": { + "ngVersion": "4.3" + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-5.json b/bin/ci/typescript-angular-petstore-5.json new file mode 100644 index 0000000000..44c7e1fe13 --- /dev/null +++ b/bin/ci/typescript-angular-petstore-5.json @@ -0,0 +1,9 @@ +{ + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default", + "additionalProperties": { + "ngVersion": "6.0.0", + "providedInRoot": false + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-6.json b/bin/ci/typescript-angular-petstore-6.json new file mode 100644 index 0000000000..5965a2e92f --- /dev/null +++ b/bin/ci/typescript-angular-petstore-6.json @@ -0,0 +1,10 @@ +{ + "!include": "bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json", + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm", + "additionalProperties": { + "ngVersion": "6.0.0", + "providedInRoot": false + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-7.json b/bin/ci/typescript-angular-petstore-7.json new file mode 100644 index 0000000000..638a3464ef --- /dev/null +++ b/bin/ci/typescript-angular-petstore-7.json @@ -0,0 +1,8 @@ +{ + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default", + "additionalProperties": { + "ngVersion": "6.0.0" + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-8.json b/bin/ci/typescript-angular-petstore-8.json new file mode 100644 index 0000000000..9bf237a3b3 --- /dev/null +++ b/bin/ci/typescript-angular-petstore-8.json @@ -0,0 +1,9 @@ +{ + "!include": "bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json", + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm", + "additionalProperties": { + "ngVersion": "6.0.0" + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-9.json b/bin/ci/typescript-angular-petstore-9.json new file mode 100644 index 0000000000..0d672e6f09 --- /dev/null +++ b/bin/ci/typescript-angular-petstore-9.json @@ -0,0 +1,9 @@ +{ + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default", + "additionalProperties": { + "ngVersion": "7.0.0", + "providedInRoot": false + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore.json b/bin/ci/typescript-angular-petstore.json new file mode 100644 index 0000000000..f086745732 --- /dev/null +++ b/bin/ci/typescript-angular-petstore.json @@ -0,0 +1,8 @@ +{ + "generatorName": "typescript-angular", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angular-v2/default", + "additionalProperties": { + "ngVersion": "2" + } +} \ No newline at end of file diff --git a/bin/ci/typescript-angularjs-petstore.json b/bin/ci/typescript-angularjs-petstore.json new file mode 100644 index 0000000000..2f7f668272 --- /dev/null +++ b/bin/ci/typescript-angularjs-petstore.json @@ -0,0 +1,5 @@ +{ + "generatorName": "typescript-angularjs", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-angularjs" +} \ No newline at end of file diff --git a/bin/ci/typescript-aurelia-petstore.json b/bin/ci/typescript-aurelia-petstore.json new file mode 100644 index 0000000000..24229cbdf7 --- /dev/null +++ b/bin/ci/typescript-aurelia-petstore.json @@ -0,0 +1,5 @@ +{ + "generatorName": "typescript-aurelia", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-aurelia/default" +} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore-1.json b/bin/ci/typescript-axios-petstore-1.json new file mode 100644 index 0000000000..5b63412ae8 --- /dev/null +++ b/bin/ci/typescript-axios-petstore-1.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-axios-petstore-with-npm-version.json", + "generatorName": "typescript-axios", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-axios/builds/with-npm-version" +} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore-2.json b/bin/ci/typescript-axios-petstore-2.json new file mode 100644 index 0000000000..3f8539dcae --- /dev/null +++ b/bin/ci/typescript-axios-petstore-2.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.json", + "generatorName": "typescript-axios", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api" +} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore-3.json b/bin/ci/typescript-axios-petstore-3.json new file mode 100644 index 0000000000..0f25f11b31 --- /dev/null +++ b/bin/ci/typescript-axios-petstore-3.json @@ -0,0 +1,5 @@ +{ + "generatorName": "typescript-axios", + "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-complex-headers.yaml", + "outputDir": "samples/client/petstore/typescript-axios/builds/with-complex-headers" +} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore-4.json b/bin/ci/typescript-axios-petstore-4.json new file mode 100644 index 0000000000..d552953c58 --- /dev/null +++ b/bin/ci/typescript-axios-petstore-4.json @@ -0,0 +1,8 @@ +{ + "generatorName": "typescript-axios", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-axios/builds/with-interfaces", + "additionalProperties": { + "withInterfaces": true + } +} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore-5.json b/bin/ci/typescript-axios-petstore-5.json new file mode 100644 index 0000000000..f8d998f1c9 --- /dev/null +++ b/bin/ci/typescript-axios-petstore-5.json @@ -0,0 +1,5 @@ +{ + "generatorName": "typescript-axios", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-axios/builds/default" +} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore.json b/bin/ci/typescript-axios-petstore.json new file mode 100644 index 0000000000..bb49285bb1 --- /dev/null +++ b/bin/ci/typescript-axios-petstore.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-axios-petstore-target-es6.json", + "generatorName": "typescript-axios", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-axios/builds/es6-target" +} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore-1.json b/bin/ci/typescript-fetch-petstore-1.json new file mode 100644 index 0000000000..40abb9ef24 --- /dev/null +++ b/bin/ci/typescript-fetch-petstore-1.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-fetch-petstore-with-npm-version.json", + "generatorName": "typescript-fetch", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-fetch/builds/with-npm-version" +} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore-2.json b/bin/ci/typescript-fetch-petstore-2.json new file mode 100644 index 0000000000..bc6e5f807c --- /dev/null +++ b/bin/ci/typescript-fetch-petstore-2.json @@ -0,0 +1,8 @@ +{ + "generatorName": "typescript-fetch", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-fetch/builds/with-interfaces", + "additionalProperties": { + "withInterfaces": true + } +} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore-3.json b/bin/ci/typescript-fetch-petstore-3.json new file mode 100644 index 0000000000..0de17df51b --- /dev/null +++ b/bin/ci/typescript-fetch-petstore-3.json @@ -0,0 +1,5 @@ +{ + "generatorName": "typescript-fetch", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-fetch/builds/default" +} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore-4.json b/bin/ci/typescript-fetch-petstore-4.json new file mode 100644 index 0000000000..1f434a0306 --- /dev/null +++ b/bin/ci/typescript-fetch-petstore-4.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-fetch-petstore-multiple-parameters.json", + "generatorName": "typescript-fetch", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-fetch/builds/multiple-parameters" +} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore-5.json b/bin/ci/typescript-fetch-petstore-5.json new file mode 100644 index 0000000000..2905e73da8 --- /dev/null +++ b/bin/ci/typescript-fetch-petstore-5.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-fetch-petstore-prefix-parameter-interfaces.json", + "generatorName": "typescript-fetch", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces" +} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore.json b/bin/ci/typescript-fetch-petstore.json new file mode 100644 index 0000000000..1f5fcf5f4b --- /dev/null +++ b/bin/ci/typescript-fetch-petstore.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-fetch-petstore-target-es6.json", + "generatorName": "typescript-fetch", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-fetch/builds/es6-target" +} \ No newline at end of file diff --git a/bin/ci/typescript-inversify-petstore.json b/bin/ci/typescript-inversify-petstore.json new file mode 100644 index 0000000000..8a15c316d3 --- /dev/null +++ b/bin/ci/typescript-inversify-petstore.json @@ -0,0 +1,5 @@ +{ + "generatorName": "typescript-inversify", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-inversify" +} \ No newline at end of file diff --git a/bin/ci/typescript-jquery-petstore-1.json b/bin/ci/typescript-jquery-petstore-1.json new file mode 100644 index 0000000000..6c0fac1642 --- /dev/null +++ b/bin/ci/typescript-jquery-petstore-1.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-jquery-petstore-npm.json", + "generatorName": "typescript-jquery", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-jquery/npm" +} \ No newline at end of file diff --git a/bin/ci/typescript-jquery-petstore.json b/bin/ci/typescript-jquery-petstore.json new file mode 100644 index 0000000000..ea83a6088d --- /dev/null +++ b/bin/ci/typescript-jquery-petstore.json @@ -0,0 +1,5 @@ +{ + "generatorName": "typescript-jquery", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-jquery/default" +} \ No newline at end of file diff --git a/bin/ci/typescript-node-petstore-1.json b/bin/ci/typescript-node-petstore-1.json new file mode 100644 index 0000000000..2610ca3ee1 --- /dev/null +++ b/bin/ci/typescript-node-petstore-1.json @@ -0,0 +1,5 @@ +{ + "generatorName": "typescript-node", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-node/default" +} \ No newline at end of file diff --git a/bin/ci/typescript-node-petstore.json b/bin/ci/typescript-node-petstore.json new file mode 100644 index 0000000000..99911c472b --- /dev/null +++ b/bin/ci/typescript-node-petstore.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-node-petstore-npm.json", + "generatorName": "typescript-node", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-node/npm" +} \ No newline at end of file diff --git a/bin/ci/typescript-rxjs-petstore-1.json b/bin/ci/typescript-rxjs-petstore-1.json new file mode 100644 index 0000000000..1686f9f00c --- /dev/null +++ b/bin/ci/typescript-rxjs-petstore-1.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-rxjs-petstore-with-npm-version.json", + "generatorName": "typescript-rxjs", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-rxjs/builds/with-npm-version" +} \ No newline at end of file diff --git a/bin/ci/typescript-rxjs-petstore-2.json b/bin/ci/typescript-rxjs-petstore-2.json new file mode 100644 index 0000000000..00e8f66a49 --- /dev/null +++ b/bin/ci/typescript-rxjs-petstore-2.json @@ -0,0 +1,8 @@ +{ + "generatorName": "typescript-rxjs", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-rxjs/builds/with-interfaces", + "additionalProperties": { + "withInterfaces": true + } +} \ No newline at end of file diff --git a/bin/ci/typescript-rxjs-petstore-3.json b/bin/ci/typescript-rxjs-petstore-3.json new file mode 100644 index 0000000000..7ee3fc8b24 --- /dev/null +++ b/bin/ci/typescript-rxjs-petstore-3.json @@ -0,0 +1,5 @@ +{ + "generatorName": "typescript-rxjs", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-rxjs/builds/default" +} \ No newline at end of file diff --git a/bin/ci/typescript-rxjs-petstore.json b/bin/ci/typescript-rxjs-petstore.json new file mode 100644 index 0000000000..e5d9f0ec87 --- /dev/null +++ b/bin/ci/typescript-rxjs-petstore.json @@ -0,0 +1,6 @@ +{ + "!include": "bin/typescript-rxjs-petstore-target-es6.json", + "generatorName": "typescript-rxjs", + "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", + "outputDir": "samples/client/petstore/typescript-rxjs/builds/es6-target" +} \ No newline at end of file diff --git a/bin/csharp-property-changed-petstore.sh b/bin/csharp-property-changed-petstore.sh index fd65428017..6ac09c9406 100755 --- a/bin/csharp-property-changed-petstore.sh +++ b/bin/csharp-property-changed-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged --additional-properties generatePropertyChanged=true --additional-properties packageGuid={5CD900DE-8266-412F-A758-28E1F9C623D5} $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged --additional-properties generatePropertyChanged=true --additional-properties optionalEmitDefaultValues=true --additional-properties packageGuid={5CD900DE-8266-412F-A758-28E1F9C623D5} $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/dart-petstore.sh b/bin/dart-petstore.sh index ee60cb6c4f..74b52e234d 100755 --- a/bin/dart-petstore.sh +++ b/bin/dart-petstore.sh @@ -39,6 +39,7 @@ java $JAVA_OPTS -jar $executable $ags ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true,supportDart2=false $@" java $JAVA_OPTS -jar $executable $ags +# TODO: Remove this as it duplicate output from the first example in this file. # Generate non-browserClient and put it to the flutter sample app ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false,supportDart2=false $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/elm-0.18-petstore.sh b/bin/elm-0.18-petstore.sh index 9d5bcb53bc..4ec99604de 100755 --- a/bin/elm-0.18-petstore.sh +++ b/bin/elm-0.18-petstore.sh @@ -26,7 +26,7 @@ then fi # auto format elm code using elm-format -export ELM_POST_PROCESS_FILE="/usr/local/bin/elm-format --elm-version=0.18 --yes" +export ELM_POST_PROCESS_FILE="/usr/bin/env elm-format --elm-version=0.18 --yes" # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" diff --git a/bin/elm-petstore.sh b/bin/elm-petstore.sh index f2dae6d27e..dd4c67f494 100755 --- a/bin/elm-petstore.sh +++ b/bin/elm-petstore.sh @@ -26,7 +26,7 @@ then fi # auto format elm code using elm-format -export ELM_POST_PROCESS_FILE="/usr/local/bin/elm-format --elm-version=0.19 --yes" +export ELM_POST_PROCESS_FILE="/usr/bin/env elm-format --elm-version=0.19 --yes" # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" diff --git a/bin/java-petstore-all.sh b/bin/java-petstore-all.sh index d0beeb353c..a593b707c2 100755 --- a/bin/java-petstore-all.sh +++ b/bin/java-petstore-all.sh @@ -1,26 +1,26 @@ #!/bin/sh # update java petstore clients for all supported http libraries -./bin/java-petstore-jersey1.sh -./bin/java-petstore-jersey2.sh -./bin/java-petstore-feign.sh ./bin/java-petstore-feign-10x.sh -./bin/java-petstore-okhttp-gson.sh -./bin/java-petstore-okhttp-gson-parcelable.sh +./bin/java-petstore-feign.sh +./bin/java-petstore-google-api-client.sh +./bin/java-petstore-jersey1.sh +./bin/java-petstore-jersey2-java6.sh +./bin/java-petstore-jersey2.sh ./bin/java-petstore-native.sh +./bin/java-petstore-okhttp-gson-parcelable.sh +./bin/java-petstore-okhttp-gson.sh +./bin/java-petstore-rest-assured.sh +./bin/java-petstore-resteasy.sh +./bin/java-petstore-resttemplate-withxml.sh +./bin/java-petstore-resttemplate.sh ./bin/java-petstore-retrofit.sh -./bin/java-petstore-retrofit2.sh -./bin/java-petstore-retrofit2rx.sh -./bin/java-petstore-retrofit2rx2.sh -./bin/java8-petstore-jersey2.sh ./bin/java-petstore-retrofit2-play24.sh ./bin/java-petstore-retrofit2-play25.sh ./bin/java-petstore-retrofit2-play26.sh -./bin/java-petstore-jersey2-java6.sh -./bin/java-petstore-resttemplate.sh -./bin/java-petstore-resttemplate-withxml.sh -./bin/java-petstore-webclient.sh -./bin/java-petstore-resteasy.sh -./bin/java-petstore-google-api-client.sh -./bin/java-petstore-rest-assured.sh +./bin/java-petstore-retrofit2.sh +./bin/java-petstore-retrofit2rx.sh +./bin/java-petstore-retrofit2rx2.sh ./bin/java-petstore-vertx.sh +./bin/java-petstore-webclient.sh +./bin/java8-petstore-jersey2.sh diff --git a/bin/kotlin-client-all.sh b/bin/kotlin-client-all.sh new file mode 100755 index 0000000000..175752d797 --- /dev/null +++ b/bin/kotlin-client-all.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +./bin/kotlin-client-nonpublic.sh +./bin/kotlin-client-okhttp3.sh +./bin/kotlin-client-petstore-multiplatform.sh +./bin/kotlin-client-petstore.sh +./bin/kotlin-client-string.sh +./bin/kotlin-client-threetenbp.sh diff --git a/bin/kotlin-client-nonpublic.sh b/bin/kotlin-client-nonpublic.sh new file mode 100755 index 0000000000..620a6fe3c8 --- /dev/null +++ b/bin/kotlin-client-nonpublic.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=$(ls -ld "$SCRIPT") + link=$(expr "$ls" : '.*-> \(.*\)$') + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=$(dirname "$SCRIPT")/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=$(dirname "$SCRIPT")/.. + APP_DIR=$(cd "${APP_DIR}"; pwd) +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-nonpublic --additional-properties nonPublicApi=true -o samples/client/petstore/kotlin-nonpublic $@" + +java ${JAVA_OPTS} -jar ${executable} ${ags} + +cp CI/samples.ci/client/petstore/kotlin-string/pom.xml samples/client/petstore/kotlin-string/pom.xml diff --git a/bin/kotlin-client-okhttp3.sh b/bin/kotlin-client-okhttp3.sh new file mode 100755 index 0000000000..c2fbb30087 --- /dev/null +++ b/bin/kotlin-client-okhttp3.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=$(ls -ld "$SCRIPT") + link=$(expr "$ls" : '.*-> \(.*\)$') + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=$(dirname "$SCRIPT")/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=$(dirname "$SCRIPT")/.. + APP_DIR=$(cd "${APP_DIR}"; pwd) +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-okhttp3 --library jvm-okhttp3 -o samples/client/petstore/kotlin-okhttp3 $@" + +java ${JAVA_OPTS} -jar ${executable} ${ags} + +#cp CI/samples.ci/client/petstore/kotlin-okhttp3/pom.xml samples/client/petstore/kotlin-okhttp3/pom.xml diff --git a/bin/openapi3/csharp-property-changed-petstore.sh b/bin/openapi3/csharp-property-changed-petstore.sh index 57c3fcd96c..a3b11ad569 100755 --- a/bin/openapi3/csharp-property-changed-petstore.sh +++ b/bin/openapi3/csharp-property-changed-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged --additional-properties generatePropertyChanged=true --additional-properties packageGuid={5CD900DE-8266-412F-A758-28E1F9C623D5}" +ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged --additional-properties generatePropertyChanged=true --additional-properties optionalEmitDefaultValues=true --additional-properties packageGuid={5CD900DE-8266-412F-A758-28E1F9C623D5}" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index eb9920ef67..adc1993015 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -13,8 +13,10 @@ sleep 5 declare -a scripts=( # SAMPLES "./bin/ruby-client-petstore.sh" +"./bin/ruby-client-petstore-faraday.sh" "./bin/openapi3/ruby-client-petstore.sh" "./bin/openapi3/ruby-client-faraday-petstore.sh" + "./bin/java-petstore-all.sh" "./bin/java-jaxrs-petstore-server-all.sh" "./bin/java-msf4j-petstore-server.sh" @@ -63,16 +65,19 @@ declare -a scripts=( "./bin/apex-petstore.sh" "./bin/perl-petstore-all.sh" "./bin/dart-jaguar-petstore.sh" +#"./bin/dart-dio-petstore.sh" "./bin/dart-petstore.sh" "./bin/dart2-petstore.sh" "./bin/java-play-framework-petstore-server-all.sh" -#"./bin/elm-petstore-all.sh" +"./bin/elm-petstore-all.sh" "./bin/meta-codegen.sh" # OTHERS "./bin/utils/export_docs_generators.sh" "./bin/utils/copy-to-website.sh" "./bin/utils/export_generators_readme.sh") +export JAVA_OPTS="-Djava.awt.headless=true" + for script in "${scripts[@]}"; do if eval $script > /dev/null 2>&1; then echo "Executed $script successfully!" diff --git a/bin/utils/export_generator.sh b/bin/utils/export_generator.sh index d3836715df..6ec536aa28 100755 --- a/bin/utils/export_generator.sh +++ b/bin/utils/export_generator.sh @@ -14,4 +14,4 @@ fi executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" -java -jar ${executable} config-help -g ${NAME} --named-header --format markdown --markdown-header -o docs/generators/${NAME}.md +java -jar ${executable} config-help -g "${NAME}" --named-header --format markdown --markdown-header -o "docs/generators/${NAME}.md" diff --git a/bin/windows/csharp-property-changed-petstore.bat b/bin/windows/csharp-property-changed-petstore.bat index 8c1aeca0ee..d4938f7140 100644 --- a/bin/windows/csharp-property-changed-petstore.bat +++ b/bin/windows/csharp-property-changed-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\SwaggerClientWithPropertyChanged --additional-properties=generatePropertyChanged=true,packageGuid={5CD900DE-8266-412F-A758-28E1F9C623D5} +set ags=generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\SwaggerClientWithPropertyChanged --additional-properties=generatePropertyChanged=true,optionalEmitDefaultValues=true,packageGuid={5CD900DE-8266-412F-A758-28E1F9C623D5} java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/dart-client-petstore.bat b/bin/windows/dart-client-petstore.bat index ad44ce96c3..c7a062603f 100755 --- a/bin/windows/dart-client-petstore.bat +++ b/bin/windows/dart-client-petstore.bat @@ -1,12 +1,12 @@ -set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar If Not Exist %executable% ( mvn clean package ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -g dart-jaguar -o samples\client\petstore\dart-jaguar\swagger --additional-properties hideGenerationTimestamp=true,browserClient=false +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart-jaguar -o samples\client\petstore\dart-jaguar\openapi --additional-properties hideGenerationTimestamp=true,browserClient=false java %JAVA_OPTS% -jar %executable% %ags% -set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -g dart-jaguar -o samples\client\petstore\dart-jaguar\flutter_petstore\swagger --additional-properties hideGenerationTimestamp=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart-jaguar -o samples\client\petstore\dart-jaguar\flutter_petstore\openapi --additional-properties hideGenerationTimestamp=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/dart-petstore.bat b/bin/windows/dart-petstore.bat index 155911529f..bda54a2819 100755 --- a/bin/windows/dart-petstore.bat +++ b/bin/windows/dart-petstore.bat @@ -5,11 +5,11 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\swagger --additional-properties hideGenerationTimestamp=true,browserClient=false +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\openapi --additional-properties hideGenerationTimestamp=true,browserClient=false java %JAVA_OPTS% -jar %executable% %ags% -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\swagger-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true java %JAVA_OPTS% -jar %executable% %ags% -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\flutter_petstore\swagger --additional-properties hideGenerationTimestamp=true,browserClient=false +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\flutter_petstore\openapi --additional-properties hideGenerationTimestamp=true,browserClient=false java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/powershell-petsstore.bat b/bin/windows/powershell-petsstore.bat index b7b6f8f893..ca7e08dcaa 100644 --- a/bin/windows/powershell-petsstore.bat +++ b/bin/windows/powershell-petsstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g powershell -o samples\client\petstore\powershell --additional-properties packageGuid=a27b908d-2a20-467f-bc32-af6f3a654ac5,csharpClientPath=$ScriptDir\..\..\petstore\csharp\SwaggerClient +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g powershell -o samples\client\petstore\powershell --additional-properties packageGuid=a27b908d-2a20-467f-bc32-af6f3a654ac5,csharpClientPath=$ScriptDir\..\..\petstore\csharp\OpenAPIClient java %JAVA_OPTS% -jar %executable% %ags% diff --git a/circle.yml b/circle.yml index 504cfb4435..7534998122 100644 --- a/circle.yml +++ b/circle.yml @@ -8,7 +8,7 @@ jobs: # SWAGGER_HOST=http://petstore.swagger.io # SWAGGER_BASE_PATH=/v2 machine: - docker_layer_caching: true + image: circleci/classic:latest working_directory: ~/OpenAPITools/openapi-generator parallelism: 3 shell: /bin/bash --login diff --git a/docs/contributing.md b/docs/contributing.md index 1544d4b197..dee52bd40d 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -89,7 +89,7 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen) To test the templates, please perform the following: -- Update the Petstore sample by running the shell scripts under `bin` and `bin/openapi3` folder. For example, run `./bin/python-client-petstore.sh` and `./bin/openapi3/python-client-petstore.sh` to update the Python PetStore API client under [`samples/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/python) and [`samples/openapi3/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/openapi3/client/petstore/python). For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion) +- Update the Petstore sample by running the shell scripts under `bin` and `bin/openapi3` folder. For example, run `./bin/python-petstore.sh` and `./bin/openapi3/python-petstore.sh` to update the Python PetStore API client under [`samples/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/python) and [`samples/openapi3/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/openapi3/client/petstore/python). For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion) - Run the tests in the sample folder using maven `mvn integration-test -rf :`, e.g. open a shell in `samples/client/petstore/python`, run `mvn integration-test -rf :PythonPetstoreClientTests`. The artifactId of the project can be found in the pom.xml file. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests) - Finally, git commit the updated samples files: `git commit -a` (`git add -A` if added files with new test cases) diff --git a/docs/customization.md b/docs/customization.md index 6b14fedd20..0f868529a6 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -3,9 +3,10 @@ id: customization title: Customization --- -## Creating a new template + +## Custom Generator (and Template) -If none of the templates suit your needs, you can create a brand new template. OpenAPI Generator can help with this, using the `meta` command: +If none of the built-in generators suit your needs and you need to do more than just modify the mustache templates to tweak generated code, you can create a brand new generator and its associated templates. OpenAPI Generator can help with this, using the `meta` command: ```sh java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar meta \ diff --git a/docs/generators.md b/docs/generators.md index 262a9355c5..849200fecb 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -6,137 +6,138 @@ title: Generators List The following generators are available: ## CLIENT generators -* [ada](generators/ada) -* [android](generators/android) -* [apex](generators/apex) -* [bash](generators/bash) -* [c](generators/c) -* [clojure](generators/clojure) -* [cpp-qt5-client](generators/cpp-qt5-client) -* [cpp-restsdk](generators/cpp-restsdk) -* [cpp-tizen](generators/cpp-tizen) -* [csharp](generators/csharp) -* [csharp-dotnet2 (deprecated)](generators/csharp-dotnet2) -* [csharp-netcore](generators/csharp-netcore) -* [dart](generators/dart) -* [dart-jaguar](generators/dart-jaguar) -* [eiffel](generators/eiffel) -* [elixir](generators/elixir) -* [elm](generators/elm) -* [erlang-client](generators/erlang-client) -* [erlang-proper](generators/erlang-proper) -* [flash](generators/flash) -* [go](generators/go) -* [go-experimental (experimental)](generators/go-experimental) -* [groovy](generators/groovy) -* [haskell-http-client](generators/haskell-http-client) -* [java](generators/java) -* [javascript](generators/javascript) -* [javascript-closure-angular](generators/javascript-closure-angular) -* [javascript-flowtyped](generators/javascript-flowtyped) -* [jaxrs-cxf-client](generators/jaxrs-cxf-client) -* [jmeter](generators/jmeter) -* [kotlin](generators/kotlin) -* [lua](generators/lua) -* [nim (beta)](generators/nim) -* [objc](generators/objc) -* [ocaml](generators/ocaml) -* [perl](generators/perl) -* [php](generators/php) -* [powershell](generators/powershell) -* [python](generators/python) -* [python-experimental (experimental)](generators/python-experimental) -* [r](generators/r) -* [ruby](generators/ruby) -* [rust](generators/rust) -* [scala-akka](generators/scala-akka) -* [scala-gatling](generators/scala-gatling) -* [scala-httpclient-deprecated (deprecated)](generators/scala-httpclient-deprecated) -* [scalaz](generators/scalaz) -* [swift2-deprecated (deprecated)](generators/swift2-deprecated) -* [swift3-deprecated (deprecated)](generators/swift3-deprecated) -* [swift4](generators/swift4) -* [typescript-angular](generators/typescript-angular) -* [typescript-angularjs](generators/typescript-angularjs) -* [typescript-aurelia](generators/typescript-aurelia) -* [typescript-axios](generators/typescript-axios) -* [typescript-fetch](generators/typescript-fetch) -* [typescript-inversify](generators/typescript-inversify) -* [typescript-jquery](generators/typescript-jquery) -* [typescript-node](generators/typescript-node) -* [typescript-rxjs](generators/typescript-rxjs) +* [ada](generators/ada.md) +* [android](generators/android.md) +* [apex](generators/apex.md) +* [bash](generators/bash.md) +* [c](generators/c.md) +* [clojure](generators/clojure.md) +* [cpp-qt5-client](generators/cpp-qt5-client.md) +* [cpp-restsdk](generators/cpp-restsdk.md) +* [cpp-tizen](generators/cpp-tizen.md) +* [csharp](generators/csharp.md) +* [csharp-dotnet2 (deprecated)](generators/csharp-dotnet2.md) +* [csharp-netcore](generators/csharp-netcore.md) +* [dart](generators/dart.md) +* [dart-dio](generators/dart-dio.md) +* [dart-jaguar](generators/dart-jaguar.md) +* [eiffel](generators/eiffel.md) +* [elixir](generators/elixir.md) +* [elm](generators/elm.md) +* [erlang-client](generators/erlang-client.md) +* [erlang-proper](generators/erlang-proper.md) +* [flash](generators/flash.md) +* [go](generators/go.md) +* [go-experimental (experimental)](generators/go-experimental.md) +* [groovy](generators/groovy.md) +* [haskell-http-client](generators/haskell-http-client.md) +* [java](generators/java.md) +* [javascript](generators/javascript.md) +* [javascript-closure-angular](generators/javascript-closure-angular.md) +* [javascript-flowtyped](generators/javascript-flowtyped.md) +* [jaxrs-cxf-client](generators/jaxrs-cxf-client.md) +* [jmeter](generators/jmeter.md) +* [kotlin](generators/kotlin.md) +* [lua](generators/lua.md) +* [nim (beta)](generators/nim.md) +* [objc](generators/objc.md) +* [ocaml](generators/ocaml.md) +* [perl](generators/perl.md) +* [php](generators/php.md) +* [powershell](generators/powershell.md) +* [python](generators/python.md) +* [python-experimental (experimental)](generators/python-experimental.md) +* [r](generators/r.md) +* [ruby](generators/ruby.md) +* [rust](generators/rust.md) +* [scala-akka](generators/scala-akka.md) +* [scala-gatling](generators/scala-gatling.md) +* [scala-httpclient-deprecated (deprecated)](generators/scala-httpclient-deprecated.md) +* [scalaz](generators/scalaz.md) +* [swift2-deprecated (deprecated)](generators/swift2-deprecated.md) +* [swift3-deprecated (deprecated)](generators/swift3-deprecated.md) +* [swift4](generators/swift4.md) +* [typescript-angular](generators/typescript-angular.md) +* [typescript-angularjs](generators/typescript-angularjs.md) +* [typescript-aurelia](generators/typescript-aurelia.md) +* [typescript-axios](generators/typescript-axios.md) +* [typescript-fetch](generators/typescript-fetch.md) +* [typescript-inversify](generators/typescript-inversify.md) +* [typescript-jquery](generators/typescript-jquery.md) +* [typescript-node](generators/typescript-node.md) +* [typescript-rxjs](generators/typescript-rxjs.md) ## SERVER generators -* [ada-server](generators/ada-server) -* [aspnetcore](generators/aspnetcore) -* [cpp-pistache-server](generators/cpp-pistache-server) -* [cpp-qt5-qhttpengine-server](generators/cpp-qt5-qhttpengine-server) -* [cpp-restbed-server](generators/cpp-restbed-server) -* [csharp-nancyfx](generators/csharp-nancyfx) -* [erlang-server](generators/erlang-server) -* [fsharp-functions (beta)](generators/fsharp-functions) -* [fsharp-giraffe-server (beta)](generators/fsharp-giraffe-server) -* [go-gin-server](generators/go-gin-server) -* [go-server](generators/go-server) -* [graphql-nodejs-express-server](generators/graphql-nodejs-express-server) -* [haskell](generators/haskell) -* [java-inflector](generators/java-inflector) -* [java-msf4j](generators/java-msf4j) -* [java-pkmst](generators/java-pkmst) -* [java-play-framework](generators/java-play-framework) -* [java-undertow-server](generators/java-undertow-server) -* [java-vertx](generators/java-vertx) -* [jaxrs-cxf](generators/jaxrs-cxf) -* [jaxrs-cxf-cdi](generators/jaxrs-cxf-cdi) -* [jaxrs-cxf-extended](generators/jaxrs-cxf-extended) -* [jaxrs-jersey](generators/jaxrs-jersey) -* [jaxrs-resteasy](generators/jaxrs-resteasy) -* [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap) -* [jaxrs-spec](generators/jaxrs-spec) -* [kotlin-server](generators/kotlin-server) -* [kotlin-spring](generators/kotlin-spring) -* [kotlin-vertx (beta)](generators/kotlin-vertx) -* [nodejs-express-server (beta)](generators/nodejs-express-server) -* [nodejs-server-deprecated (deprecated)](generators/nodejs-server-deprecated) -* [php-laravel](generators/php-laravel) -* [php-lumen](generators/php-lumen) -* [php-silex](generators/php-silex) -* [php-slim](generators/php-slim) -* [php-symfony](generators/php-symfony) -* [php-ze-ph](generators/php-ze-ph) -* [python-aiohttp](generators/python-aiohttp) -* [python-blueplanet](generators/python-blueplanet) -* [python-flask](generators/python-flask) -* [ruby-on-rails](generators/ruby-on-rails) -* [ruby-sinatra](generators/ruby-sinatra) -* [rust-server](generators/rust-server) -* [scala-finch](generators/scala-finch) -* [scala-lagom-server](generators/scala-lagom-server) -* [scala-play-server](generators/scala-play-server) -* [scalatra](generators/scalatra) -* [spring](generators/spring) +* [ada-server](generators/ada-server.md) +* [aspnetcore](generators/aspnetcore.md) +* [cpp-pistache-server](generators/cpp-pistache-server.md) +* [cpp-qt5-qhttpengine-server](generators/cpp-qt5-qhttpengine-server.md) +* [cpp-restbed-server](generators/cpp-restbed-server.md) +* [csharp-nancyfx](generators/csharp-nancyfx.md) +* [erlang-server](generators/erlang-server.md) +* [fsharp-functions (beta)](generators/fsharp-functions.md) +* [fsharp-giraffe-server (beta)](generators/fsharp-giraffe-server.md) +* [go-gin-server](generators/go-gin-server.md) +* [go-server](generators/go-server.md) +* [graphql-nodejs-express-server](generators/graphql-nodejs-express-server.md) +* [haskell](generators/haskell.md) +* [java-inflector](generators/java-inflector.md) +* [java-msf4j](generators/java-msf4j.md) +* [java-pkmst](generators/java-pkmst.md) +* [java-play-framework](generators/java-play-framework.md) +* [java-undertow-server](generators/java-undertow-server.md) +* [java-vertx](generators/java-vertx.md) +* [jaxrs-cxf](generators/jaxrs-cxf.md) +* [jaxrs-cxf-cdi](generators/jaxrs-cxf-cdi.md) +* [jaxrs-cxf-extended](generators/jaxrs-cxf-extended.md) +* [jaxrs-jersey](generators/jaxrs-jersey.md) +* [jaxrs-resteasy](generators/jaxrs-resteasy.md) +* [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap.md) +* [jaxrs-spec](generators/jaxrs-spec.md) +* [kotlin-server](generators/kotlin-server.md) +* [kotlin-spring](generators/kotlin-spring.md) +* [kotlin-vertx (beta)](generators/kotlin-vertx.md) +* [nodejs-express-server (beta)](generators/nodejs-express-server.md) +* [nodejs-server-deprecated (deprecated)](generators/nodejs-server-deprecated.md) +* [php-laravel](generators/php-laravel.md) +* [php-lumen](generators/php-lumen.md) +* [php-silex](generators/php-silex.md) +* [php-slim](generators/php-slim.md) +* [php-symfony](generators/php-symfony.md) +* [php-ze-ph](generators/php-ze-ph.md) +* [python-aiohttp](generators/python-aiohttp.md) +* [python-blueplanet](generators/python-blueplanet.md) +* [python-flask](generators/python-flask.md) +* [ruby-on-rails](generators/ruby-on-rails.md) +* [ruby-sinatra](generators/ruby-sinatra.md) +* [rust-server](generators/rust-server.md) +* [scala-finch](generators/scala-finch.md) +* [scala-lagom-server](generators/scala-lagom-server.md) +* [scala-play-server](generators/scala-play-server.md) +* [scalatra](generators/scalatra.md) +* [spring](generators/spring.md) ## DOCUMENTATION generators -* [asciidoc](generators/asciidoc) -* [cwiki](generators/cwiki) -* [dynamic-html](generators/dynamic-html) -* [html](generators/html) -* [html2](generators/html2) -* [openapi](generators/openapi) -* [openapi-yaml](generators/openapi-yaml) +* [asciidoc](generators/asciidoc.md) +* [cwiki](generators/cwiki.md) +* [dynamic-html](generators/dynamic-html.md) +* [html](generators/html.md) +* [html2](generators/html2.md) +* [openapi](generators/openapi.md) +* [openapi-yaml](generators/openapi-yaml.md) ## SCHEMA generators -* [avro-schema (beta)](generators/avro-schema) -* [mysql-schema](generators/mysql-schema) +* [avro-schema (beta)](generators/avro-schema.md) +* [mysql-schema](generators/mysql-schema.md) ## CONFIG generators -* [apache2](generators/apache2) -* [graphql-schema](generators/graphql-schema) -* [protobuf-schema (beta)](generators/protobuf-schema) +* [apache2](generators/apache2.md) +* [graphql-schema](generators/graphql-schema.md) +* [protobuf-schema (beta)](generators/protobuf-schema.md) diff --git a/docs/generators/README.md b/docs/generators/README.md index 6c3328cc07..070ef96c15 100644 --- a/docs/generators/README.md +++ b/docs/generators/README.md @@ -14,6 +14,7 @@ The following generators are available: - [csharp-dotnet2](csharp-dotnet2.md) - [csharp-refactor](csharp-refactor.md) - [dart](dart.md) + - [dart-dio](dart-dio.md) - [dart-jaguar](dart-jaguar.md) - [eiffel](eiffel.md) - [elixir](elixir.md) diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index a49975a36f..c775d88e23 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-ada-server title: Config Options for ada-server sidebar_label: ada-server --- diff --git a/docs/generators/ada.md b/docs/generators/ada.md index ae6eb354c5..6cd00504f8 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-ada title: Config Options for ada sidebar_label: ada --- diff --git a/docs/generators/android.md b/docs/generators/android.md index e35957538f..a71797f303 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-android title: Config Options for android sidebar_label: android --- diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index d85036b228..2cefacb296 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-config-apache2 title: Config Options for apache2 sidebar_label: apache2 --- diff --git a/docs/generators/apex.md b/docs/generators/apex.md index f90183b34a..82314835f3 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-apex title: Config Options for apex sidebar_label: apex --- diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index d33cab1f7e..d006841c69 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-asciidoc title: Config Options for asciidoc sidebar_label: asciidoc --- diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 387832c1ab..761ba0f0c4 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-aspnetcore title: Config Options for aspnetcore sidebar_label: aspnetcore --- diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index 9b06b1c6d4..f8f924aaf8 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-schema-avro-schema title: Config Options for avro-schema sidebar_label: avro-schema --- diff --git a/docs/generators/bash.md b/docs/generators/bash.md index 4f86359354..35e442ddd8 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-bash title: Config Options for bash sidebar_label: bash --- diff --git a/docs/generators/c.md b/docs/generators/c.md index 0a910b40d2..f7be8e3b0b 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-c title: Config Options for c sidebar_label: c --- diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 239b3b4414..3538661573 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-clojure title: Config Options for clojure sidebar_label: clojure --- diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index 2ffeb59cc7..b925ffc175 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-cpp-pistache-server title: Config Options for cpp-pistache-server sidebar_label: cpp-pistache-server --- diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index fb3cd18844..4d98d7b370 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-cpp-qt5-client title: Config Options for cpp-qt5-client sidebar_label: cpp-qt5-client --- diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md index 171c325638..19f7852a09 100644 --- a/docs/generators/cpp-qt5-qhttpengine-server.md +++ b/docs/generators/cpp-qt5-qhttpengine-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-cpp-qt5-qhttpengine-server title: Config Options for cpp-qt5-qhttpengine-server sidebar_label: cpp-qt5-qhttpengine-server --- diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index d5afa990cf..1dde370533 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-cpp-restbed-server title: Config Options for cpp-restbed-server sidebar_label: cpp-restbed-server --- diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 1ff8eeafce..0518392adf 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-cpp-restsdk title: Config Options for cpp-restsdk sidebar_label: cpp-restsdk --- diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index aaf57194b8..5fd840afc6 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-cpp-tizen title: Config Options for cpp-tizen sidebar_label: cpp-tizen --- diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index 319b2b190f..b4d4ffccf9 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-csharp-dotnet2 title: Config Options for csharp-dotnet2 sidebar_label: csharp-dotnet2 --- diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index 69d0504926..b436a6b4b2 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-csharp-nancyfx title: Config Options for csharp-nancyfx sidebar_label: csharp-nancyfx --- diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 4056307500..62b36ff676 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-csharp-netcore title: Config Options for csharp-netcore sidebar_label: csharp-netcore --- diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 0ebac9b677..bac7b07b4d 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-csharp title: Config Options for csharp sidebar_label: csharp --- @@ -21,6 +19,7 @@ sidebar_label: csharp |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| |optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| +|optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| |optionalProjectFile|Generate {PackageName}.csproj.| |true| |generatePropertyChanged|Specifies a AssemblyDescription for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |false| |nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index b53ea9d11b..94f6935727 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-cwiki title: Config Options for cwiki sidebar_label: cwiki --- diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md new file mode 100644 index 0000000000..0841a791b9 --- /dev/null +++ b/docs/generators/dart-dio.md @@ -0,0 +1,19 @@ +--- +title: Config Options for dart-dio +sidebar_label: dart-dio +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|browserClient|Is the client browser based (for Dart 1.x only)| |null| +|pubName|Name in generated pubspec| |null| +|pubVersion|Version in generated pubspec| |null| +|pubDescription|Description in generated pubspec| |null| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|sourceFolder|Source folder for generated code| |null| +|supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| +|nullableFields|Is the null fields should be in the JSON payload| |null| diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index f5f4a62e44..5aced17556 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-dart-jaguar title: Config Options for dart-jaguar sidebar_label: dart-jaguar --- diff --git a/docs/generators/dart.md b/docs/generators/dart.md index b66afda1c5..07002e8493 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-dart title: Config Options for dart sidebar_label: dart --- diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index 0d9709da95..02869930ab 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-dynamic-html title: Config Options for dynamic-html sidebar_label: dynamic-html --- diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index 9f3a27dca1..fb6b8d9cb9 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-eiffel title: Config Options for eiffel sidebar_label: eiffel --- diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index bcf7e8ccf2..276eb44397 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-elixir title: Config Options for elixir sidebar_label: elixir --- diff --git a/docs/generators/elm.md b/docs/generators/elm.md index 2782d13e9f..922560cd6d 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-elm title: Config Options for elm sidebar_label: elm --- diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index 7ff4cd4128..675e15f80f 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-erlang-client title: Config Options for erlang-client sidebar_label: erlang-client --- diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 1038343f8e..57187fdf49 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-erlang-proper title: Config Options for erlang-proper sidebar_label: erlang-proper --- diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index f469fc445e..8e109cd37d 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-erlang-server title: Config Options for erlang-server sidebar_label: erlang-server --- diff --git a/docs/generators/flash.md b/docs/generators/flash.md index b91ea54475..53312f0fb4 100644 --- a/docs/generators/flash.md +++ b/docs/generators/flash.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-flash title: Config Options for flash sidebar_label: flash --- diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index b7a8ee7825..be33609bb5 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-fsharp-functions title: Config Options for fsharp-functions sidebar_label: fsharp-functions --- diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index 6d965b2251..bec1994334 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-fsharp-giraffe-server title: Config Options for fsharp-giraffe-server sidebar_label: fsharp-giraffe-server --- diff --git a/docs/generators/go-experimental.md b/docs/generators/go-experimental.md index dc84d5336f..1c12640231 100644 --- a/docs/generators/go-experimental.md +++ b/docs/generators/go-experimental.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-go-experimental title: Config Options for go-experimental sidebar_label: go-experimental --- diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index 6c1fa05997..445f3c2d16 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-go-gin-server title: Config Options for go-gin-server sidebar_label: go-gin-server --- diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index aa3bcc45d5..a2094d8260 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-go-server title: Config Options for go-server sidebar_label: go-server --- diff --git a/docs/generators/go.md b/docs/generators/go.md index 4fc2af486d..f9de91d1b9 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-go title: Config Options for go sidebar_label: go --- diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index 5b91534f5d..3ab10107cf 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-graphql-nodejs-express-server title: Config Options for graphql-nodejs-express-server sidebar_label: graphql-nodejs-express-server --- diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index a6d39fd624..83b90af0be 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-config-graphql-schema title: Config Options for graphql-schema sidebar_label: graphql-schema --- diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index e5ac52bafb..7dcf10b077 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-groovy title: Config Options for groovy sidebar_label: groovy --- diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index b26bd8be10..8f5285cb24 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-haskell-http-client title: Config Options for haskell-http-client sidebar_label: haskell-http-client --- diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 3692c19bb3..96cfde1fa9 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-haskell title: Config Options for haskell sidebar_label: haskell --- diff --git a/docs/generators/html.md b/docs/generators/html.md index 92344614c4..a85ea85aef 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-html title: Config Options for html sidebar_label: html --- diff --git a/docs/generators/html2.md b/docs/generators/html2.md index aef588fb5e..d1726b72a5 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-html2 title: Config Options for html2 sidebar_label: html2 --- diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 6ec301dc80..4d3c774468 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-inflector title: Config Options for java-inflector sidebar_label: java-inflector --- diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index bc9bb52f2f..543aa97f82 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-msf4j title: Config Options for java-msf4j sidebar_label: java-msf4j --- diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 0c8fd296c3..6d33790e60 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-pkmst title: Config Options for java-pkmst sidebar_label: java-pkmst --- diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 242f25b221..b7fa80b582 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-play-framework title: Config Options for java-play-framework sidebar_label: java-play-framework --- diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index dc99309dbd..c620227b1e 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-undertow-server title: Config Options for java-undertow-server sidebar_label: java-undertow-server --- diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index e3d2946a3a..e285f021a1 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-vertx title: Config Options for java-vertx sidebar_label: java-vertx --- diff --git a/docs/generators/java.md b/docs/generators/java.md index 6637e95eed..2ac7fbeaab 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-java title: Config Options for java sidebar_label: java --- diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index eef6edb7c7..d736d131cf 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-javascript-closure-angular title: Config Options for javascript-closure-angular sidebar_label: javascript-closure-angular --- diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 18c53c560d..946c1d086c 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-javascript-flowtyped title: Config Options for javascript-flowtyped sidebar_label: javascript-flowtyped --- diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 6185e55ffd..3fcf9cc6c0 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-javascript title: Config Options for javascript sidebar_label: javascript --- diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 65def91168..e90da21468 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-cxf-cdi title: Config Options for jaxrs-cxf-cdi sidebar_label: jaxrs-cxf-cdi --- diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index af5175db62..8b9ea2186a 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-jaxrs-cxf-client title: Config Options for jaxrs-cxf-client sidebar_label: jaxrs-cxf-client --- diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index e81cde7b51..df0d2004bd 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-cxf-extended title: Config Options for jaxrs-cxf-extended sidebar_label: jaxrs-cxf-extended --- diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 346dce1aa9..bae14d53f1 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-cxf title: Config Options for jaxrs-cxf sidebar_label: jaxrs-cxf --- diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index a3172382b7..16419d4bf5 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-jersey title: Config Options for jaxrs-jersey sidebar_label: jaxrs-jersey --- diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 7924fb953c..615d570260 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-resteasy-eap title: Config Options for jaxrs-resteasy-eap sidebar_label: jaxrs-resteasy-eap --- diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index c85dc5cc30..885caa8896 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-resteasy title: Config Options for jaxrs-resteasy sidebar_label: jaxrs-resteasy --- diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 1bf741aad8..e70657aa2f 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-spec title: Config Options for jaxrs-spec sidebar_label: jaxrs-spec --- diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 6771efad16..9872d3b347 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-jmeter title: Config Options for jmeter sidebar_label: jmeter --- diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 54e62dcf20..eb66b331ff 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-kotlin-server title: Config Options for kotlin-server sidebar_label: kotlin-server --- diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index ca5e09b8fb..843d178012 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-kotlin-spring title: Config Options for kotlin-spring sidebar_label: kotlin-spring --- diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 03e2d0dd1f..6c50f140b7 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-kotlin-vertx title: Config Options for kotlin-vertx sidebar_label: kotlin-vertx --- diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 719ed37acc..ec9a4e0332 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-kotlin title: Config Options for kotlin sidebar_label: kotlin --- @@ -19,4 +17,4 @@ sidebar_label: kotlin |serializableModel|boolean - toggle "implements Serializable" for generated models| |null| |dateLibrary|Option. Date library to use|
**string**
String
**java8**
Java 8 native JSR310 (jvm only)
**threetenbp**
Threetenbp (jvm only)
|java8| |collectionType|Option. Collection type to use|
**array**
kotlin.Array
**list**
kotlin.collections.List
|array| -|library|Library template (sub-template) to use|
**jvm**
Platform: Java Virtual Machine. HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.8.1.
**multiplatform**
Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.
|jvm| +|library|Library template (sub-template) to use|
**jvm-okhttp4**
[DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
**jvm-okhttp3**
Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
**multiplatform**
Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.
|jvm-okhttp4| diff --git a/docs/generators/lua.md b/docs/generators/lua.md index 6e9a4ce3f8..b466a5a70f 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-lua title: Config Options for lua sidebar_label: lua --- diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 987e18c1cc..63a48d23da 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-schema-mysql-schema title: Config Options for mysql-schema sidebar_label: mysql-schema --- diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 228226876a..b7bdcee5d8 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-nim title: Config Options for nim sidebar_label: nim --- diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index 25a84db36d..bbe2659c21 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-nodejs-express-server title: Config Options for nodejs-express-server sidebar_label: nodejs-express-server --- diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md index c8741e58f4..13c9424641 100644 --- a/docs/generators/nodejs-server-deprecated.md +++ b/docs/generators/nodejs-server-deprecated.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-nodejs-server-deprecated title: Config Options for nodejs-server-deprecated sidebar_label: nodejs-server-deprecated --- diff --git a/docs/generators/objc.md b/docs/generators/objc.md index 46d3244a13..dff34b94fa 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-objc title: Config Options for objc sidebar_label: objc --- diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index 7397b1c31b..e95ed3c59f 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-ocaml title: Config Options for ocaml sidebar_label: ocaml --- diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 5bc5c74688..5c551d7735 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-openapi-yaml title: Config Options for openapi-yaml sidebar_label: openapi-yaml --- diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index 0846d57708..c0181ddce0 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-openapi title: Config Options for openapi sidebar_label: openapi --- diff --git a/docs/generators/perl.md b/docs/generators/perl.md index b4ef17875f..2cac430a58 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-perl title: Config Options for perl sidebar_label: perl --- diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index 858cad9372..580869441a 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-laravel title: Config Options for php-laravel sidebar_label: php-laravel --- diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index cd3bbd9d67..286804540a 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-lumen title: Config Options for php-lumen sidebar_label: php-lumen --- diff --git a/docs/generators/php-silex.md b/docs/generators/php-silex.md index e417df414b..61241269f8 100644 --- a/docs/generators/php-silex.md +++ b/docs/generators/php-silex.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-silex title: Config Options for php-silex sidebar_label: php-silex --- diff --git a/docs/generators/php-slim.md b/docs/generators/php-slim.md index 5209c10171..d9e188a425 100644 --- a/docs/generators/php-slim.md +++ b/docs/generators/php-slim.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-slim title: Config Options for php-slim sidebar_label: php-slim --- diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index d1d86710b9..04693e48d6 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-symfony title: Config Options for php-symfony sidebar_label: php-symfony --- diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md index 1c57177493..0eab64888b 100644 --- a/docs/generators/php-ze-ph.md +++ b/docs/generators/php-ze-ph.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-ze-ph title: Config Options for php-ze-ph sidebar_label: php-ze-ph --- diff --git a/docs/generators/php.md b/docs/generators/php.md index 934853a157..24c3028d13 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-php title: Config Options for php sidebar_label: php --- diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index 2468c0a085..bef12a7aaf 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-powershell title: Config Options for powershell sidebar_label: powershell --- diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index 87507ed7c8..68edd8d6e2 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-config-protobuf-schema title: Config Options for protobuf-schema sidebar_label: protobuf-schema --- diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index a2ef0d34ff..0a9ad07aee 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-python-aiohttp title: Config Options for python-aiohttp sidebar_label: python-aiohttp --- diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index b5b9e8a05e..ae30ec6f0c 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-python-blueplanet title: Config Options for python-blueplanet sidebar_label: python-blueplanet --- diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index c36f84b4a0..65aaee1985 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-python-experimental title: Config Options for python-experimental sidebar_label: python-experimental --- diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 32d1d913be..f01e68d721 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-python-flask title: Config Options for python-flask sidebar_label: python-flask --- diff --git a/docs/generators/python.md b/docs/generators/python.md index ea43f3be0c..023e92b667 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-python title: Config Options for python sidebar_label: python --- diff --git a/docs/generators/r.md b/docs/generators/r.md index 9d6f83350a..fa257ae0ed 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-r title: Config Options for r sidebar_label: r --- diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index 8f7425fb0f..d55421f8d6 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-ruby-on-rails title: Config Options for ruby-on-rails sidebar_label: ruby-on-rails --- diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index c14f4e4c18..f46767a209 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-ruby-sinatra title: Config Options for ruby-sinatra sidebar_label: ruby-sinatra --- diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index a6af465e75..54e03f1b80 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-ruby title: Config Options for ruby sidebar_label: ruby --- diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index ebffe75be4..9671d82b9f 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-rust-server title: Config Options for rust-server sidebar_label: rust-server --- diff --git a/docs/generators/rust.md b/docs/generators/rust.md index 8841b90123..2f1aa5d747 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-rust title: Config Options for rust sidebar_label: rust --- diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index 28229859c8..ed8b8c7484 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-scala-akka title: Config Options for scala-akka sidebar_label: scala-akka --- diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 7680f37b11..2a38482084 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-scala-finch title: Config Options for scala-finch sidebar_label: scala-finch --- diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index aa2fda8f9c..d4247564fb 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-scala-gatling title: Config Options for scala-gatling sidebar_label: scala-gatling --- diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index 4d39df4935..bd27363467 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-scala-httpclient-deprecated title: Config Options for scala-httpclient-deprecated sidebar_label: scala-httpclient-deprecated --- diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index f6b6a51df5..36fb95eac6 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-scala-lagom-server title: Config Options for scala-lagom-server sidebar_label: scala-lagom-server --- diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index e7b3a46bf6..81ade4afdd 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-scala-play-server title: Config Options for scala-play-server sidebar_label: scala-play-server --- diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index 64d8e2ca98..dba381ee6f 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-scalatra title: Config Options for scalatra sidebar_label: scalatra --- diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index 5ced2bc64d..787c221928 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-scalaz title: Config Options for scalaz sidebar_label: scalaz --- diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 51e46424f0..c122ddcb4d 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-spring title: Config Options for spring sidebar_label: spring --- diff --git a/docs/generators/swift2-deprecated.md b/docs/generators/swift2-deprecated.md index 51e222c2cd..4fa404bfc2 100644 --- a/docs/generators/swift2-deprecated.md +++ b/docs/generators/swift2-deprecated.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-swift2-deprecated title: Config Options for swift2-deprecated sidebar_label: swift2-deprecated --- diff --git a/docs/generators/swift3-deprecated.md b/docs/generators/swift3-deprecated.md index 1041bf6359..73eff0f12f 100644 --- a/docs/generators/swift3-deprecated.md +++ b/docs/generators/swift3-deprecated.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-swift3-deprecated title: Config Options for swift3-deprecated sidebar_label: swift3-deprecated --- diff --git a/docs/generators/swift4.md b/docs/generators/swift4.md index f1035b6db2..3136fb0a7c 100644 --- a/docs/generators/swift4.md +++ b/docs/generators/swift4.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-swift4 title: Config Options for swift4 sidebar_label: swift4 --- diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 598f6c4a54..69104b5212 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-angular title: Config Options for typescript-angular sidebar_label: typescript-angular --- diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index da03265443..ea20c438bf 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-angularjs title: Config Options for typescript-angularjs sidebar_label: typescript-angularjs --- diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 49e909d194..74d84d9a0d 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-aurelia title: Config Options for typescript-aurelia sidebar_label: typescript-aurelia --- diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index efd9e5b4b5..db4f9b84b3 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-axios title: Config Options for typescript-axios sidebar_label: typescript-axios --- diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index ecac8db589..6f806f268a 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-fetch title: Config Options for typescript-fetch sidebar_label: typescript-fetch --- diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 21e7c7dd32..1209dbde06 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-inversify title: Config Options for typescript-inversify sidebar_label: typescript-inversify --- diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index dd63595939..b3ca91bcef 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-jquery title: Config Options for typescript-jquery sidebar_label: typescript-jquery --- diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 60dd406eb3..2d3358b566 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-node title: Config Options for typescript-node sidebar_label: typescript-node --- diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index b2db2dc057..e2b0865294 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-rxjs title: Config Options for typescript-rxjs sidebar_label: typescript-rxjs --- diff --git a/docs/installation.md b/docs/installation.md index 64335db08f..0c555d1350 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -68,7 +68,7 @@ Here's an example generating a Go client: ```bash docker run --rm \ -v ${PWD}:/local openapitools/openapi-generator-cli generate \ - -i petstore.yaml \ + -i /local/petstore.yaml \ -g go \ -o /local/out/go ``` diff --git a/docs/templating.md b/docs/templating.md index 287f8060c9..04c512e7c1 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -5,6 +5,8 @@ title: Using Templates It's easy to work with templates for codegen! +For maybe 90% of use cases, you will only need to modify the mustache template files to create your own custom generated code. If you need to include additional files in your generated output, manipulate the OpenAPI document inputs, or implement your own vendor extensions or other logic, you'll want to read [customization](./customization.md) after you read this document. Be sure to start here first, because templating is the easier concept and you'll need it for more advanced use cases. + The generator workflow has [transforming logic](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages) as well as templates for each generation of code. Each generator will create a data structure from the OpenAPI document; OpenAPI 2.0 and OpenAPI 3.x documents are normalized into the same API model within the generator. This model is then applied to the templates. While generators do not need to perform transformations, it's often necessary in order to add more advanced support for your language or framework. You may need to refer to the generator implementation to understand some of the logic while creating or customizing templates (see [ScalaFinchServerCodegen.java](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java) for an advanced example). diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java index f81019b778..5806bc6312 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java @@ -53,7 +53,8 @@ public class OpenAPIGenerator { ConfigHelp.class, Validate.class, Version.class, - CompletionCommand.class + CompletionCommand.class, + GenerateBatch.class ); try { diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java index 698e400c5d..dfd9296eef 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java @@ -148,16 +148,13 @@ public class ConfigHelp implements Runnable { } private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { - sb.append(newline); - if (Boolean.TRUE.equals(markdownHeader)) { sb.append("---").append(newline); - sb.append("id: generator-opts-").append(config.getTag().toValue()).append("-") - .append(config.getName()).append(newline); sb.append("title: Config Options for ").append(generatorName).append(newline); sb.append("sidebar_label: ").append(generatorName).append(newline); sb.append("---").append(newline); } else { + sb.append(newline); sb.append("## CONFIG OPTIONS"); if (Boolean.TRUE.equals(namedHeader)) { diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java new file mode 100644 index 0000000000..07d9eb9d44 --- /dev/null +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java @@ -0,0 +1,268 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.cmd; + +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.LoggerContext; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.TreeNode; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.deser.BeanDeserializerModifier; +import com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.node.ObjectNode; +import io.airlift.airline.Arguments; +import io.airlift.airline.Command; +import io.airlift.airline.Option; +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.CodegenConfig; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.config.CodegenConfigurator; +import org.openapitools.codegen.config.DynamicSettings; +import org.openapitools.codegen.config.GlobalSettings; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.Locale; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +@SuppressWarnings({"unused", "MismatchedQueryAndUpdateOfCollection"}) +@Command(name = "batch", description = "Generate code in batch via external configs.", hidden = true) +public class GenerateBatch implements Runnable { + + private static final Logger LOGGER = LoggerFactory.getLogger(GenerateBatch.class); + + @Option(name = {"-v", "--verbose"}, description = "verbose mode") + private Boolean verbose; + + @Option(name = {"-r", "--threads"}, description = "thread count") + private Integer threads; + + @Arguments(description = "Generator configuration files.", required = true) + private List configs; + + @Option(name = {"--fail-fast"}, description = "fail fast on any errors") + private Boolean failFast; + + @Option(name = {"--timeout"}, description = "execution timeout (minutes)") + private Integer timeout; + + @Option(name = {"--includes-base-dir"}, description = "base directory used for includes") + private String includes; + + @Option(name = {"--root-dir"}, description = "root directory used output/includes (includes can be overridden)") + private String root; + + /** + * When an object implementing interface Runnable is used + * to create a thread, starting the thread causes the object's + * run method to be called in that separately executing + * thread. + *

+ * The general contract of the method run is that it may + * take any action whatsoever. + * + * @see Thread#run() + */ + @Override + public void run() { + if (configs.size() < 1) { + LOGGER.error("No configuration file inputs specified"); + System.exit(1); + } + + int cores = Runtime.getRuntime().availableProcessors(); + int numThreads = 2 * cores; + if (null != threads && (threads > 0 && threads < Thread.activeCount())) { + numThreads = threads; + } + + // This allows us to put meta-configs in a different file from referenced configs. + // If not specified, we'll assume it's the parent directory of the first file. + File includesDir; + if (includes != null) { + includesDir = new File(includes); + } else { + Path first = Paths.get(configs.get(0)); + includesDir = first.getParent().toFile(); + } + + Path rootDir; + if (root != null) { + rootDir = Paths.get(root); + } else { + rootDir = Paths.get(System.getProperty("user.dir")); + } + + LOGGER.info(String.format(Locale.ROOT, "Batch generation using %d threads.\nIncludes: %s\nRoot: %s", numThreads, includesDir.getAbsolutePath(), rootDir.toAbsolutePath().toString())); + + // Create a module which loads our config files, but supports a special "!include" key which can point to an existing config file. + // This allows us to create a sort of meta-config which holds configs which are otherwise required at CLI time (via generate task). + // That is, this allows us to create a wrapper config for generatorName, inputSpec, outputDir, etc. + SimpleModule module = new SimpleModule("GenerateBatch"); + module.setDeserializerModifier(new BeanDeserializerModifier() { + @Override + public JsonDeserializer modifyDeserializer(DeserializationConfig config, + BeanDescription bd, JsonDeserializer original) { + JsonDeserializer result; + if (bd.getBeanClass() == DynamicSettings.class) { + result = new DynamicSettingsRefSupport(original, includesDir); + } else { + result = original; + } + return result; + } + }); + + List configurators = configs.stream().map(config -> CodegenConfigurator.fromFile(config, module)).collect(Collectors.toList()); + + // it doesn't make sense to interleave INFO level logs, so limit these to only ERROR. + LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); + Stream.of(Logger.ROOT_LOGGER_NAME, "io.swagger", "org.openapitools") + .map(lc::getLogger) + .forEach(logger -> logger.setLevel(Level.ERROR)); + + ExecutorService executor = Executors.newFixedThreadPool(numThreads); + + // Execute each configurator on a separate pooled thread. + configurators.forEach(configurator -> executor.execute(new GenerationRunner(configurator, rootDir, Boolean.TRUE.equals(failFast)))); + + executor.shutdown(); + + try { + // Allow the batch job to terminate, never running for more than 30 minutes (defaulted to max 10 minutes) + if (timeout == null) timeout = 10; + int awaitFor = Math.min(Math.max(timeout, 1), 30); + + executor.awaitTermination(awaitFor, TimeUnit.MINUTES); + + System.out.println("COMPLETE."); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + private static class GenerationRunner implements Runnable { + private final CodegenConfigurator configurator; + private final Path rootDir; + private final boolean exitOnError; + + private GenerationRunner(CodegenConfigurator configurator, Path rootDir, boolean failFast) { + this.configurator = configurator; + this.rootDir = rootDir; + this.exitOnError = failFast; + } + + /** + * When an object implementing interface Runnable is used + * to create a thread, starting the thread causes the object's + * run method to be called in that separately executing + * thread. + *

+ * The general contract of the method run is that it may + * take any action whatsoever. + * + * @see Thread#run() + */ + @Override + public void run() { + try { + GlobalSettings.reset(); + + ClientOptInput opts = configurator.toClientOptInput(); + CodegenConfig config = opts.getConfig(); + String name = config.getName(); + + Path target = Paths.get(config.getOutputDir()); + Path updated = rootDir.resolve(target); + config.setOutputDir(updated.toString()); + + System.out.printf(Locale.ROOT, "[%s] Generating %s (outputs to %s)…%n", Thread.currentThread().getName(), name, updated.toString()); + + DefaultGenerator defaultGenerator = new DefaultGenerator(); + defaultGenerator.opts(opts); + + defaultGenerator.generate(); + + System.out.printf(Locale.ROOT, "[%s] Finished generating %s…%n", Thread.currentThread().getName(), name); + } catch (Throwable e) { + System.err.printf(Locale.ROOT, "[%s] Generation failed: (%s) %s%n", Thread.currentThread().getName(), e.getClass().getSimpleName(), e.getMessage()); + e.printStackTrace(System.err); + if (exitOnError) { + System.exit(1); + } + } finally { + GlobalSettings.reset(); + } + } + } + + static class DynamicSettingsRefSupport extends DelegatingDeserializer { + private static final String INCLUDE = "!include"; + private File scanDir; + + DynamicSettingsRefSupport(JsonDeserializer delegate, File scanDir) { + super(delegate); + this.scanDir = scanDir; + } + + @Override + protected JsonDeserializer newDelegatingInstance(JsonDeserializer newDelegatee) { + return new DynamicSettingsRefSupport(newDelegatee, null); + } + + @Override + public Object deserialize(JsonParser p, DeserializationContext ctx) throws IOException { + TreeNode node = p.readValueAsTree(); + JsonNode include = (JsonNode) node.get(INCLUDE); + ObjectMapper codec = (ObjectMapper) ctx.getParser().getCodec(); + + if (include != null) { + String ref = include.textValue(); + if (ref != null) { + File includeFile = scanDir != null ? new File(scanDir, ref) : new File(ref); + if (includeFile.exists()) { + // load the file into the tree node and continue parsing as normal + ((ObjectNode) node).remove(INCLUDE); + + JsonParser includeParser = codec.getFactory().createParser(includeFile); + TreeNode includeNode = includeParser.readValueAsTree(); + + ObjectReader reader = codec.readerForUpdating(node); + TreeNode updated = reader.readValue(includeFile); + JsonParser updatedParser = updated.traverse(); + updatedParser.nextToken(); + return super.deserialize(updatedParser, ctx); + } + } + } + + JsonParser newParser = node.traverse(); + newParser.nextToken(); + return super.deserialize(newParser, ctx); + } + } +} diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java index 340afe9339..a9270dc41d 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java @@ -96,7 +96,7 @@ public class ListGenerators implements Runnable { GeneratorMetadata meta = generator.getGeneratorMetadata(); if (docusaurus) { sb.append("* "); - String id = "generators/" + generator.getName(); + String id = "generators/" + generator.getName() + ".md"; sb.append("[").append(generator.getName()); if (meta != null && meta.getStability() != null && meta.getStability() != Stability.STABLE) { diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java index 3672506d21..e36ed64db1 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java @@ -19,7 +19,6 @@ package org.openapitools.codegen.online.model; import com.fasterxml.jackson.databind.JsonNode; import io.swagger.annotations.ApiModelProperty; -import io.swagger.models.auth.SecuritySchemeDefinition; import io.swagger.v3.parser.core.models.AuthorizationValue; import java.util.Map; @@ -28,7 +27,6 @@ public class GeneratorInput { private JsonNode spec; private Map options; private String openAPIUrl; - private SecuritySchemeDefinition auth; private AuthorizationValue authorizationValue; public AuthorizationValue getAuthorizationValue() { @@ -63,14 +61,4 @@ public class GeneratorInput { public void setOpenAPIUrl(String url) { this.openAPIUrl = url; } - - @Deprecated - public SecuritySchemeDefinition getSecurityDefinition() { - return auth; - } - - @Deprecated - public void setSecurityDefinition(SecuritySchemeDefinition auth) { - this.auth = auth; - } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index fa6d51ffb0..8a1c158c9f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -168,6 +168,9 @@ public class CodegenConstants { public static final String OPTIONAL_ASSEMBLY_INFO = "optionalAssemblyInfo"; public static final String OPTIONAL_ASSEMBLY_INFO_DESC = "Generate AssemblyInfo.cs."; + public static final String OPTIONAL_EMIT_DEFAULT_VALUES = "optionalEmitDefaultValues"; + public static final String OPTIONAL_EMIT_DEFAULT_VALUES_DESC = "Set DataMember's EmitDefaultValue."; + public static final String NETCORE_PROJECT_FILE = "netCoreProjectFile"; public static final String NETCORE_PROJECT_FILE_DESC = "Use the new format (.NET Core) for .NET project files (.csproj)."; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java index 3160bbd9a2..1758abb2a1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java @@ -9,6 +9,7 @@ import java.util.Set; public class CodegenDiscriminator { private String propertyName; + private String propertyBaseName; private Map mapping; private Set mappedModels = new LinkedHashSet<>(); @@ -20,6 +21,14 @@ public class CodegenDiscriminator { this.propertyName = propertyName; } + public String getPropertyBaseName() { + return propertyBaseName; + } + + public void setPropertyBaseName(String propertyBaseName) { + this.propertyBaseName = propertyBaseName; + } + public Map getMapping() { return mapping; } @@ -67,7 +76,7 @@ public class CodegenDiscriminator { if (o == null || getClass() != o.getClass()) return false; MappedModel that = (MappedModel) o; return Objects.equals(mappingName, that.mappingName) && - Objects.equals(modelName, that.modelName); + Objects.equals(modelName, that.modelName); } @Override @@ -82,8 +91,8 @@ public class CodegenDiscriminator { if (o == null || getClass() != o.getClass()) return false; CodegenDiscriminator that = (CodegenDiscriminator) o; return Objects.equals(propertyName, that.propertyName) && - Objects.equals(mapping, that.mapping) && - Objects.equals(mappedModels, that.mappedModels); + Objects.equals(mapping, that.mapping) && + Objects.equals(mappedModels, that.mappedModels); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 9a410941b0..ab3ef8b418 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -1958,6 +1958,7 @@ public class DefaultCodegen implements CodegenConfig { } CodegenDiscriminator discriminator = new CodegenDiscriminator(); discriminator.setPropertyName(toVarName(schema.getDiscriminator().getPropertyName())); + discriminator.setPropertyBaseName(schema.getDiscriminator().getPropertyName()); discriminator.setMapping(schema.getDiscriminator().getMapping()); if (schema.getDiscriminator().getMapping() != null && !schema.getDiscriminator().getMapping().isEmpty()) { for (Entry e : schema.getDiscriminator().getMapping().entrySet()) { @@ -2664,6 +2665,11 @@ public class DefaultCodegen implements CodegenConfig { op.isResponseFile = Boolean.TRUE; } } + op.responses.sort((a, b) -> { + int aDefault = "0".equals(a.code) ? 1 : 0; + int bDefault = "0".equals(b.code) ? 1 : 0; + return aDefault - bDefault; + }); op.responses.get(op.responses.size() - 1).hasMore = false; if (methodResponse != null) { @@ -4585,7 +4591,7 @@ public class DefaultCodegen implements CodegenConfig { * @param operation Operation * @return a set of MIME types */ - public static Set getProducesInfo(OpenAPI openAPI, Operation operation) { + public static Set getProducesInfo(final OpenAPI openAPI, final Operation operation) { if (operation.getResponses() == null || operation.getResponses().isEmpty()) { return null; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index 8910c16f8a..8201a27b04 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -426,17 +426,22 @@ public class InlineModelResolver { * Generates a unique model name. Non-alphanumeric characters will be replaced * with underscores * + * e.g. io.schema.User_name => io_schema_User_name + * * @param title String title field in the schema if present * @param key String model name + * + * @return if provided the sanitized {@code title}, else the sanitized {@code key} */ private String resolveModelName(String title, String key) { if (title == null) { - // for auto-generated schema name, replace non-alphanumeric characters with underscore - // to avoid bugs with schema look up with inline schema created on the fly - // e.g. io.schema.User_name => io_schema_User_name - return uniqueName(key).replaceAll("[^A-Za-z0-9]", "_"); + if (key == null) { + LOGGER.warn("Found an inline schema without the `title` attribute. Default the model name to InlineObject instead. To have better control of the model naming, define the model separately so that it can be reused throughout the spec."); + return uniqueName("InlineObject"); + } + return uniqueName(sanitizeName(key)); } else { - return uniqueName(title); + return uniqueName(sanitizeName(title)); } } @@ -452,29 +457,31 @@ public class InlineModelResolver { generatedSignature.put(Json.pretty(model), name); } - private String uniqueName(String key) { - if (key == null) { - key = "InlineObject"; - LOGGER.warn("Found an inline schema without the `title` attribute. Default the model name to InlineObject instead. To have better control of the model naming, define the model separately so that it can be reused throughout the spec."); + /** + * Sanitizes the input so that it's valid name for a class or interface + * + * e.g. 12.schema.User name => _2_schema_User_name + */ + private String sanitizeName(final String name) { + return name + .replaceAll("^[0-9]", "_") // e.g. 12object => _2object + .replaceAll("[^A-Za-z0-9]", "_"); // e.g. io.schema.User name => io_schema_User_name + } + + private String uniqueName(final String name) { + if (openapi.getComponents().getSchemas() == null) { + return name; } + + String uniqueName = name; int count = 0; - boolean done = false; - key = key.replaceAll("/", "_"); // e.g. /me/videos => _me_videos - key = key.replaceAll("[^a-z_\\.A-Z0-9 ]", ""); // FIXME: a parameter - // should not be assigned. Also declare the methods parameters as 'final'. - while (!done) { - String name = key; - if (count > 0) { - name = key + "_" + count; + while (true) { + if (!openapi.getComponents().getSchemas().containsKey(uniqueName)) { + return uniqueName; } - if (openapi.getComponents().getSchemas() == null) { - return name; - } else if (!openapi.getComponents().getSchemas().containsKey(name)) { - return name; - } - count += 1; + uniqueName = name + "_" + ++count; } - return key; + // TODO it would probably be a good idea to check against a list of used uniqueNames to make sure there are no collisions } private void flattenProperties(Map properties, String path) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index 95ac896639..46f74f5473 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -17,6 +17,7 @@ package org.openapitools.codegen.config; +import com.fasterxml.jackson.databind.Module; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.guava.GuavaModule; import io.swagger.parser.OpenAPIParser; @@ -74,7 +75,8 @@ public class CodegenConfigurator { } - public static CodegenConfigurator fromFile(String configFile) { + @SuppressWarnings("DuplicatedCode") + public static CodegenConfigurator fromFile(String configFile, Module... modules) { if (isNotEmpty(configFile)) { ObjectMapper mapper; @@ -85,13 +87,52 @@ public class CodegenConfigurator { mapper = Json.mapper(); } + if (modules != null && modules.length > 0) { + mapper.registerModules(modules); + } + mapper.registerModule(new GuavaModule()); try { DynamicSettings settings = mapper.readValue(new File(configFile), DynamicSettings.class); CodegenConfigurator configurator = new CodegenConfigurator(); - configurator.generatorSettingsBuilder = GeneratorSettings.newBuilder(settings.getGeneratorSettings()); - configurator.workflowSettingsBuilder = WorkflowSettings.newBuilder(settings.getWorkflowSettings()); + + GeneratorSettings generatorSettings = settings.getGeneratorSettings(); + WorkflowSettings workflowSettings = settings.getWorkflowSettings(); + + // We copy "cached" properties into configurator so it is appropriately configured with all settings in external files. + // FIXME: target is to eventually move away from CodegenConfigurator properties except gen/workflow settings. + configurator.generatorName = generatorSettings.getGeneratorName(); + configurator.inputSpec = workflowSettings.getInputSpec(); + configurator.templatingEngineName = workflowSettings.getTemplatingEngineName(); + if (workflowSettings.getSystemProperties() != null) { + configurator.systemProperties.putAll(workflowSettings.getSystemProperties()); + } + if(generatorSettings.getInstantiationTypes() != null) { + configurator.instantiationTypes.putAll(generatorSettings.getInstantiationTypes()); + } + if(generatorSettings.getTypeMappings() != null) { + configurator.typeMappings.putAll(generatorSettings.getTypeMappings()); + } + if(generatorSettings.getAdditionalProperties() != null) { + configurator.additionalProperties.putAll(generatorSettings.getAdditionalProperties()); + } + if(generatorSettings.getImportMappings() != null) { + configurator.importMappings.putAll(generatorSettings.getImportMappings()); + } + if(generatorSettings.getLanguageSpecificPrimitives() != null) { + configurator.languageSpecificPrimitives.addAll(generatorSettings.getLanguageSpecificPrimitives()); + } + if(generatorSettings.getReservedWordMappings() != null) { + configurator.reservedWordMappings.putAll(generatorSettings.getReservedWordMappings()); + } + if(generatorSettings.getServerVariables() != null) { + configurator.serverVariables.putAll(generatorSettings.getServerVariables()); + } + + configurator.generatorSettingsBuilder = GeneratorSettings.newBuilder(generatorSettings); + configurator.workflowSettingsBuilder = WorkflowSettings.newBuilder(workflowSettings); + return configurator; } catch (IOException ex) { LOGGER.error("Unable to deserialize config file: " + configFile, ex); @@ -453,12 +494,14 @@ public class CodegenConfigurator { } public ClientOptInput toClientOptInput() { - CodegenConfig config = CodegenConfigLoader.forName(generatorName); - Context context = toContext(); WorkflowSettings workflowSettings = context.getWorkflowSettings(); GeneratorSettings generatorSettings = context.getGeneratorSettings(); + // We load the config via generatorSettings.getGeneratorName() because this is guaranteed to be set + // regardless of entrypoint (CLI sets properties on this type, config deserialization sets on generatorSettings). + CodegenConfig config = CodegenConfigLoader.forName(generatorSettings.getGeneratorName()); + if (isNotEmpty(generatorSettings.getLibrary())) { config.setLibrary(generatorSettings.getLibrary()); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/DynamicSettings.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/DynamicSettings.java index 60164226f2..b49a6e23e3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/DynamicSettings.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/DynamicSettings.java @@ -36,9 +36,14 @@ public class DynamicSettings { */ public GeneratorSettings getGeneratorSettings() { excludeSettingsFromDynamicProperties(); - return GeneratorSettings.newBuilder(generatorSettings) - .withAdditionalProperties(dynamicProperties) - .build(); + GeneratorSettings.Builder builder = GeneratorSettings.newBuilder(generatorSettings); + + // This allows us to put any unknown top-level properties into additionalProperties of the generator object. + for (Map.Entry entry : dynamicProperties.entrySet()) { + builder.withAdditionalProperty(entry.getKey(), entry.getValue()); + } + + return builder.build(); } /** diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java index 5a7ba74f37..05e732b23f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java @@ -331,7 +331,7 @@ abstract public class AbstractAdaCodegen extends DefaultCodegen implements Codeg if (typeMapping.containsKey(schemaType)) { return typeMapping.get(schemaType); } - // LOGGER.info("Swagger type " + schemaType); + // LOGGER.info("OpenAPI type " + schemaType); if (languageSpecificPrimitives.contains(schemaType)) { return schemaType; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 361c64a392..0e73bbc50d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -39,6 +39,7 @@ import static org.openapitools.codegen.utils.StringUtils.camelize; public abstract class AbstractCSharpCodegen extends DefaultCodegen implements CodegenConfig { protected boolean optionalAssemblyInfoFlag = true; + protected boolean optionalEmitDefaultValuesFlag = false; protected boolean optionalProjectFileFlag = true; protected boolean optionalMethodArgumentFlag = true; protected boolean useDateTimeOffsetFlag = false; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 17e89949d4..5a2ccc8154 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -35,12 +35,14 @@ import static org.openapitools.codegen.utils.StringUtils.underscore; public abstract class AbstractGoCodegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractGoCodegen.class); + private static final String NUMERIC_ENUM_PREFIX = "_"; protected boolean withGoCodegenComment = false; protected boolean withXml = false; protected boolean enumClassPrefix = false; protected String packageName = "openapi"; + protected Set numberTypes; public AbstractGoCodegen() { super(); @@ -110,6 +112,13 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege typeMapping.put("ByteArray", "string"); typeMapping.put("object", "map[string]interface{}"); + numberTypes = new HashSet( + Arrays.asList( + "uint", "uint8", "uint16", "uint32", "uint64", + "int", "int8", "int16","int32", "int64", + "float32", "float64") + ); + importMapping = new HashMap(); cliOptions.clear(); @@ -496,7 +505,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege CodegenModel model = (CodegenModel) v; for (CodegenProperty param : model.vars) { if (!addedTimeImport - && "time.Time".equals(param.dataType) || ("[]time.Time".equals(param.dataType))) { + && ("time.Time".equals(param.dataType) || ("[]time.Time".equals(param.dataType)))) { imports.add(createMapping("import", "time")); addedTimeImport = true; } @@ -560,10 +569,10 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege @Override public String toEnumValue(String value, String datatype) { - if ("int".equals(datatype) || "double".equals(datatype) || "float".equals(datatype)) { + if (isNumberType(datatype) || "bool".equals(datatype)) { return value; } else { - return escapeText(value); + return "\"" + escapeText(value) + "\""; } } @@ -579,12 +588,12 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } // number - if ("int".equals(datatype) || "double".equals(datatype) || "float".equals(datatype)) { + if (isNumberType(datatype)) { String varName = name; varName = varName.replaceAll("-", "MINUS_"); varName = varName.replaceAll("\\+", "PLUS_"); varName = varName.replaceAll("\\.", "_DOT_"); - return varName; + return NUMERIC_ENUM_PREFIX + varName; } // for symbol, e.g. $, # @@ -600,7 +609,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege if (isReservedWord(enumName)) { // reserved word return escapeReservedWord(enumName); } else if (enumName.matches("\\d.*")) { // starts with a number - return "_" + enumName; + return NUMERIC_ENUM_PREFIX + enumName; } else { return enumName; } @@ -614,7 +623,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege enumName = enumName.replace("[]", ""); if (enumName.matches("\\d.*")) { // starts with number - return "_" + enumName; + return NUMERIC_ENUM_PREFIX + enumName; } else { return enumName; } @@ -682,4 +691,8 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } } } + + protected boolean isNumberType(String datatype) { + return numberTypes.contains(datatype); + } } 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 da9f4f1419..ddc38ce205 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 @@ -24,6 +24,8 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -31,12 +33,14 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; +import java.util.stream.Collectors; import static org.openapitools.codegen.utils.StringUtils.*; public abstract class AbstractKotlinCodegen extends DefaultCodegen implements CodegenConfig { public static final String SERIALIZATION_LIBRARY_DESC = "What serialization library to use: 'moshi' (default), or 'gson'"; + public enum SERIALIZATION_LIBRARY_TYPE {moshi, gson} private static final Logger LOGGER = LoggerFactory.getLogger(AbstractKotlinCodegen.class); @@ -53,8 +57,10 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co protected String apiDocPath = "docs/"; protected String modelDocPath = "docs/"; protected boolean parcelizeModels = false; - protected boolean serializableModel = false; + protected boolean needsDataClassBody = false; + + protected boolean nonPublicApi = false; protected CodegenConstants.ENUM_PROPERTY_NAMING_TYPE enumPropertyNaming = CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.camelCase; protected SERIALIZATION_LIBRARY_TYPE serializationLibrary = SERIALIZATION_LIBRARY_TYPE.moshi; @@ -232,7 +238,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co @Override public String apiTestFileFolder() { - return (outputFolder + File.separator + testFolder + File.separator + apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar) ; + return (outputFolder + File.separator + testFolder + File.separator + apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar); } @Override @@ -281,7 +287,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co * Sets the serialization engine for Kotlin * * @param enumSerializationLibrary The string representation of the serialization library as defined by - * {@link org.openapitools.codegen.languages.AbstractKotlinCodegen.SERIALIZATION_LIBRARY_TYPE} + * {@link org.openapitools.codegen.languages.AbstractKotlinCodegen.SERIALIZATION_LIBRARY_TYPE} */ public void setSerializationLibrary(final String enumSerializationLibrary) { try { @@ -296,9 +302,9 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co } /** - * returns the swagger type for the property + * returns the OpenAPI type for the property * - * @param p Swagger property object + * @param p OpenAPI property object * @return string presentation of the type **/ @Override @@ -320,7 +326,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co /** * Output the type declaration of the property * - * @param p Swagger Property object + * @param p OpenAPI Property object * @return a string presentation of the property type */ @Override @@ -348,7 +354,20 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co @Override public Map postProcessModels(Map objs) { - return postProcessModelsEnum(super.postProcessModels(objs)); + objs = super.postProcessModelsEnum(objs); + List models = (List) objs.get("models"); + for (Object _mo : models) { + Map mo = (Map) _mo; + CodegenModel cm = (CodegenModel) mo.get("model"); + + for (CodegenProperty var : cm.vars) { + if (var.isEnum || isSerializableModel()) { + cm.vendorExtensions.put("x-has-data-class-body", true); + break; + } + } + } + return postProcessModelsEnum(objs); } @Override @@ -367,8 +386,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co if (additionalProperties.containsKey(CodegenConstants.SERIALIZATION_LIBRARY)) { setSerializationLibrary((String) additionalProperties.get(CodegenConstants.SERIALIZATION_LIBRARY)); additionalProperties.put(this.serializationLibrary.name(), true); - } - else { + } else { additionalProperties.put(this.serializationLibrary.name(), true); } @@ -426,6 +444,12 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co additionalProperties.put(CodegenConstants.PARCELIZE_MODELS, parcelizeModels); } + if (additionalProperties.containsKey(CodegenConstants.NON_PUBLIC_API)) { + this.setNonPublicApi(Boolean.valueOf((String) additionalProperties.get(CodegenConstants.NON_PUBLIC_API))); + } else { + additionalProperties.put(CodegenConstants.NON_PUBLIC_API, nonPublicApi); + } + additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage()); additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage()); @@ -476,6 +500,23 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co public void setSerializableModel(boolean serializableModel) { this.serializableModel = serializableModel; } + + public boolean nonPublicApi() { + return nonPublicApi; + } + + public void setNonPublicApi(boolean nonPublicApi) { + this.nonPublicApi = nonPublicApi; + } + + public boolean isNeedsDataClassBody() { + return needsDataClassBody; + } + + public void setNeedsDataClassBody(boolean needsDataClassBody) { + this.needsDataClassBody = needsDataClassBody; + } + /** * Return the sanitized variable name for enum * @@ -746,6 +787,14 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co return imports; } + @Override + public CodegenModel fromModel(String name, Schema schema) { + CodegenModel m = super.fromModel(name, schema); + m.optionalVars = m.optionalVars.stream().distinct().collect(Collectors.toList()); + m.allVars.stream().filter(p -> !m.vars.contains(p)).forEach(p -> p.isInherited = true); + return m; + } + @Override public String toEnumValue(String value, String datatype) { if ("kotlin.Int".equals(datatype) || "kotlin.Long".equals(datatype)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index 214978d8f2..340c08f3df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -501,7 +501,7 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg /** * Return the default value of the property - * @param p Swagger property object + * @param p OpenAPI property object * @return string presentation of the default value of the property */ @Override 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 f909883602..53381ed9d9 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 @@ -130,24 +130,25 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code } @Override - public String toVarName(String name) { + public String toVarName(final String name) { + String varName; // sanitize name - name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. + varName = sanitizeName(name); // if it's all uppper case, convert to lower case if (name.matches("^[A-Z_]*$")) { - name = name.toLowerCase(Locale.ROOT); + varName = varName.toLowerCase(Locale.ROOT); } // camelize (lower first character) the variable name // petId => pet_id - name = underscore(name); + varName = underscore(varName); // for reserved word or word starting with number, append _ - if (isReservedWord(name) || name.matches("^\\d.*")) { - name = escapeReservedWord(name); + if (isReservedWord(varName) || varName.matches("^\\d.*")) { + varName = escapeReservedWord(varName); } - return name; + return varName; } public String toRegularExpression(String pattern) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java index 0da3aa0378..9ea0d8a7dd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java @@ -43,8 +43,8 @@ public class AvroSchemaCodegen extends DefaultCodegen implements CodegenConfig { outputFolder = "generated-code/avro-schema"; modelTemplateFiles.put("model.mustache", ".avsc"); - apiPackage = "api"; - modelPackage = "model"; + // Force the model package to the package name so import can be fully qualified + modelPackage = packageName; importMapping.clear(); embeddedTemplateDir = templateDir = AVRO; @@ -81,10 +81,12 @@ public class AvroSchemaCodegen extends DefaultCodegen implements CodegenConfig { super.processOpts(); if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) { packageName = (String) additionalProperties.get(CodegenConstants.PACKAGE_NAME); + + // Force the model package to the package name so import can be fully qualified + modelPackage = packageName; } additionalProperties.put("packageName", packageName); - } @Override @@ -132,4 +134,4 @@ public class AvroSchemaCodegen extends DefaultCodegen implements CodegenConfig { return input; } -} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 8141e6f051..2ab520ec3d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -171,6 +171,10 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { CodegenConstants.OPTIONAL_ASSEMBLY_INFO_DESC, this.optionalAssemblyInfoFlag); + addSwitch(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES, + CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES_DESC, + this.optionalEmitDefaultValuesFlag); + addSwitch(CodegenConstants.OPTIONAL_PROJECT_FILE, CodegenConstants.OPTIONAL_PROJECT_FILE_DESC, this.optionalProjectFileFlag); @@ -359,6 +363,12 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { additionalProperties.put(CodegenConstants.OPTIONAL_ASSEMBLY_INFO, optionalAssemblyInfoFlag); } + if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES)) { + setOptionalEmitDefaultValuesFlag(convertPropertyToBooleanAndWriteBack(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES)); + } else { + additionalProperties.put(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES, optionalEmitDefaultValuesFlag); + } + if (additionalProperties.containsKey(CodegenConstants.NON_PUBLIC_API)) { setNonPublicApi(convertPropertyToBooleanAndWriteBack(CodegenConstants.NON_PUBLIC_API)); } else { @@ -537,6 +547,10 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { this.optionalAssemblyInfoFlag = flag; } + public void setOptionalEmitDefaultValuesFlag(boolean flag) { + this.optionalEmitDefaultValuesFlag = flag; + } + @Override public CodegenModel fromModel(String name, Schema model) { Map allDefinitions = ModelUtils.getSchemas(this.openAPI); @@ -605,12 +619,14 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { @Override public void postProcessParameter(CodegenParameter parameter) { postProcessPattern(parameter.pattern, parameter.vendorExtensions); + postProcessEmitDefaultValue(parameter.vendorExtensions); super.postProcessParameter(parameter); } @Override public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { postProcessPattern(property.pattern, property.vendorExtensions); + postProcessEmitDefaultValue(property.vendorExtensions); super.postProcessModelProperty(model, property); } @@ -650,6 +666,10 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { } } + public void postProcessEmitDefaultValue(Map vendorExtensions) { + vendorExtensions.put("x-emit-default-value", optionalEmitDefaultValuesFlag); + } + public void setTargetFramework(String dotnetFramework) { if (!frameworks.containsKey(dotnetFramework)) { LOGGER.warn("Invalid .NET framework version, defaulting to " + this.targetFramework); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java index 73897d8cf7..449e2b8351 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java @@ -80,6 +80,7 @@ public class CppQt5ClientCodegen extends CppQt5AbstractCodegen implements Codege supportingFiles.add(new SupportingFile("HttpFileElement.cpp.mustache", sourceFolder, PREFIX + "HttpFileElement.cpp")); supportingFiles.add(new SupportingFile("object.mustache", sourceFolder, PREFIX + "Object.h")); supportingFiles.add(new SupportingFile("enum.mustache", sourceFolder, PREFIX + "Enum.h")); + supportingFiles.add(new SupportingFile("CMakeLists.txt.mustache", sourceFolder, "CMakeLists.txt")); if (optionalProjectFileFlag) { supportingFiles.add(new SupportingFile("Project.mustache", sourceFolder, "client.pri")); } @@ -103,8 +104,12 @@ public class CppQt5ClientCodegen extends CppQt5AbstractCodegen implements Codege supportingFiles.add(new SupportingFile("helpers-body.mustache", sourceFolder, modelNamePrefix + "Helpers.cpp")); supportingFiles.add(new SupportingFile("HttpRequest.h.mustache", sourceFolder, modelNamePrefix + "HttpRequest.h")); supportingFiles.add(new SupportingFile("HttpRequest.cpp.mustache", sourceFolder, modelNamePrefix + "HttpRequest.cpp")); + supportingFiles.add(new SupportingFile("HttpFileElement.h.mustache", sourceFolder, modelNamePrefix + "HttpFileElement.h")); + supportingFiles.add(new SupportingFile("HttpFileElement.cpp.mustache", sourceFolder, modelNamePrefix + "HttpFileElement.cpp")); supportingFiles.add(new SupportingFile("object.mustache", sourceFolder, modelNamePrefix + "Object.h")); supportingFiles.add(new SupportingFile("enum.mustache", sourceFolder, modelNamePrefix + "Enum.h")); + supportingFiles.add(new SupportingFile("CMakeLists.txt.mustache", sourceFolder, "CMakeLists.txt")); + typeMapping.put("file", modelNamePrefix + "HttpFileElement"); importMapping.put(modelNamePrefix + "HttpFileElement", "#include \"" + modelNamePrefix + "HttpFileElement.h\""); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java new file mode 100644 index 0000000000..5bc9c83280 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -0,0 +1,277 @@ +/* + * 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 org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.CliOption; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.utils.ModelUtils; +import org.openapitools.codegen.utils.ProcessUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +import io.swagger.v3.oas.models.media.Schema; + +import static org.openapitools.codegen.utils.StringUtils.underscore; + +public class DartDioClientCodegen extends DartClientCodegen { + private static final Logger LOGGER = LoggerFactory.getLogger(DartDioClientCodegen.class); + + private static final String NULLABLE_FIELDS = "nullableFields"; + private static final String IS_FORMAT_JSON = "jsonFormat"; + private static final String CLIENT_NAME = "clientName"; + + private static Set modelToIgnore = new HashSet<>(); + + static { + modelToIgnore.add("datetime"); + modelToIgnore.add("map"); + modelToIgnore.add("object"); + modelToIgnore.add("list"); + modelToIgnore.add("file"); + modelToIgnore.add("uint8list"); + } + + private static final String SERIALIZATION_JSON = "json"; + + private boolean nullableFields = true; + private String serialization = SERIALIZATION_JSON; + + public DartDioClientCodegen() { + super(); + browserClient = false; + outputFolder = "generated-code/dart-dio"; + embeddedTemplateDir = templateDir = "dart-dio"; + + //no tests at this time + modelTestTemplateFiles.clear(); + apiTestTemplateFiles.clear(); + + cliOptions.add(new CliOption(NULLABLE_FIELDS, "Is the null fields should be in the JSON payload")); + + typeMapping.put("file", "Uint8List"); + typeMapping.put("binary", "Uint8List"); + + importMapping.put("BuiltList", "built_collection/built_collection"); + importMapping.put("BuiltMap", "built_collection/built_collection"); + } + + @Override + public String getName() { + return "dart-dio"; + } + + @Override + public String getHelp() { + return "Generates a Dart Dio client library."; + } + + @Override + public String toDefaultValue(Schema p) { + if (ModelUtils.isMapSchema(p)) { + return "const {}"; + } else if (ModelUtils.isArraySchema(p)) { + return "const []"; + } + return super.toDefaultValue(p); + } + + @Override + public void processOpts() { + if (StringUtils.isEmpty(System.getenv("DART_POST_PROCESS_FILE"))) { + LOGGER.info("Environment variable DART_POST_PROCESS_FILE not defined so the Dart code may not be properly formatted. To define it, try `export DART_POST_PROCESS_FILE=\"/usr/local/bin/dartfmt -w\"` (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(NULLABLE_FIELDS)) { + nullableFields = convertPropertyToBooleanAndWriteBack(NULLABLE_FIELDS); + } else { + //not set, use to be passed to template + additionalProperties.put(NULLABLE_FIELDS, nullableFields); + } + + additionalProperties.put(IS_FORMAT_JSON, true); + + if (additionalProperties.containsKey(PUB_NAME)) { + this.setPubName((String) additionalProperties.get(PUB_NAME)); + } else { + //not set, use to be passed to template + additionalProperties.put(PUB_NAME, pubName); + } + + if (!additionalProperties.containsKey(CLIENT_NAME)) { + additionalProperties.put(CLIENT_NAME, org.openapitools.codegen.utils.StringUtils.camelize(pubName)); + } + + if (additionalProperties.containsKey(PUB_VERSION)) { + this.setPubVersion((String) additionalProperties.get(PUB_VERSION)); + } else { + //not set, use to be passed to template + additionalProperties.put(PUB_VERSION, pubVersion); + } + + if (additionalProperties.containsKey(PUB_DESCRIPTION)) { + this.setPubDescription((String) additionalProperties.get(PUB_DESCRIPTION)); + } else { + //not set, use to be passed to template + additionalProperties.put(PUB_DESCRIPTION, pubDescription); + } + + if (additionalProperties.containsKey(USE_ENUM_EXTENSION)) { + this.setUseEnumExtension(convertPropertyToBooleanAndWriteBack(USE_ENUM_EXTENSION)); + } else { + // Not set, use to be passed to template. + additionalProperties.put(USE_ENUM_EXTENSION, useEnumExtension); + } + + if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) { + this.setSourceFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER)); + } + + // make api and model doc path available in mustache template + additionalProperties.put("apiDocPath", apiDocPath); + additionalProperties.put("modelDocPath", modelDocPath); + + final String libFolder = sourceFolder + File.separator + "lib"; + supportingFiles.add(new SupportingFile("pubspec.mustache", "", "pubspec.yaml")); + supportingFiles.add(new SupportingFile("analysis_options.mustache", "", "analysis_options.yaml")); + supportingFiles.add(new SupportingFile("apilib.mustache", libFolder, "api.dart")); + supportingFiles.add(new SupportingFile("serializers.mustache", libFolder, "serializers.dart")); + + supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); + supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); + } + + @Override + public Map postProcessModels(Map objs) { + objs = super.postProcessModels(objs); + List models = (List) objs.get("models"); + ProcessUtils.addIndexToProperties(models, 1); + for (Object _mo : models) { + Map mo = (Map) _mo; + Set modelImports = new HashSet<>(); + CodegenModel cm = (CodegenModel) mo.get("model"); + for (String modelImport : cm.imports) { + if (importMapping.containsKey(modelImport)) { + modelImports.add(importMapping.get(modelImport)); + } else { + if (!modelToIgnore.contains(modelImport.toLowerCase(Locale.ROOT))) { + modelImports.add(pubName + "/model/" + underscore(modelImport)); + } + } + } + + cm.imports = modelImports; + cm.vendorExtensions.put("hasVars", cm.vars.size() > 0); + } + return objs; + } + + @Override + public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { + if (nullableFields) { + property.isNullable = true; + } + + if (property.isListContainer) { + //Updates any List properties on a model to a BuiltList. This happens in post processing rather + //than type mapping as we only want this to apply to models, not every other class. + if ("List".equals(property.baseType)) { + property.setDatatype(property.dataType.replaceAll(property.baseType, "BuiltList")); + property.setBaseType("BuiltList"); + model.imports.add("BuiltList"); + } + } + if (property.isMapContainer) { + //Updates any List properties on a model to a BuiltList. This happens in post processing rather + //than type mapping as we only want this to apply to models, not every other class. + if ("Map".equals(property.baseType)) { + property.setDatatype(property.dataType.replaceAll(property.baseType, "BuiltMap")); + property.setBaseType("BuiltMap"); + model.imports.add("BuiltMap"); + } + } + + } + + @Override + public Map postProcessOperationsWithModels(Map objs, List allModels) { + objs = super.postProcessOperationsWithModels(objs, allModels); + Map operations = (Map) objs.get("operations"); + List operationList = (List) operations.get("operation"); + + Set modelImports = new HashSet<>(); + Set fullImports = new HashSet<>(); + + for (CodegenOperation op : operationList) { + op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); + boolean isJson = true; //default to JSON + boolean isForm = false; + boolean isMultipart = false; + if (op.consumes != null) { + for (Map consume : op.consumes) { + if (consume.containsKey("mediaType")) { + String type = consume.get("mediaType"); + isJson = type.equalsIgnoreCase("application/json"); + isForm = type.equalsIgnoreCase("application/x-www-form-urlencoded"); + isMultipart = type.equalsIgnoreCase("multipart/form-data"); + break; + } + } + } + + for (CodegenParameter param : op.bodyParams) { + if (param.baseType != null && param.baseType.equalsIgnoreCase("Uint8List") && isMultipart) { + param.baseType = "MultipartFile"; + param.dataType = "MultipartFile"; + } + } + + op.vendorExtensions.put("isJson", isJson); + op.vendorExtensions.put("isForm", isForm); + op.vendorExtensions.put("isMultipart", isMultipart); + + Set imports = new HashSet<>(); + for (String item : op.imports) { + if (!modelToIgnore.contains(item.toLowerCase(Locale.ROOT))) { + imports.add(underscore(item)); + } else if (item.equalsIgnoreCase("Uint8List")) { + fullImports.add("dart:typed_data"); + } + } + modelImports.addAll(imports); + op.imports = imports; + } + + objs.put("modelImports", modelImports); + objs.put("fullImports", fullImports); + + return objs; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java index 4a3a68d2a8..3f08e337fa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java @@ -381,8 +381,8 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { final String propertyName = cm.discriminator.getPropertyName(); final List allVars = child.allVars.stream() - .filter(var -> !var.baseName.equals(propertyName)) - .collect(Collectors.toList()); + .filter(var -> !var.baseName.equals(propertyName)) + .collect(Collectors.toList()); child.allVars.clear(); child.allVars.addAll(allVars); @@ -415,17 +415,17 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { } private static boolean anyOperationParam(final List operations, final Predicate predicate) { - return operations.stream() - .flatMap(operation -> Stream.of( - operation.bodyParams.stream(), - operation.queryParams.stream(), - operation.pathParams.stream(), - operation.headerParams.stream() - )) - .flatMap(a -> a) - .filter(predicate) - .findAny() - .isPresent(); + return operations.stream() + .flatMap(operation -> Stream.of( + operation.bodyParams.stream(), + operation.queryParams.stream(), + operation.pathParams.stream(), + operation.headerParams.stream() + )) + .flatMap(a -> a) + .filter(predicate) + .findAny() + .isPresent(); } @Override @@ -434,68 +434,49 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { Map objs = (Map) operations.get("operations"); List ops = (List) objs.get("operation"); - final Map> dependencies = new HashMap<>(); + final Set dependencies = new HashSet<>(); for (CodegenOperation op : ops) { - if (ElmVersion.ELM_018.equals(elmVersion)) { + if (ElmVersion.ELM_018.equals(elmVersion)) { // elm 0.18 String path = op.path; for (CodegenParameter param : op.pathParams) { final String var = paramToString("params", param, false, null); - path = path.replace("{" + param.paramName + "}", "\" ++ " + var + " ++ \""); + path = path.replace("{" + param.baseName + "}", "\" ++ " + var + " ++ \""); } op.path = ("\"" + path + "\"").replaceAll(" \\+\\+ \"\"", ""); - } else { - final List paths = Arrays.asList(op.path.substring(1).split("/")); - String path = paths.stream() - .map(str -> str.startsWith("{") && str.endsWith("}") ? str : "\"" + str + "\"") - .collect(Collectors.joining(", ")); - for (CodegenParameter param : op.pathParams) { - String str = paramToString("params", param, false, null); - path = path.replace("{" + param.paramName + "}", str); - } - op.path = path; - - final String query = op.queryParams.stream() - .map(param -> paramToString("params", param, true, "Url.string \"" + param.baseName + "\"")) - .collect(Collectors.joining(", ")); - op.vendorExtensions.put("query", query); - - final String headers = op.headerParams.stream() - .map(param -> paramToString("headers", param, true, "Http.header \"" + param.baseName + "\"")) - .collect(Collectors.joining(", ")); - op.vendorExtensions.put("headers", headers); - // TODO cookies - // TODO forms + } else { // elm 0.19 or later + final List pathParams = Arrays.asList(op.path.substring(1).split("/")).stream() + .map(str -> { + if (str.startsWith("{") && str.endsWith("}")) { + return op.pathParams.stream().filter(p -> str.equals("{" + p.baseName + "}")).findFirst().orElse(null); + } else { + return "\"" + str + "\""; + } + }) + .collect(Collectors.toList()); + op.vendorExtensions.put("pathParams", pathParams); } - if (op.bodyParam != null && !op.bodyParam.isPrimitiveType && !op.bodyParam.isMapContainer) { - final String encoder = (String) op.bodyParam.vendorExtensions.get(ENCODER); - if (encoder != null) { - if (!dependencies.containsKey(op.bodyParam.dataType)) { - dependencies.put(op.bodyParam.dataType, new TreeSet()); - } - } - } - for (CodegenResponse resp : op.responses) { - if (resp.primitiveType || resp.isMapContainer) { + for (CodegenParameter param : op.allParams) { + if (param.isPrimitiveType || param.isContainer || param.isDate || param.isDateTime || param.isUuid) { continue; } - final String decoder = (String) resp.vendorExtensions.get(DECODER); - if (decoder != null) { - if (!dependencies.containsKey(resp.dataType)) { - dependencies.put(resp.dataType, new TreeSet()); - } + dependencies.add(param.dataType); + } + for (CodegenResponse resp : op.responses) { + if (resp.primitiveType || resp.isMapContainer || resp.isDate || resp.isDateTime || resp.isUuid) { + continue; } + dependencies.add(resp.dataType); } } final List elmImports = new ArrayList<>(); - for (Map.Entry> entry : dependencies.entrySet()) { + for (String key : dependencies) { final ElmImport elmImport = new ElmImport(); - final String key = entry.getKey(); elmImport.moduleName = "Data." + key; elmImport.as = key; - elmImport.exposures = entry.getValue(); + elmImport.exposures = new HashSet<>(); elmImport.exposures.add(key); elmImport.hasExposures = true; elmImports.add(elmImport); @@ -589,12 +570,14 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { return Optional.of("String.fromInt"); } else if (property.isFloat || property.isDouble) { return Optional.of("String.fromFloat"); + } else { + return Optional.of(property.dataType + ".toString"); } - throw new RuntimeException("Parameter '" + paramName + "' cannot be converted to a string. Please report the issue."); } private CodegenProperty paramToProperty(final CodegenParameter parameter) { final CodegenProperty property = new CodegenProperty(); + property.dataType = parameter.dataType; property.isEnum = parameter.isEnum; property.isString = parameter.isString; property.isBinary = parameter.isBinary; @@ -754,10 +737,10 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { } private enum DataTypeExposure { - EXPOSED, - INTERNAL, - EXTERNAL, - PRIMITIVE + EXPOSED, + INTERNAL, + EXTERNAL, + PRIMITIVE } private static class ElmImport { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java index e541998cdd..76d2650496 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java @@ -36,14 +36,12 @@ public class GoClientExperimentalCodegen extends GoClientCodegen { outputFolder = "generated-code/go-experimental"; embeddedTemplateDir = templateDir = "go-experimental"; - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.EXPERIMENTAL) - .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.EXPERIMENTAL).build(); } /** - * Configures a friendly name for the generator. This will be used by the generator - * to select the library with the -g flag. + * Configures a friendly name for the generator. This will be used by the + * generator to select the library with the -g flag. * * @return the friendly name for the generator */ @@ -53,7 +51,7 @@ public class GoClientExperimentalCodegen extends GoClientCodegen { } /** - * Returns human-friendly help for the generator. Provide the consumer with help + * Returns human-friendly help for the generator. Provide the consumer with help * tips, parameters here * * @return A string value for the help message @@ -70,24 +68,25 @@ public class GoClientExperimentalCodegen extends GoClientCodegen { } @Override - public Map postProcessModels(Map objs) { + public Map postProcessModels(Map objs) { objs = super.postProcessModels(objs); - List> imports = (List>) objs.get("imports"); - boolean addedErrorsImport = false; List> models = (List>) objs.get("models"); for (Map m : models) { Object v = m.get("model"); if (v instanceof CodegenModel) { CodegenModel model = (CodegenModel) v; - if (!model.isEnum) { - imports.add(createMapping("import", "encoding/json")); + if (model.isEnum) { + continue; } + for (CodegenProperty param : model.vars) { - if (!addedErrorsImport && param.required) { - imports.add(createMapping("import", "errors")); - addedErrorsImport = true; + if (!param.isNullable) { + continue; } + + param.dataType = "Nullable" + Character.toUpperCase(param.dataType.charAt(0)) + + param.dataType.substring(1); } } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 0543ff391e..4f41bf090b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -31,6 +31,8 @@ import java.util.Map; public class KotlinClientCodegen extends AbstractKotlinCodegen { protected static final String JVM = "jvm"; + protected static final String JVM_OKHTTP4 = "jvm-okhttp4"; + protected static final String JVM_OKHTTP3 = "jvm-okhttp3"; protected static final String MULTIPLATFORM = "multiplatform"; public static final String DATE_LIBRARY = "dateLibrary"; @@ -101,14 +103,15 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { collectionType.setDefault(this.collectionType); cliOptions.add(collectionType); - supportedLibraries.put(JVM, "Platform: Java Virtual Machine. HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.8.1."); + supportedLibraries.put(JVM_OKHTTP4, "[DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0."); + supportedLibraries.put(JVM_OKHTTP3, "Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0."); supportedLibraries.put(MULTIPLATFORM, "Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0."); CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "Library template (sub-template) to use"); libraryOption.setEnum(supportedLibraries); - libraryOption.setDefault(JVM); + libraryOption.setDefault(JVM_OKHTTP4); cliOptions.add(libraryOption); - setLibrary(JVM); + setLibrary(JVM_OKHTTP4); } public CodegenType getTag() { @@ -156,8 +159,17 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { supportingFiles.add(new SupportingFile("infrastructure/RequestConfig.kt.mustache", infrastructureFolder, "RequestConfig.kt")); supportingFiles.add(new SupportingFile("infrastructure/RequestMethod.kt.mustache", infrastructureFolder, "RequestMethod.kt")); - if (JVM.equals(getLibrary())) { + if (isJVMLibrary()) { additionalProperties.put(JVM, true); + + if (JVM_OKHTTP4.equals(getLibrary())) { + additionalProperties.put(JVM_OKHTTP4, true); + } else if (JVM_OKHTTP3.equals(getLibrary())) { + additionalProperties.put(JVM_OKHTTP3, true); + } + + supportedLibraries.put(JVM, "A workaround to use the same template folder for both 'jvm-okhttp3' and 'jvm-okhttp4'."); + setLibrary(JVM); // jvm specific supporting files supportingFiles.add(new SupportingFile("infrastructure/ApplicationDelegates.kt.mustache", infrastructureFolder, "ApplicationDelegates.kt")); @@ -234,6 +246,11 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { typeMapping.put("list", "kotlin.collections.List"); additionalProperties.put("isList", true); } + + } + + private boolean isJVMLibrary() { + return getLibrary() != null && (getLibrary().contains(JVM_OKHTTP4) || getLibrary().contains(JVM_OKHTTP3)); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java index 58e72ad5a1..24983cef3b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java @@ -186,6 +186,8 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo public void setPackageName(String packageName) { this.packageName = packageName; + this.apiPackage = packageName + File.separator + "API"; + this.modelPackage = packageName + File.separator + "Model"; } public void setCsharpClientPath(String csharpClientPath) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 6c0c0c1345..16ec0bd3c0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -127,7 +127,8 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig "and", "del", "from", "not", "while", "as", "elif", "global", "or", "with", "assert", "else", "if", "pass", "yield", "break", "except", "import", "print", "class", "exec", "in", "raise", "continue", "finally", "is", - "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", "False")); + "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", + "False", "async", "await")); regexModifiers = new HashMap(); regexModifiers.put('i', "IGNORECASE"); 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 33d2007a3b..b043f14f40 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 @@ -104,14 +104,8 @@ public class RubyClientCodegen extends AbstractRubyCodegen { languageSpecificPrimitives.add("string"); // remove modelPackage and apiPackage added by default - Iterator itr = cliOptions.iterator(); - while (itr.hasNext()) { - CliOption opt = itr.next(); - if (CodegenConstants.MODEL_PACKAGE.equals(opt.getOpt()) || - CodegenConstants.API_PACKAGE.equals(opt.getOpt())) { - itr.remove(); - } - } + cliOptions.removeIf(opt -> CodegenConstants.MODEL_PACKAGE.equals(opt.getOpt()) || + CodegenConstants.API_PACKAGE.equals(opt.getOpt())); cliOptions.add(new CliOption(CodegenConstants.GEM_NAME, CodegenConstants.GEM_NAME_DESC). defaultValue("openapi_client")); @@ -342,33 +336,34 @@ public class RubyClientCodegen extends AbstractRubyCodegen { } @Override - public String toModelName(String name) { - name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. + public String toModelName(final String name) { + String modelName; + modelName = sanitizeName(name); if (!StringUtils.isEmpty(modelNamePrefix)) { - name = modelNamePrefix + "_" + name; + modelName = modelNamePrefix + "_" + modelName; } if (!StringUtils.isEmpty(modelNameSuffix)) { - name = name + "_" + modelNameSuffix; + modelName = modelName + "_" + modelNameSuffix; } // model name cannot use reserved keyword, e.g. return - if (isReservedWord(name)) { - String modelName = camelize("Model" + name); + if (isReservedWord(modelName)) { + modelName = camelize("Model" + modelName); LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + modelName); return modelName; } // model name starts with number - if (name.matches("^\\d.*")) { - LOGGER.warn(name + " (model name starts with number) cannot be used as model name. Renamed to " + camelize("model_" + name)); - name = "model_" + name; // e.g. 200Response => Model200Response (after camelize) + if (modelName.matches("^\\d.*")) { + LOGGER.warn(modelName + " (model name starts with number) cannot be used as model name. Renamed to " + camelize("model_" + modelName)); + modelName = "model_" + modelName; // e.g. 200Response => Model200Response (after camelize) } // camelize the model name // phone_number => PhoneNumber - return camelize(name); + return camelize(modelName); } @Override @@ -382,12 +377,17 @@ public class RubyClientCodegen extends AbstractRubyCodegen { } @Override - public String toApiFilename(String name) { + public String toApiFilename(final String name) { // replace - with _ e.g. created-at => created_at - name = name.replaceAll("-", "_"); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. + String filename = name; + if (apiNameSuffix != null && apiNameSuffix.length() > 0) { + filename = filename + "_" + apiNameSuffix; + } + + filename = filename.replaceAll("-", "_"); // e.g. PhoneNumberApi.rb => phone_number_api.rb - return underscore(name + "_" + apiNameSuffix); + return underscore(filename); } @Override 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 ad2c260cac..cdac07896c 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 @@ -156,6 +156,45 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { return postProcessModelsEnum(objs); } + @SuppressWarnings({"static-method", "unchecked"}) + public Map postProcessAllModels(Map objs) { + // Index all CodegenModels by model name. + Map allModels = new HashMap<>(); + for (Map.Entry entry : objs.entrySet()) { + String modelName = toModelName(entry.getKey()); + Map inner = (Map) entry.getValue(); + List> models = (List>) inner.get("models"); + for (Map mo : models) { + CodegenModel cm = (CodegenModel) mo.get("model"); + allModels.put(modelName, cm); + } + } + for (Map.Entry entry : objs.entrySet()) { + Map inner = (Map) entry.getValue(); + List> models = (List>) inner.get("models"); + for (Map mo : models) { + CodegenModel cm = (CodegenModel) mo.get("model"); + if (cm.discriminator != null) { + List discriminatorVars = new ArrayList<>(); + for(CodegenDiscriminator.MappedModel mappedModel: cm.discriminator.getMappedModels()) { + CodegenModel model = allModels.get(mappedModel.getModelName()); + Map mas = new HashMap<>(); + mas.put("modelName", camelize(mappedModel.getModelName())); + mas.put("mappingName", mappedModel.getMappingName()); + List vars = model.getVars(); + vars.removeIf(p -> p.name.equals(cm.discriminator.getPropertyName())); + mas.put("vars", vars); + discriminatorVars.add(mas); + } + // TODO: figure out how to properly have the original property type that didn't go through toVarName + cm.vendorExtensions.put("tagName", cm.discriminator.getPropertyName().replace("_", "")); + cm.vendorExtensions.put("mappedModels", discriminatorVars); + } + } + } + return objs; + } + @Override public void processOpts() { super.processOpts(); 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 9e227b3eee..f456ac9f17 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 @@ -484,31 +484,31 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { return input.replace("*/", "*_/").replace("/*", "/_*"); } - boolean isMimetypeXml(String mimetype) { + private boolean isMimetypeXml(String mimetype) { return mimetype.toLowerCase(Locale.ROOT).startsWith("application/xml"); } - boolean isMimetypePlainText(String mimetype) { + private boolean isMimetypePlainText(String mimetype) { return mimetype.toLowerCase(Locale.ROOT).startsWith("text/plain"); } - boolean isMimetypeHtmlText(String mimetype) { + private boolean isMimetypeHtmlText(String mimetype) { return mimetype.toLowerCase(Locale.ROOT).startsWith("text/html"); } - boolean isMimetypeWwwFormUrlEncoded(String mimetype) { + private boolean isMimetypeWwwFormUrlEncoded(String mimetype) { return mimetype.toLowerCase(Locale.ROOT).startsWith("application/x-www-form-urlencoded"); } - boolean isMimetypeMultipartFormData(String mimetype) { + private boolean isMimetypeMultipartFormData(String mimetype) { return mimetype.toLowerCase(Locale.ROOT).startsWith("multipart/form-data"); } - boolean isMimetypeOctetStream(String mimetype) { + private boolean isMimetypeOctetStream(String mimetype) { return mimetype.toLowerCase(Locale.ROOT).startsWith("application/octet-stream"); } - boolean isMimetypePlain(String mimetype) { + private boolean isMimetypePlain(String mimetype) { return isMimetypePlainText(mimetype) || isMimetypeHtmlText(mimetype) || isMimetypeOctetStream(mimetype); } @@ -818,9 +818,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { ArraySchema ap = (ArraySchema) p; Schema inner = ap.getItems(); String innerType = getTypeDeclaration(inner); - StringBuilder typeDeclaration = new StringBuilder(typeMapping.get("array")).append("<"); - typeDeclaration.append(innerType).append(">"); - return typeDeclaration.toString(); + return typeMapping.get("array") + "<" + innerType + ">"; } else if (ModelUtils.isMapSchema(p)) { Schema inner = ModelUtils.getAdditionalProperties(p); String innerType = getTypeDeclaration(inner); @@ -1077,7 +1075,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { } } - static long requiredBits(Long bound, boolean unsigned) { + private long requiredBits(Long bound, boolean unsigned) { if (bound == null) return 0; if (unsigned) { @@ -1092,7 +1090,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { bound < 0 ? Math.abs(bound) - 1 : bound); } - static String matchingIntType(boolean unsigned, Long inclusiveMin, Long inclusiveMax) { + private String matchingIntType(boolean unsigned, Long inclusiveMin, Long inclusiveMax) { long requiredMinBits = requiredBits(inclusiveMin, unsigned); long requiredMaxBits = requiredBits(inclusiveMax, unsigned); long requiredBits = Math.max(requiredMinBits, requiredMaxBits); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java index d4e06cc01a..7f3b529988 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java @@ -136,6 +136,7 @@ public class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig "ErrorResponse", // swift keywords + // https://docs.swift.org/swift-book/ReferenceManual/LexicalStructure.html Section: Keywords and Punctuation "Int", "Int32", "Int64", "Int64", "Float", "Double", "Bool", "Void", "String", "Character", "AnyObject", "class", "Class", "break", "as", "associativity", "deinit", "case", "dynamicType", "convenience", "enum", "continue", "false", "dynamic", "extension", "default", "is", "didSet", "func", "do", "nil", "final", "import", "else", @@ -143,7 +144,8 @@ public class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig "true", "lazy", "operator", "in", "COLUMN", "left", "private", "return", "FILE", "mutating", "protocol", "switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional", "struct", "override", "subscript", "postfix", "typealias", "precedence", "var", "prefix", "Protocol", - "required", "right", "set", "Type", "unowned", "weak", "Data") + "required", "right", "set", "Type", "unowned", "weak", "Data","fileprivate", "open", "rethrows", "defer", + "guard", "repeat", "Any", "catch", "throw", "throws", "try", "indirect", "willSet") ); typeMapping = new HashMap(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/SerializerUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/SerializerUtils.java index e2837499f4..16a8af68a7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/SerializerUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/SerializerUtils.java @@ -19,6 +19,7 @@ public class SerializerUtils { SimpleModule module = createModule(); try { return Yaml.mapper() + .copy() .registerModule(module) .configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true) .writeValueAsString(openAPI) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index d9cc61cbc0..9b95974ef6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -29,6 +29,7 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.config.GlobalSettings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,21 +40,18 @@ import java.util.Map; import java.util.Map.Entry; import java.util.stream.Collectors; - public class ModelUtils { private static final Logger LOGGER = LoggerFactory.getLogger(ModelUtils.class); private static final String URI_FORMAT = "uri"; - // TODO: Use GlobalSettings for all static/global properties in a more thread-safe way. - private static boolean generateAliasAsModel = false; - + private static final String generateAliasAsModelKey = "generateAliasAsModel"; public static void setGenerateAliasAsModel(boolean value) { - generateAliasAsModel = value; + GlobalSettings.setProperty(generateAliasAsModelKey, Boolean.toString(value)); } public static boolean isGenerateAliasAsModel() { - return generateAliasAsModel; + return Boolean.parseBoolean(GlobalSettings.getProperty(generateAliasAsModelKey, "false")); } @@ -798,7 +796,7 @@ public class ModelUtils { // top-level enum class return schema; } else if (isArraySchema(ref)) { - if (generateAliasAsModel) { + if (isGenerateAliasAsModel()) { return schema; // generate a model extending array } else { return unaliasSchema(openAPI, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref()))); @@ -809,7 +807,7 @@ public class ModelUtils { if (ref.getProperties() != null && !ref.getProperties().isEmpty()) // has at least one property return schema; // treat it as model else { - if (generateAliasAsModel) { + if (isGenerateAliasAsModel()) { return schema; // generate a model extending map } else { // treat it as a typical map diff --git a/modules/openapi-generator/src/main/resources/Eiffel/model_doc.mustache b/modules/openapi-generator/src/main/resources/Eiffel/model_doc.mustache index 0216a3372c..71c106fdc5 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index 99d255c54d..70462ccbd8 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -138,7 +138,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "{{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" jackson_databind_version = "{{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" jersey_version = "1.19.4" jodatime_version = "2.9.9" junit_version = "4.12" @@ -153,7 +153,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#joda}} compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" {{/joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index a92022e83a..34a2bb9801 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -122,7 +122,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" {{#threetenbp}} threepane_version = "2.6.4" {{/threetenbp}} @@ -142,7 +142,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#joda}} compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" {{/joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache index 4471072ec2..d42c3e1389 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache @@ -122,7 +122,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" google_api_client_version = "1.23.0" jersey_common_version = "2.25.1" jodatime_version = "2.9.9" @@ -141,7 +141,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#java8}} compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" {{/java8}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index 588239f5c8..c86178e7d0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -121,7 +121,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" {{#supportJava6}} jersey_version = "2.6" commons_io_version=2.5 @@ -145,7 +145,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#joda}} compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" {{/joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache index d67815a76a..726c343301 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache @@ -101,7 +101,7 @@ ext { {{#jackson}} jackson_version = "{{^threetenbp}}2.9.9{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" jackson_databind_version = "{{^threetenbp}}2.9.9{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" - jackson-databind-nullable-version = 0.2.0 + jackson_databind_nullable_version = 0.2.0 {{/jackson}} {{#gson}} gson_version = "2.8.5" @@ -125,7 +125,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{/jackson}} {{#gson}} compile "io.gsonfire:gson-fire:$gson_fire_version" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache index 1c133a7435..930ae737fd 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache @@ -121,7 +121,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" threetenbp_version = "2.6.4" resteasy_version = "3.1.3.Final" {{^java8}} @@ -144,7 +144,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#java8}} compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" {{/java8}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache index 4307834434..df21df17b0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache @@ -99,9 +99,6 @@ public class ApiClient { private Map authentications; - private HttpStatus statusCode; - private MultiValueMap responseHeaders; - private DateFormat dateFormat; public ApiClient() { @@ -154,22 +151,6 @@ public class ApiClient { return this; } - /** - * Gets the status code of the previous request - * @return HttpStatus the status code - */ - public HttpStatus getStatusCode() { - return statusCode; - } - - /** - * Gets the response headers of the previous request - * @return MultiValueMap a map of response headers - */ - public MultiValueMap getResponseHeaders() { - return responseHeaders; - } - /** * Get authentications (key: authentication name, value: authentication). * @return Map the currently configured authentication types @@ -580,9 +561,9 @@ public class ApiClient { * @param contentType The request's Content-Type header * @param authNames The authentications to apply * @param returnType The return type into which to deserialize the response - * @return The response body in chosen type + * @return ResponseEntity<T> The response of the chosen type */ - public T invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + public ResponseEntity invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { updateParamsForAuth(authNames, queryParams, headerParams); final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path); @@ -624,16 +605,11 @@ public class ApiClient { ResponseEntity responseEntity = restTemplate.exchange(requestEntity, returnType); - statusCode = responseEntity.getStatusCode(); - responseHeaders = responseEntity.getHeaders(); - - if (responseEntity.getStatusCode() == HttpStatus.NO_CONTENT) { - return null; - } else if (responseEntity.getStatusCode().is2xxSuccessful()) { - return responseEntity.getBody(); + if (responseEntity.getStatusCode().is2xxSuccessful()) { + return responseEntity; } else { // The error handler built into the RestTemplate should handle 400 and 500 series errors. - throw new RestClientException("API returned " + statusCode + " and it wasn't handled by the RestTemplate error handler"); + throw new RestClientException("API returned " + responseEntity.getStatusCode() + " and it wasn't handled by the RestTemplate error handler"); } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache index 79cdcd51ac..61a0d52720 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache @@ -25,6 +25,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; {{>generatedAnnotation}} @Component("{{package}}.{{classname}}") @@ -53,16 +54,53 @@ public class {{classname}} { /** * {{summary}} * {{notes}} -{{#responses}} *

{{code}}{{#message}} - {{message}}{{/message}} -{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} -{{/allParams}}{{#returnType}} * @return {{returnType}} -{{/returnType}} * @throws RestClientException if an error occurs while attempting to invoke the API -{{#externalDocs}} - * {{description}} - * @see {{summary}} Documentation -{{/externalDocs}} + {{#responses}} + *

{{code}}{{#message}} - {{message}}{{/message}} + {{/responses}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{returnType}} + {{/returnType}} + * @throws RestClientException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws RestClientException { + {{#returnType}} + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).getBody(); + {{/returnType}} + {{^returnType}} + {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{/returnType}} + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} + *

{{code}}{{#message}} - {{message}}{{/message}} + {{/responses}} + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + * @return ResponseEntity<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + * @throws RestClientException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{#isDeprecated}} + @Deprecated + {{/isDeprecated}} + public ResponseEntity<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws RestClientException { Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set @@ -102,7 +140,7 @@ public class {{classname}} { String[] authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; {{#returnType}}ParameterizedTypeReference<{{{returnType}}}> returnType = new ParameterizedTypeReference<{{{returnType}}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};{{/returnType}} - {{#returnType}}return {{/returnType}}apiClient.invokeAPI(path, HttpMethod.{{httpMethod}}, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.{{httpMethod}}, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index 1815ab926e..0670089057 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -122,7 +122,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" junit_version = "4.12" @@ -139,7 +139,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#java8}} compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" {{/java8}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache index cf02f24395..85aa12d6cc 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache @@ -133,7 +133,7 @@ ext { {{#play26}} jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" play_version = "2.6.7" {{/play26}} {{/usePlayWS}} @@ -190,7 +190,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}:$jackson_version" {{/usePlayWS}} diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache index 309a42bace..27bbed2842 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache @@ -26,6 +26,12 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela {{/mostInnerItems}} {{/isContainer}} {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} {{#withXml}} {{#isXmlAttribute}} @XmlAttribute(name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") @@ -48,12 +54,8 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela {{/isXmlAttribute}} {{/withXml}} {{#gson}} - public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) {{/gson}} - {{#jackson}} - public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; - {{/jackson}} {{#vendorExtensions.isJacksonOptionalNullable}} {{#isContainer}} private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); diff --git a/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache b/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache index f297c5bc9f..38a52e44eb 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}} +{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache index 8e4b33b784..a8ab10768e 100644 --- a/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache @@ -1,6 +1,6 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/typeInfoAnnotation.mustache index 8e4b33b784..a8ab10768e 100644 --- a/modules/openapi-generator/src/main/resources/JavaInflector/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaInflector/typeInfoAnnotation.mustache @@ -1,6 +1,6 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/bodyParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/bodyParams.mustache index 1bbadf7764..a7351b38ac 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/bodyParams.mustache @@ -1 +1,13 @@ -{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}{{! + + }}@ApiParam(value = "{{{description}}}"{{! + }}{{#required}}, required = true{{/required}}{{! + }}{{#allowableValues}}, {{> allowableValues}}{{/allowableValues}}{{! + }}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}{{! + }}){{! + + }}{{#useBeanValidation}} {{>beanValidation}}{{/useBeanValidation}}{{! + + }} {{{dataType}}} {{paramName}}{{! + +}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/formParams.mustache index d842b9dacd..a900c62ccf 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}@Multipart(value = "{{baseName}}"{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} @Multipart(value = "{{baseName}}"{{^required}}, required = false{{/required}}) InputStream {{paramName}}InputStream, @Multipart(value = "{{baseName}}" {{^required}}, required = false{{/required}}) Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{#isMultipart}}@Multipart{{/isMultipart}}{{^isMultipart}}@FormParam{{/isMultipart}}(value = "{{baseName}}"{{^required}}{{#isMultipart}}, required = false{{/isMultipart}}{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} @Multipart(value = "{{baseName}}"{{^required}}, required = false{{/required}}) InputStream {{paramName}}InputStream, @Multipart(value = "{{baseName}}" {{^required}}, required = false{{/required}}) Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/typeInfoAnnotation.mustache index 743065d4fc..793e10bdc6 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/typeInfoAnnotation.mustache @@ -1,5 +1,5 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/typeInfoAnnotation.mustache index 743065d4fc..793e10bdc6 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/typeInfoAnnotation.mustache @@ -1,5 +1,5 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/typeInfoAnnotation.mustache index 743065d4fc..793e10bdc6 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/typeInfoAnnotation.mustache @@ -1,5 +1,5 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/pathParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/pathParams.mustache index 8d80210b4b..15a08e20b0 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/pathParams.mustache @@ -1 +1,15 @@ -{{#isPathParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}{{! + + }}@ApiParam(value = "{{{description}}}"{{! + }}{{#required}}, required = true{{/required}}{{! + }}{{#allowableValues}}, {{> allowableValues}}{{/allowableValues}}{{! + }}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}{{! + }}){{! + + }} @PathParam("{{baseName}}"){{! + + }}{{#useBeanValidation}} {{>beanValidation}}{{/useBeanValidation}}{{! + + }} {{{dataType}}} {{paramName}}{{! + +}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/queryParams.mustache index 40ebb27008..62687bc11b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/queryParams.mustache @@ -1 +1,35 @@ -{{#isQueryParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{^isContainer}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue={{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}){{^isContainer}}{{#defaultValue}} @DefaultValue({{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/defaultValue}}{{/isContainer}}@QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{! + + }}@ApiParam(value = "{{{description}}}"{{! + }}{{#required}}, required = true{{/required}}{{! + }}{{^isContainer}}{{! + }}{{#allowableValues}}, {{> allowableValues}}{{/allowableValues}}{{! + }}{{#defaultValue}}, defaultValue = {{! + }}{{^isString}}"{{/isString}}{{! + }}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{! + }}{{{defaultValue}}}{{! + }}{{^isString}}"{{/isString}}{{! + }}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{! + }}{{/defaultValue}}{{! + }}{{/isContainer}}{{! + }}){{! + + }}{{^isContainer}}{{! + }}{{#defaultValue}}{{! + }} @DefaultValue({{! + }}{{^isString}}"{{/isString}}{{! + }}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{! + }}{{{defaultValue}}}{{! + }}{{^isString}}"{{/isString}}{{! + }}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{! + }}){{! + }}{{/defaultValue}}{{! + }}{{/isContainer}}{{! + + }} @QueryParam("{{baseName}}"){{! + + }}{{#useBeanValidation}} {{>beanValidation}}{{/useBeanValidation}}{{! + + }} {{{dataType}}} {{paramName}}{{! + +}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/typeInfoAnnotation.mustache index 743065d4fc..793e10bdc6 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/typeInfoAnnotation.mustache @@ -1,5 +1,5 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/typeInfoAnnotation.mustache index 743065d4fc..793e10bdc6 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/typeInfoAnnotation.mustache @@ -1,5 +1,5 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache index fa97e4b117..ef608ee6a1 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache @@ -7,11 +7,11 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/getting-started-jvm . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/{{artifactId}}-jvm . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/getting-started-jvm +# docker run -i --rm -p 8080:8080 quarkus/{{artifactId}}-jvm # ### FROM fabric8/java-alpine-openjdk8-jre @@ -19,4 +19,5 @@ ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jb ENV AB_ENABLED=jmx_exporter COPY target/lib/* /deployments/lib/ COPY target/*-runner.jar /deployments/app.jar +EXPOSE 8080 ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.native.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.native.mustache index 426c99b81a..17f7a60973 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.native.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.native.mustache @@ -7,11 +7,11 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/getting-started . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/{{artifactId}} . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/getting-started +# docker run -i --rm -p 8080:8080 quarkus/{{artifactId}} # ### FROM registry.access.redhat.com/ubi8/ubi-minimal diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache index 265b492d2c..d92dff6d7c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache @@ -9,7 +9,7 @@ UTF-8 2.22.0 - 0.22.0 + 0.23.2 UTF-8 1.8 1.8 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/typeInfoAnnotation.mustache index 6da35ddbb1..5b7bb5cd32 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/typeInfoAnnotation.mustache @@ -1,5 +1,5 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache index 743065d4fc..793e10bdc6 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache @@ -1,5 +1,5 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/typeInfoAnnotation.mustache index 8e4b33b784..a8ab10768e 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/typeInfoAnnotation.mustache @@ -1,6 +1,6 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache index 8e4b33b784..a8ab10768e 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache @@ -1,6 +1,6 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/model_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/model_doc.mustache index 2f582eaee1..04ab6f949a 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/model_doc.mustache @@ -11,7 +11,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache index 2f582eaee1..04ab6f949a 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache @@ -11,7 +11,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} {{/vars}} {{#vars}}{{#isEnum}} 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 67c0f473b5..3313be307c 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 @@ -20,6 +20,7 @@ org.openapitools.codegen.languages.CSharpNetCoreClientCodegen org.openapitools.codegen.languages.CSharpDotNet2ClientCodegen org.openapitools.codegen.languages.CSharpNancyFXServerCodegen org.openapitools.codegen.languages.DartClientCodegen +org.openapitools.codegen.languages.DartDioClientCodegen org.openapitools.codegen.languages.DartJaguarClientCodegen org.openapitools.codegen.languages.EiffelClientCodegen org.openapitools.codegen.languages.ElixirClientCodegen diff --git a/modules/openapi-generator/src/main/resources/android/pojo_doc.mustache b/modules/openapi-generator/src/main/resources/android/pojo_doc.mustache index 768515c90c..130887494d 100644 --- a/modules/openapi-generator/src/main/resources/android/pojo_doc.mustache +++ b/modules/openapi-generator/src/main/resources/android/pojo_doc.mustache @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}} +{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/apex/pojo_doc.mustache b/modules/openapi-generator/src/main/resources/apex/pojo_doc.mustache index bd510d494d..b2cdbdb9c6 100644 --- a/modules/openapi-generator/src/main/resources/apex/pojo_doc.mustache +++ b/modules/openapi-generator/src/main/resources/apex/pojo_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}} +{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/avro-schema/typeProperty.mustache b/modules/openapi-generator/src/main/resources/avro-schema/typeProperty.mustache index ffad928c07..a2d5c7a1f7 100644 --- a/modules/openapi-generator/src/main/resources/avro-schema/typeProperty.mustache +++ b/modules/openapi-generator/src/main/resources/avro-schema/typeProperty.mustache @@ -1 +1 @@ -{{^isEnum}}{{^isContainer}}{{#isPrimitiveType}}"{{dataType}}"{{/isPrimitiveType}}{{#isModel}}"{{package}}.{{dataType}}"{{/isModel}}{{/isContainer}}{{#isContainer}}{{>typeArray}}{{/isContainer}}{{/isEnum}}{{#isEnum}}{{>typeEnum}}{{/isEnum}} \ No newline at end of file +{{^isEnum}}{{^isContainer}}{{#isPrimitiveType}}"{{dataType}}"{{/isPrimitiveType}}{{#isModel}}"{{package}}.{{dataType}}"{{/isModel}}{{#isFile}}"{{package}}.{{dataType}}"{{/isFile}}{{/isContainer}}{{#isContainer}}{{>typeArray}}{{/isContainer}}{{/isEnum}}{{#isEnum}}{{>typeEnum}}{{/isEnum}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/bash/model_doc.mustache b/modules/openapi-generator/src/main/resources/bash/model_doc.mustache index dd3da69f92..84dad46d92 100644 --- a/modules/openapi-generator/src/main/resources/bash/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/bash/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{title}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{title}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/confluenceWikiDocs/index.mustache b/modules/openapi-generator/src/main/resources/confluenceWikiDocs/index.mustache index 0c42ad9bf6..cbe5d3bd1f 100644 --- a/modules/openapi-generator/src/main/resources/confluenceWikiDocs/index.mustache +++ b/modules/openapi-generator/src/main/resources/confluenceWikiDocs/index.mustache @@ -1,94 +1,81 @@ -h1. {{{appName}}} {{{appDescription}}} +h1. {{{appName}}} + +{{{appDescription}}} {{#version}}*Version:* {{{version}}}{{/version}} ---- +{expand:Table of Contents - Click to expand} {toc:printable=true|style=square|minLevel=2|maxLevel=3|type=list|outline=false|include=.*} +{expand} h2. Endpoints {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} - h3. {{nickname}} - {status:colour=Yellow|title={{httpMethod}}|subtle=false} - {code} - {{httpMethod}} {{path}} - {code} - *Summary:* {{summary}} - *Description:* {{notes}} +h3. {{nickname}} +{panel:title={{nickname}}|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff} + {{#summary}}*Summary:* {{summary}}{{/summary}} + *Description:* {{notes}}{{^notes}}*No Description*{{/notes}} - h4. Parameters + || HttpMethod | {status:colour=Yellow|title={{httpMethod}}|subtle=false} | + || Protocol | {noformat:nopanel=true}{{scheme}}{noformat} | + || Path | {noformat:nopanel=true}{{path}}{noformat} | + || Base Path | {noformat:nopanel=true}{{basePath}}{noformat} | + {{#hasProduces}}|| Produces | {noformat:nopanel=true}{{#produces}}{{mediaType}}{{/produces}}{noformat} |{{/hasProduces}} +---- +h4. Parameters {{#hasPathParams}} - h5. Path Parameters - ||Name||Description||Required||Default||Pattern|| - {{#pathParams}}{{>param}} - {{/pathParams}} +h5. Path Parameters + ||Name||Description||Required||Default||Pattern||{{#pathParams}} + {{>param}}{{/pathParams}} {{/hasPathParams}} {{#hasBodyParam}} - h5. Body Parameter +h5. Body Parameter ||Name||Description||Required||Default||Pattern|| - {{#bodyParams}}{{>param}} - {{/bodyParams}} + {{#bodyParams}}{{>param}}{{/bodyParams}} {{/hasBodyParam}} {{#hasHeaderParams}} - h5. Header Parameters +h5. Header Parameters ||Name||Description||Required||Default||Pattern|| - {{#headerParams}}{{>param}} - {{/headerParams}} + {{#headerParams}}{{>param}}{{/headerParams}} {{/hasHeaderParams}} {{#hasQueryParams}} - h5. Query Parameters +h5. Query Parameters ||Name||Description||Required||Default||Pattern|| - {{#queryParams}}{{>param}} - {{/queryParams}} + {{#queryParams}}{{>param}}{{/queryParams}} {{/hasQueryParams}} - - - - - h4. Responses +---- +h4. Responses {{#responses}} - *Status Code:* {{code}} - *Message:* {{message}} - {code:title=Response Type} -{{{dataType}}} - {code} - See [#models] - {{#hasExamples}} - {{#examples}} - {code:title=Example {{{contentType}}} |collapse=true } - {{{example}}} -{code} - {{/examples}} - {{/hasExamples}} + || Status Code | {status:colour=Green|title={{code}}|subtle=false} | + || Message | {{message}} | + || Response Type | {{{dataType}}} | + || Response Model | [{{dataType}} Model|#{{dataType}}ModelAnchor|Jump to model] | + || Response Schema | {code:collapse=true}{{{jsonSchema}}}{code}{{#examples}}{code:title=Example {{{contentType}}} |collapse=true }{{{example}}}{code}{{/examples}} | + {{#hasExamples}}{{#examples}}|| Example {{-index}} | {code:title=Example {{{contentType}}} |collapse=true }{{{example}}}{code} |{{/examples}}{{/hasExamples}} - - {code:title=Response Schema |collapse=true} -{{{jsonSchema}}} - {code} - {{#examples}} - {code:title=Example {{{contentType}}} |collapse=true } -{{{example}}} - {code} - {{/examples}} {{/responses}} - ---- +{panel} + {{/operation}} {{/operations}} {{/apis}} {{/apiInfo}} +{anchor:models} h2. Models {{#models}} {{#model}} + {anchor:{{classname}}ModelAnchor} h3. {{classname}} ||Field Name||Required||Type||Description|| - {{#vars}} |{{name}} |{{#isNotRequired}}(x){{/isNotRequired}} |{{dataType}} |{{description}} | + {{#vars}} |{{name}} |{{#required}}(/){{/required}}{{^required}}(x){{/required}} |{noformat:nopanel=true}{{{dataType}}}{noformat} |{{description}} | {{/vars}} {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-struct-header.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-struct-header.mustache index a49415db26..3fc013a8b0 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-struct-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-struct-header.mustache @@ -12,7 +12,7 @@ {{#imports}}{{{this}}} {{/imports}} #include -#include +{{#hasOptional}}#include {{/hasOptional}} {{#modelNamespaceDeclarations}} namespace {{this}} { diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/CMakeLists.txt.mustache new file mode 100644 index 0000000000..c53100cca6 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/CMakeLists.txt.mustache @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.2) + +project(client) +set(CMAKE_VERBOSE_MAKEFILE ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wno-unused-variable") + +find_package(Qt5Core REQUIRED) +find_package(Qt5Network REQUIRED) + +file(GLOB SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp +) + +add_library(${PROJECT_NAME} ${SRCS}) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Network ssl crypto) + +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_EXTENSIONS OFF) + +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache index 9b97b53e52..b6a8ee4b2d 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache @@ -228,7 +228,7 @@ fromStringValue(const QString &inStr, {{prefix}}Enum &value){ } bool -fromStringValue(const QString &inStr, OAIHttpFileElement &value){ +fromStringValue(const QString &inStr, {{prefix}}HttpFileElement &value){ return value.fromStringValue(inStr); } diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/helpers-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/helpers-body.mustache index 9b97b53e52..b6a8ee4b2d 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/helpers-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/helpers-body.mustache @@ -228,7 +228,7 @@ fromStringValue(const QString &inStr, {{prefix}}Enum &value){ } bool -fromStringValue(const QString &inStr, OAIHttpFileElement &value){ +fromStringValue(const QString &inStr, {{prefix}}HttpFileElement &value){ return value.fromStringValue(inStr); } diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/model_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/model_doc.mustache index c4ee91dacb..2e748e0f0f 100644 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-dotnet2/model_doc.mustache @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache index 22141b671a..85f8252ce6 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache @@ -7,10 +7,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- {{#parent}} {{#parentVars}} -**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/parentVars}} {{/parent}} -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 688062a907..03117ce7de 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -31,7 +31,7 @@ {{#description}} /// {{description}} {{/description}} - [DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}})] + [DataMember(Name="{{baseName}}", EmitDefaultValue={{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})] public {{#complexType}}{{{complexType}}}{{/complexType}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } {{/isEnum}} {{/vars}} @@ -108,7 +108,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} /// {{#description}} /// {{description}}{{/description}} - [DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}})]{{#isDate}} + [DataMember(Name="{{baseName}}", EmitDefaultValue={{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})]{{#isDate}} [JsonConverter(typeof(OpenAPIDateConverter))]{{/isDate}} public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } {{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache b/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache index 6afba0fdbf..af42e32224 100644 --- a/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache @@ -9,10 +9,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- {{#parent}} {{#parentVars}} -**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/parentVars}} {{/parent}} -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[Back to Model list]](../README.md#documentation-for-models) diff --git a/modules/openapi-generator/src/main/resources/dart-dio/README.mustache b/modules/openapi-generator/src/main/resources/dart-dio/README.mustache new file mode 100644 index 0000000000..1367a32a5d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/README.mustache @@ -0,0 +1,110 @@ +# {{pubName}} +{{#appDescription}} +{{{appDescription}}} +{{/appDescription}} + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: {{appVersion}} +{{#artifactVersion}} +- Package version: {{artifactVersion}} +{{/artifactVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Build package: {{generatorClass}} +{{#infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +## Requirements + +Dart 1.20.0 or later OR Flutter 0.0.20 or later + +## Installation & Usage + +### Github +If this Dart package is published to Github, please include the following in pubspec.yaml +``` +name: {{pubName}} +version: {{pubVersion}} +description: {{pubDescription}} +dependencies: + {{pubName}}: + git: https://github.com/{{gitUserId}}/{{gitRepoId}}.git + version: 'any' +``` + +### Local +To use the package in your local drive, please include the following in pubspec.yaml +``` +dependencies: + {{pubName}}: + path: /path/to/{{pubName}} +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:{{pubName}}/api.dart'; +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} + +var api_instance = new {{classname}}(); +{{#allParams}} +var {{paramName}} = {{#isListContainer}}[{{/isListContainer}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isListContainer}}]{{/isListContainer}}; // {{{dataType}}} | {{{description}}} +{{/allParams}} + +try { + {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{#returnType}} + print(result); + {{/returnType}} +} catch (e) { + print("Exception when calling {{classname}}->{{operationId}}: $e\n"); +} +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation For Models + +{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}/{{{classname}}}.md) +{{/model}}{{/models}} + +## Documentation For Authorization + +{{^authMethods}} All endpoints do not require authorization. +{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} +{{#authMethods}}## {{{name}}} + +{{#isApiKey}}- **Type**: API key +- **API key parameter name**: {{{keyParamName}}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasic}}- **Type**: HTTP basic authentication +{{/isBasic}} +{{#isOAuth}}- **Type**: OAuth +- **Flow**: {{{flow}}} +- **Authorization URL**: {{{authorizationUrl}}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - **{{{scope}}}**: {{{description}}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} + +## Author + +{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} +{{/hasMore}}{{/apis}}{{/apiInfo}} + diff --git a/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache b/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache new file mode 100644 index 0000000000..655cb67bd8 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache @@ -0,0 +1 @@ +analyzer: \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache new file mode 100644 index 0000000000..b190d66395 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -0,0 +1,94 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:convert'; +import 'package:dio/dio.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; + +{{#operations}} +{{#modelImports}}import 'package:{{pubName}}/model/{{.}}.dart'; +{{/modelImports}} +{{#fullImports}}import '{{.}}'; +{{/fullImports}} + +class {{classname}} { + final Dio _dio; + Serializers _serializers; + + {{classname}}(this._dio, this._serializers); + + {{#operation}} + /// {{summary}} + /// + /// {{notes}} + Future{{/returnType}}>{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}CancelToken cancelToken, Map headers,}) async { + + String path = "{{{path}}}"{{#pathParams}}.replaceAll("{" + "{{baseName}}" + "}", {{{paramName}}}.toString()){{/pathParams}}; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + Map formParams = {}; + + {{#headerParams}} + headerParams["{{baseName}}"] = {{paramName}}; + {{/headerParams}} + {{#queryParams}} + queryParams["{{baseName}}"] = {{paramName}}; + {{/queryParams}} + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = [{{#consumes}} + "{{{mediaType}}}"{{#hasMore}},{{/hasMore}}{{/consumes}}]; + + {{#bodyParam}} + {{#isListContainer}} + final type = const FullType(BuiltList, const [const FullType({{baseType}})]); + var serializedBody = _serializers.serialize(BuiltList<{{baseType}}>.from({{paramName}}), specifiedType: type); + {{/isListContainer}} + {{^isListContainer}} + var serializedBody = _serializers.serialize({{paramName}}); + {{/isListContainer}} + var data = json.encode(serializedBody); + {{/bodyParam}} + + return _dio.request( + path, + queryParameters: queryParams, + {{#bodyParam}} + data: data, + {{/bodyParam}} + options: Options( + method: '{{httpMethod}}'.toUpperCase(), + headers: headerParams, + contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ){{#returnType}}.then((response) { + + {{#isListContainer}} + final FullType type = const FullType(BuiltList, const [const FullType({{returnBaseType}})]); + BuiltList<{{returnBaseType}}> dataList = _serializers.deserialize(response.data, specifiedType: type); + var data = dataList.toList(); + {{/isListContainer}} + {{^isListContainer}} + var serializer = _serializers.serializerForType({{{returnType}}}); + var data = _serializers.deserializeWith<{{{returnType}}}>(serializer, response.data); + {{/isListContainer}} + + return Response<{{{returnType}}}>( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }){{/returnType}}; + } + {{/operation}} + } +{{/operations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache new file mode 100644 index 0000000000..773ee0d562 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache @@ -0,0 +1,86 @@ +# {{pubName}}.api.{{classname}}{{#description}} +{{description}}{{/description}} + +## Load the API package +```dart +import 'package:{{pubName}}/api.dart'; +``` + +All URIs are relative to *{{basePath}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} +# **{{{operationId}}}** +> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + +{{{summary}}}{{#notes}} + +{{{notes}}}{{/notes}} + +### Example +```dart +import 'package:{{pubName}}/api.dart'; +{{#hasAuthMethods}} +{{#authMethods}} +{{#isBasic}} +// TODO Configure HTTP basic authorization: {{{name}}} +//defaultApiClient.getAuthentication('{{{name}}}').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('{{{name}}}').password = 'YOUR_PASSWORD'; +{{/isBasic}} +{{#isApiKey}} +// TODO Configure API key authorization: {{{name}}} +//defaultApiClient.getAuthentication('{{{name}}}').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('{{{name}}}').apiKeyPrefix = 'Bearer'; +{{/isApiKey}} +{{#isOAuth}} +// TODO Configure OAuth2 access token for authorization: {{{name}}} +//defaultApiClient.getAuthentication('{{{name}}}').accessToken = 'YOUR_ACCESS_TOKEN'; +{{/isOAuth}} +{{/authMethods}} +{{/hasAuthMethods}} + +var api_instance = new {{classname}}(); +{{#allParams}} +var {{paramName}} = {{#isListContainer}}[{{/isListContainer}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isListContainer}}]{{/isListContainer}}; // {{{dataType}}} | {{{description}}} +{{/allParams}} + +try { + {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{#returnType}} + print(result); + {{/returnType}} +} catch (e) { + print("Exception when calling {{classname}}->{{operationId}}: $e\n"); +} +``` + +### Parameters +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + + - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} + - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} + +[[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) + +{{/operation}} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache new file mode 100644 index 0000000000..11690b8c28 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache @@ -0,0 +1,39 @@ +library {{pubName}}.api; + +import 'package:http/io_client.dart'; +import 'package:dio/dio.dart'; +import 'package:built_value/serializer.dart'; +import 'package:{{pubName}}/serializers.dart'; +{{#apiInfo}}{{#apis}}import 'package:{{pubName}}/api/{{classFilename}}.dart'; +{{/apis}}{{/apiInfo}} + +class {{clientName}} { + + Dio dio; + Serializers serializers; + String basePath = "http://petstore.swagger.io/v2"; + + {{clientName}}({this.dio, Serializers serializers}) { + if (dio == null) { + BaseOptions options = new BaseOptions( + baseUrl: basePath, + connectTimeout: 5000, + receiveTimeout: 3000, + ); + this.dio = new Dio(options); + } + + this.serializers = serializers ?? standardSerializers; +} + +{{#apiInfo}}{{#apis}} + /** + * Get {{classname}} instance, base route and serializer can be overridden by a given but be careful, + * by doing that all interceptors will not be executed + */ + {{classname}} get{{classname}}() { + return {{classname}}(dio, serializers); + } + +{{/apis}}{{/apiInfo}} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache new file mode 100644 index 0000000000..41743a4235 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache @@ -0,0 +1,28 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part '{{classFilename}}.g.dart'; + +abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builder> { + +{{#vars}} + {{#description}}/* {{{description}}} */{{/description}} + {{#isNullable}} + @nullable + {{/isNullable}} + + {{#description}}/* {{{description}}} */{{/description}} + @BuiltValueField(wireName: '{{baseName}}') + {{{dataType}}} get {{name}}; + {{#allowableValues}} + {{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}{ + {{/allowableValues}} +{{/vars}} + + // Boilerplate code needed to wire-up generated code + {{classname}}._(); + + factory {{classname}}([updates({{classname}}Builder b)]) = _${{classname}}; + static Serializer<{{classname}}> get serializer => _${{classVarName}}Serializer; + +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache b/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache new file mode 100644 index 0000000000..d4a4d2b8d1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache @@ -0,0 +1,36 @@ +@Entity() +class {{classname}} { + /// The underlying value of this enum member. + final {{dataType}} value; + + const {{classname}}._internal(this.value); + + {{#allowableValues}} + {{#enumVars}} + {{#description}} + /// {{description}} + {{/description}} + static const {{classname}} {{{name}}} = const {{classname}}._internal({{{value}}}); + {{/enumVars}} + {{/allowableValues}} +} + +class {{classname}}TypeTransformer extends TypeTransformer<{{classname}}> { + + @override + dynamic encode({{classname}} data) { + return data.value; + } + + @override + {{classname}} decode(dynamic data) { + switch (data) { + {{#allowableValues}} + {{#enumVars}} + case {{{value}}}: return {{classname}}.{{{name}}}; + {{/enumVars}} + {{/allowableValues}} + default: throw('Unknown enum value to decode: $data'); + } + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.gitignore b/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/.gitignore rename to modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache diff --git a/modules/openapi-generator/src/main/resources/dart-dio/model.mustache b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache new file mode 100644 index 0000000000..da50fb5661 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache @@ -0,0 +1,8 @@ +{{#models}} + {{#model}} + {{#imports}} + import 'package:{{.}}.dart'; + {{/imports}} + {{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}{{>class}}{{/isEnum}} + {{/model}} +{{/models}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache new file mode 100644 index 0000000000..657f84d890 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache @@ -0,0 +1,16 @@ +{{#models}}{{#model}}# {{pubName}}.model.{{classname}} + +## Load the model package +```dart +import 'package:{{pubName}}/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{/vars}} + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache new file mode 100644 index 0000000000..d69417f7cb --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache @@ -0,0 +1,13 @@ +name: {{pubName}} +version: {{pubVersion}} +description: {{pubDescription}} +environment: + sdk: ">=2.3.0 <3.0.0" +dependencies: + dio: ^3.0.3 + built_value: 6.7.0 + built_collection: 4.2.2 +dev_dependencies: + built_value_generator: ^6.7.1 + build_runner: ^1.7.1 + test: 1.6.5 \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache new file mode 100644 index 0000000000..141eaa307e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache @@ -0,0 +1,26 @@ +library serializers; + +import 'package:built_value/serializer.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/standard_json_plugin.dart'; + +{{#models}}{{#model}}import 'package:{{pubName}}/model/{{classFilename}}.dart'; +{{/model}}{{/models}} + +part 'serializers.g.dart'; + +@SerializersFor(const [ +{{#models}}{{#model}}{{classname}}, +{{/model}}{{/models}} +]) + +//allow all models to be serialized within a list +Serializers serializers = (_$serializers.toBuilder() +{{#models}}{{#model}}..addBuilderFactory( +const FullType(BuiltList, const [const FullType({{classname}})]), +() => new ListBuilder<{{classname}}>()) +{{/model}}{{/models}} +).build(); + +Serializers standardSerializers = +(serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache index 9ad4463997..793c8df8ae 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache @@ -8,7 +8,7 @@ import 'package:{{pubName}}/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/dart/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart/object_doc.mustache index 657f84d890..742952fef6 100644 --- a/modules/openapi-generator/src/main/resources/dart/object_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart/object_doc.mustache @@ -8,7 +8,7 @@ import 'package:{{pubName}}/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/dart2/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart2/object_doc.mustache index 657f84d890..742952fef6 100644 --- a/modules/openapi-generator/src/main/resources/dart2/object_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/object_doc.mustache @@ -8,7 +8,7 @@ import 'package:{{pubName}}/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/elm/api.mustache b/modules/openapi-generator/src/main/resources/elm/api.mustache index 275a912192..f07fce4558 100644 --- a/modules/openapi-generator/src/main/resources/elm/api.mustache +++ b/modules/openapi-generator/src/main/resources/elm/api.mustache @@ -16,8 +16,8 @@ type {{enumName}} {{#allowableValues.enumVars}} {{#-first}}= {{/-first}}{{^-first}}| {{/-first}}{{name}} {{/allowableValues.enumVars}} -{{paramName}}ToString : {{enumName}} -> String -{{paramName}}ToString value = +stringify{{enumName}} : {{enumName}} -> String +stringify{{enumName}} value = case value of {{#allowableValues.enumVars}} {{name}} -> {{{value}}} @@ -59,10 +59,10 @@ basePath = {{operationId}} {{#headerParams.0}}headers {{/headerParams.0}}params = Http.request { method = "{{httpMethod}}" - , headers = {{#headerParams.0}}List.filterMap identity {{/headerParams.0}}[{{{vendorExtensions.headers}}}] + , headers = List.filterMap identity [{{#headerParams}}{{#required}}(Just << {{/required}}{{^required}}Maybe.map ({{/required}}Http.header "{{baseName}}" << {{>toString}}) {{^isElm018}}headers.{{/isElm018}}{{paramName}}{{^-last}}, {{/-last}}{{/headerParams}}] , url = Url.crossOrigin {{#enableCustomBasePaths}}params.{{/enableCustomBasePaths}}basePath - [{{{path}}}] - {{#queryParams.0}}(List.filterMap identity {{/queryParams.0}}[{{{vendorExtensions.query}}}]{{#queryParams.0}}){{/queryParams.0}} + [{{#vendorExtensions.pathParams}}{{#paramName}}{{>toString}} params.{{paramName}}{{/paramName}}{{^paramName}}{{{.}}}{{/paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.pathParams}}] + (List.filterMap identity [{{#queryParams}}{{#required}}(Just << {{/required}}{{^required}}Maybe.map ({{/required}}Url.string "{{baseName}}" << {{>toString}}) {{^isElm018}}params.{{/isElm018}}{{paramName}}{{^-last}}, {{/-last}}{{/queryParams}}]) , body = {{#bodyParam}}{{^required}}Maybe.withDefault Http.emptyBody <| Maybe.map ({{/required}}Http.jsonBody {{#required}}<|{{/required}}{{^required}}<<{{/required}} {{vendorExtensions.elmEncoder}}{{^required}}){{/required}} params.body{{/bodyParam}}{{^bodyParam}}Http.emptyBody{{/bodyParam}} , expect = {{^responses}}Http.expectWhatever params.onSend{{/responses}}{{#responses}}{{#-first}}{{^dataType}}Http.expectWhatever params.onSend{{/dataType}}{{#dataType}}Http.expectJson params.onSend {{#isMapContainer}}(Decode.dict {{/isMapContainer}}{{#isListContainer}}(Decode.list {{/isListContainer}}{{#vendorExtensions}}{{elmDecoder}}{{/vendorExtensions}}{{#isListContainer}}){{/isListContainer}}{{#isMapContainer}}){{/isMapContainer}}{{/dataType}}{{/-first}}{{/responses}} , timeout = Just 30000 diff --git a/modules/openapi-generator/src/main/resources/elm/model.mustache b/modules/openapi-generator/src/main/resources/elm/model.mustache index 0e16b0ed34..9ac8a6c445 100644 --- a/modules/openapi-generator/src/main/resources/elm/model.mustache +++ b/modules/openapi-generator/src/main/resources/elm/model.mustache @@ -1,6 +1,6 @@ {{>licenseInfo}} -module Data.{{classname}} exposing ({{#models}}{{#model}}{{classname}}{{#hasChildren}}(..){{/hasChildren}}{{#isEnum}}(..){{/isEnum}}{{^isEnum}}{{#vars}}{{#isEnum}}, {{vendorExtensions.elmCustomType}}(..){{/isEnum}}{{/vars}}{{/isEnum}}, decoder, encode{{/model}}{{/models}}) +module Data.{{classname}} exposing ({{#models}}{{#model}}{{classname}}{{#hasChildren}}(..){{/hasChildren}}{{#isEnum}}(..){{/isEnum}}{{^isEnum}}{{#vars}}{{#isEnum}}, {{vendorExtensions.elmCustomType}}(..){{/isEnum}}{{/vars}}{{/isEnum}}, decoder, encode, toString{{/model}}{{/models}}) {{>imports}}import Dict exposing (Dict) import Json.Decode as Decode exposing (Decoder) @@ -15,5 +15,6 @@ import Json.Encode as Encode -} {{/description}} {{#isEnum}}{{>modelTypeCustom}}{{/isEnum}}{{^isEnum}}{{#discriminator}}{{>modelTypeDiscriminator}}{{/discriminator}}{{^discriminator}}{{#isAlias}}{{>modelTypePrimitive}}{{/isAlias}}{{^isAlias}}{{#isArrayModel}}{{>modelTypeArray}}{{/isArrayModel}}{{^isArrayModel}}{{>modelTypeRecord}}{{/isArrayModel}}{{/isAlias}}{{/discriminator}}{{/isEnum}} + {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/elm/modelTypeArray.mustache b/modules/openapi-generator/src/main/resources/elm/modelTypeArray.mustache index a265c68e09..1125af22cd 100644 --- a/modules/openapi-generator/src/main/resources/elm/modelTypeArray.mustache +++ b/modules/openapi-generator/src/main/resources/elm/modelTypeArray.mustache @@ -10,3 +10,8 @@ decoder = encode : {{classname}} -> Encode.Value encode items = Encode.list {{#isElm018}}(List.map {{/isElm018}}{{vendorExtensions.elmEncoder}} items{{#isElm018}}){{/isElm018}} + + +toString : {{classname}} -> String +toString = + Encode.encode 0 << encode diff --git a/modules/openapi-generator/src/main/resources/elm/modelTypeCustom.mustache b/modules/openapi-generator/src/main/resources/elm/modelTypeCustom.mustache index cc062e4303..dbc2bb22cb 100644 --- a/modules/openapi-generator/src/main/resources/elm/modelTypeCustom.mustache +++ b/modules/openapi-generator/src/main/resources/elm/modelTypeCustom.mustache @@ -4,4 +4,16 @@ {{>customTypeDecoder}} -{{>customTypeEncoder}} \ No newline at end of file +{{>customTypeEncoder}} + + +toString : {{classname}} -> String +toString model = + case model of +{{#allowableValues}} +{{#enumVars}} + {{name}} -> + {{{value}}} + +{{/enumVars}} +{{/allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/elm/modelTypeDiscriminator.mustache b/modules/openapi-generator/src/main/resources/elm/modelTypeDiscriminator.mustache index 0abd0e71fa..0284323476 100644 --- a/modules/openapi-generator/src/main/resources/elm/modelTypeDiscriminator.mustache +++ b/modules/openapi-generator/src/main/resources/elm/modelTypeDiscriminator.mustache @@ -30,3 +30,8 @@ encode model = {{modelName}}.encode "{{mappingName}}" subModel {{/mappedModels}} + + +toString : {{classname}} -> String +toString = + Encode.encode 0 << encode diff --git a/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache b/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache index 0eeb7df56f..376f8fc81d 100644 --- a/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache +++ b/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache @@ -10,3 +10,8 @@ decoder = encode : {{classname}} -> Encode.Value encode = {{vendorExtensions.elmEncoder}} + + +toString : {{classname}} -> String +toString = + {{>toString}} diff --git a/modules/openapi-generator/src/main/resources/elm/modelTypeRecord.mustache b/modules/openapi-generator/src/main/resources/elm/modelTypeRecord.mustache index cb2e518579..bbe185a36a 100644 --- a/modules/openapi-generator/src/main/resources/elm/modelTypeRecord.mustache +++ b/modules/openapi-generator/src/main/resources/elm/modelTypeRecord.mustache @@ -14,6 +14,13 @@ type alias {{classname}} = {{>recordEncoder}} + + +toString : {{classname}} -> String +toString = + Encode.encode 0 << encode{{#vendorExtensions.discriminatorName}} ""{{/vendorExtensions.discriminatorName}} + + {{#vars}} {{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/elm/recordFieldEncoder.mustache b/modules/openapi-generator/src/main/resources/elm/recordFieldEncoder.mustache index 4bfef791c4..2a48bbc31b 100644 --- a/modules/openapi-generator/src/main/resources/elm/recordFieldEncoder.mustache +++ b/modules/openapi-generator/src/main/resources/elm/recordFieldEncoder.mustache @@ -1 +1 @@ -( "{{baseName}}", {{#discriminatorValue}}Encode.string "{{discriminatorValue}}"{{/discriminatorValue}}{{^discriminatorValue}}{{^required}}{{^isNullable}}Maybe.withDefault Encode.null (Maybe.map {{/isNullable}}{{/required}}{{>recordFieldValueEncoder}} model.{{name}}{{^required}}{{^isNullable}}){{/isNullable}}{{/required}}{{/discriminatorValue}} ) \ No newline at end of file +( "{{baseName}}", {{#discriminatorValue}}Encode.string "{{discriminatorValue}}"{{/discriminatorValue}}{{^discriminatorValue}}{{^required}}{{^isNullable}}Maybe.withDefault Encode.null (Maybe.map {{/isNullable}}{{/required}}{{>recordFieldValueEncoder}} model.{{name}}{{#isNullable}}){{/isNullable}}{{^required}}{{^isNullable}}){{/isNullable}}{{/required}}{{/discriminatorValue}} ) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache b/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache index 03a57989f1..f461987d5c 100644 --- a/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache +++ b/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache @@ -1 +1 @@ -{{#isNullable}}(Decode.nullable {{/isNullable}}{{#isContainer}}({{#isListContainer}}Decode.list{{/isListContainer}}{{#isMapContainer}}Decode.dict{{/isMapContainer}} {{#items}}{{>recordFieldValueDecoder}}{{/items}}){{/isContainer}}{{^isContainer}}{{vendorExtensions.elmDecoder}}{{/isContainer}}{{#isNullable}}) {{{defaultValue}}}{{/isNullable}} \ No newline at end of file +{{#isNullable}}(Decode.nullable {{/isNullable}}{{#isContainer}}({{#isListContainer}}Decode.list{{/isListContainer}}{{#isMapContainer}}Decode.dict{{/isMapContainer}} {{#items}}{{>recordFieldValueDecoder}}{{/items}}){{/isContainer}}{{^isContainer}}{{vendorExtensions.elmDecoder}}{{/isContainer}}{{#isNullable}}){{^required}} {{{defaultValue}}}{{/required}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/elm/recordFieldValueEncoder.mustache b/modules/openapi-generator/src/main/resources/elm/recordFieldValueEncoder.mustache index 88a3d811a0..ecd856a1a7 100644 --- a/modules/openapi-generator/src/main/resources/elm/recordFieldValueEncoder.mustache +++ b/modules/openapi-generator/src/main/resources/elm/recordFieldValueEncoder.mustache @@ -1 +1 @@ -{{#isNullable}}Maybe.withDefault Encode.null (Maybe.map {{/isNullable}}{{#isContainer}}({{#isListContainer}}Encode.list{{#isElm018}} << List.map{{/isElm018}}{{/isListContainer}}{{#isMapContainer}}Encode.dict identity{{/isMapContainer}} {{#items}}{{>recordFieldValueEncoder}}{{/items}}{{/isContainer}}{{^isContainer}}{{vendorExtensions.elmEncoder}}{{/isContainer}}{{#isContainer}}){{/isContainer}}{{#isNullable}}){{/isNullable}} \ No newline at end of file +{{#isNullable}}Maybe.withDefault Encode.null (Maybe.map {{/isNullable}}{{#isContainer}}({{#isListContainer}}Encode.list{{#isElm018}} << List.map{{/isElm018}}{{/isListContainer}}{{#isMapContainer}}Encode.dict identity{{/isMapContainer}} {{#items}}{{>recordFieldValueEncoder}}{{/items}}{{/isContainer}}{{^isContainer}}{{vendorExtensions.elmEncoder}}{{/isContainer}}{{#isContainer}}){{/isContainer}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/elm/toString.mustache b/modules/openapi-generator/src/main/resources/elm/toString.mustache new file mode 100644 index 0000000000..c2928dc04d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/elm/toString.mustache @@ -0,0 +1 @@ +{{#isListContainer}}String.join "," << List.map {{#items}}{{>toString}}{{/items}}{{/isListContainer}}{{^isListContainer}}{{^isEnum}}{{#isString}}identity{{/isString}}{{#isBinary}}identity{{/isBinary}}{{#isByteArray}}identity{{/isByteArray}}{{/isEnum}}{{#isBoolean}}(\val -> if val then "true" else "false"){{/isBoolean}}{{#isDateTime}}DateTime.toString{{/isDateTime}}{{#isDate}}DateOnly.toString{{/isDate}}{{#isElm018}}toString{{/isElm018}}{{^isElm018}}{{#isInteger}}String.fromInt{{/isInteger}}{{#isLong}}String.fromInt{{/isLong}}{{#isFloat}}String.fromFloat{{/isFloat}}{{#isDouble}}String.fromFloat{{/isDouble}}{{#isEnum}}stringify{{enumName}}{{/isEnum}}{{^isEnum}}{{^isString}}{{^isBinary}}{{^isByteArray}}{{^isBoolean}}{{^isDouble}}{{^isFloat}}{{^isLong}}{{^isInteger}}{{dataType}}.toString{{/isInteger}}{{/isLong}}{{/isFloat}}{{/isDouble}}{{/isBoolean}}{{/isByteArray}}{{/isBinary}}{{/isString}}{{/isEnum}}{{/isElm018}}{{/isListContainer}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/go-experimental/api.mustache b/modules/openapi-generator/src/main/resources/go-experimental/api.mustache index 41a990f9e5..c0f9962ec7 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/api.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/api.mustache @@ -319,7 +319,9 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{#responses}} {{#dataType}} + {{^wildcard}} if localVarHTTPResponse.StatusCode == {{{code}}} { + {{/wildcard}} var v {{{dataType}}} err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -327,8 +329,13 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr } newErr.model = v + {{#hasMore}} return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + {{/hasMore}} + {{^wildcard}} } + {{/wildcard}} {{/dataType}} {{/responses}} return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr diff --git a/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache b/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache index 2ac67bb222..d7eda37d71 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache @@ -15,6 +15,7 @@ Method | HTTP request | Description ## {{{operationId}}} > {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}(ctx, {{#allParams}}{{#required}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) + {{{summary}}}{{#notes}} {{{notes}}}{{/notes}} diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache index 2b97b31b3c..c72fab46a9 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache @@ -1,15 +1,15 @@ {{>partial_header}} package {{packageName}} + {{#models}} -{{#imports}} -{{#-first}} import ( -{{/-first}} + "bytes" + "encoding/json" +{{#imports}} "{{import}}" -{{#-last}} -) -{{/-last}} {{/imports}} +) + {{#model}} {{#isEnum}} // {{{classname}}} {{#description}}{{{.}}}{{/description}}{{^description}}the model '{{{classname}}}'{{/description}} @@ -21,10 +21,36 @@ const ( {{#enumVars}} {{^-first}} {{/-first}} - {{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = "{{{value}}}" + {{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = {{{value}}} {{/enumVars}} {{/allowableValues}} ) + +type Nullable{{{classname}}} struct { + Value {{{classname}}} + ExplicitNull bool +} + +func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != "": + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + {{/isEnum}} {{^isEnum}} // {{classname}}{{#description}} {{{description}}}{{/description}}{{^description}} struct for {{{classname}}}{{/description}} @@ -35,15 +61,32 @@ type {{classname}} struct { {{#description}} // {{{description}}} {{/description}} - {{name}} *{{{dataType}}} `json:"{{baseName}},omitempty"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` -{{#isNullable}} isExplicitNull{{name}} bool `json:"-"{{#withXml}} xml:"-"{{/withXml}}`{{/isNullable}} + {{name}} {{^required}}*{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` {{/vars}} } {{/isEnum}} {{^isEnum}} {{#vars}} -// Get{{name}} returns the {{name}} field if non-nil, zero value otherwise. +{{#required}} +// Get{{name}} returns the {{name}} field value +func (o *{{classname}}) Get{{name}}() {{dataType}} { + if o == nil { + var ret {{dataType}} + return ret + } + + return o.{{name}} +} + +// Set{{name}} sets field value +func (o *{{classname}}) Set{{name}}(v {{dataType}}) { + o.{{name}} = v +} + +{{/required}} +{{^required}} +// Get{{name}} returns the {{name}} field value if set, zero value otherwise. func (o *{{classname}}) Get{{name}}() {{dataType}} { if o == nil || o.{{name}} == nil { var ret {{dataType}} @@ -52,7 +95,7 @@ func (o *{{classname}}) Get{{name}}() {{dataType}} { return *o.{{name}} } -// Get{{name}}Ok returns a tuple with the {{name}} field if it's non-nil, zero value otherwise +// Get{{name}}Ok returns a tuple with the {{name}} field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *{{classname}}) Get{{name}}Ok() ({{dataType}}, bool) { if o == nil || o.{{name}} == nil { @@ -76,54 +119,30 @@ func (o *{{classname}}) Set{{name}}(v {{dataType}}) { o.{{name}} = &v } -{{#isNullable}} -// Set{{name}}ExplicitNull (un)sets {{name}} to be considered as explicit "null" value -// when serializing to JSON (pass true as argument to set this, false to unset) -// The {{name}} value is set to nil even if false is passed -func (o *{{classname}}) Set{{name}}ExplicitNull(b bool) { - o.{{name}} = nil - o.isExplicitNull{{name}} = b -} -{{/isNullable}} +{{/required}} {{/vars}} - -// MarshalJSON returns the JSON representation of the model. -func (o {{classname}}) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - {{#vars}} - {{#required}} - {{! if argument is required and not nullable, it can't be nil}} - {{^isNullable}} - if o.{{name}} == nil { - return nil, errors.New("{{name}} is required and not nullable, but was not set on {{classname}}") - }{{/isNullable}} - {{! if argument is required and nullable, it *must* have isExplicitNull set to true when it's nil}} - {{#isNullable}} - if o.{{name}} == nil && !o.isExplicitNull{{name}} { - return nil, errors.New("{{name}} is required and nullable, but it wasn't set to be explicit null") - } - {{/isNullable}} - {{/required}} - {{! if argument is nullable, only serialize it if it is nil *and* was explicitly set to nil}} - {{#isNullable}} - if o.{{name}} == nil { - if o.isExplicitNull{{name}} { - toSerialize["{{baseName}}"] = o.{{name}} - } - } else { - toSerialize["{{baseName}}"] = o.{{name}} - } - {{/isNullable}} - {{! if argument is not nullable, don't set it if it is nil}} - {{^isNullable}} - if o.{{name}} != nil { - toSerialize["{{baseName}}"] = o.{{name}} - } - {{/isNullable}} - {{/vars}} - return json.Marshal(toSerialize) +type Nullable{{{classname}}} struct { + Value {{{classname}}} + ExplicitNull bool } +func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} {{/isEnum}} {{/model}} diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache index 98040dcb25..523122f4e0 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | Pointer to {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | Pointer to {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} {{^isEnum}} diff --git a/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache b/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache index e3598373cb..4502401b6e 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache @@ -1,7 +1,14 @@ {{>partial_header}} package {{packageName}} -import "time" +import ( + "bytes" + "encoding/json" + "errors" + "time" +) + +var ErrInvalidNullable = errors.New("nullable cannot have non-zero Value and ExplicitNull simultaneously") // PtrBool is a helper routine that returns a pointer to given integer value. func PtrBool(v bool) *bool { return &v } @@ -15,9 +22,6 @@ func PtrInt32(v int32) *int32 { return &v } // PtrInt64 is a helper routine that returns a pointer to given integer value. func PtrInt64(v int64) *int64 { return &v } -// PtrFloat is a helper routine that returns a pointer to given float value. -func PtrFloat(v float32) *float32 { return &v } - // PtrFloat32 is a helper routine that returns a pointer to given float value. func PtrFloat32(v float32) *float32 { return &v } @@ -28,4 +32,205 @@ func PtrFloat64(v float64) *float64 { return &v } func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } \ No newline at end of file +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + Value bool + ExplicitNull bool +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt struct { + Value int + ExplicitNull bool +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt32 struct { + Value int32 + ExplicitNull bool +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt64 struct { + Value int64 + ExplicitNull bool +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableFloat32 struct { + Value float32 + ExplicitNull bool +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0.0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableFloat64 struct { + Value float64 + ExplicitNull bool +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0.0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableString struct { + Value string + ExplicitNull bool +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != "": + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableTime struct { + Value time.Time + ExplicitNull bool +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && !v.Value.IsZero(): + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return v.Value.MarshalJSON() + } +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/go-gin-server/model.mustache b/modules/openapi-generator/src/main/resources/go-gin-server/model.mustache index 3840868023..b6ae9ba9f3 100644 --- a/modules/openapi-generator/src/main/resources/go-gin-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-gin-server/model.mustache @@ -11,7 +11,7 @@ type {{{name}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/form const ( {{#allowableValues}} {{#enumVars}} - {{name}} {{{classname}}} = "{{{value}}}" + {{name}} {{{classname}}} = {{{value}}} {{/enumVars}} {{/allowableValues}} ){{/isEnum}}{{^isEnum}}{{#description}} diff --git a/modules/openapi-generator/src/main/resources/go-server/model.mustache b/modules/openapi-generator/src/main/resources/go-server/model.mustache index 3840868023..b6ae9ba9f3 100644 --- a/modules/openapi-generator/src/main/resources/go-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/model.mustache @@ -11,7 +11,7 @@ type {{{name}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/form const ( {{#allowableValues}} {{#enumVars}} - {{name}} {{{classname}}} = "{{{value}}}" + {{name}} {{{classname}}} = {{{value}}} {{/enumVars}} {{/allowableValues}} ){{/isEnum}}{{^isEnum}}{{#description}} diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache index dc0a2f4dc8..dab8df661a 100644 --- a/modules/openapi-generator/src/main/resources/go/api.mustache +++ b/modules/openapi-generator/src/main/resources/go/api.mustache @@ -317,7 +317,9 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{#responses}} {{#dataType}} + {{^wildcard}} if localVarHTTPResponse.StatusCode == {{{code}}} { + {{/wildcard}} var v {{{dataType}}} err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -325,8 +327,12 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr } newErr.model = v + {{#hasMore}} return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + {{/hasMore}} + {{^wildcard}} } + {{/wildcard}} {{/dataType}} {{/responses}} return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr diff --git a/modules/openapi-generator/src/main/resources/go/api_doc.mustache b/modules/openapi-generator/src/main/resources/go/api_doc.mustache index 2ac67bb222..d7eda37d71 100644 --- a/modules/openapi-generator/src/main/resources/go/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go/api_doc.mustache @@ -15,6 +15,7 @@ Method | HTTP request | Description ## {{{operationId}}} > {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}(ctx, {{#allParams}}{{#required}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) + {{{summary}}}{{#notes}} {{{notes}}}{{/notes}} diff --git a/modules/openapi-generator/src/main/resources/go/go.mod.mustache b/modules/openapi-generator/src/main/resources/go/go.mod.mustache index e02a1be201..cc360b34f4 100644 --- a/modules/openapi-generator/src/main/resources/go/go.mod.mustache +++ b/modules/openapi-generator/src/main/resources/go/go.mod.mustache @@ -1,6 +1,8 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}} +go 1.13 + require ( - github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 + golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a ) diff --git a/modules/openapi-generator/src/main/resources/go/go.sum b/modules/openapi-generator/src/main/resources/go/go.sum index e3c16fef3a..97b347238f 100644 --- a/modules/openapi-generator/src/main/resources/go/go.sum +++ b/modules/openapi-generator/src/main/resources/go/go.sum @@ -1,11 +1,15 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/modules/openapi-generator/src/main/resources/go/model.mustache b/modules/openapi-generator/src/main/resources/go/model.mustache index 72359c5700..201fd507ff 100644 --- a/modules/openapi-generator/src/main/resources/go/model.mustache +++ b/modules/openapi-generator/src/main/resources/go/model.mustache @@ -21,7 +21,7 @@ const ( {{#enumVars}} {{^-first}} {{/-first}} - {{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = "{{{value}}}" + {{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = {{{value}}} {{/enumVars}} {{/allowableValues}} ) diff --git a/modules/openapi-generator/src/main/resources/go/model_doc.mustache b/modules/openapi-generator/src/main/resources/go/model_doc.mustache index 546238243b..e96a7f5325 100644 --- a/modules/openapi-generator/src/main/resources/go/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_doc.mustache @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isNullable}}Pointer to {{/isNullable}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isNullable}}Pointer to {{/isNullable}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/model_doc.mustache b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/model_doc.mustache index ccfd3f8d0d..8aef492cc0 100644 --- a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/graphql-schema/model_doc.mustache b/modules/openapi-generator/src/main/resources/graphql-schema/model_doc.mustache index ccfd3f8d0d..8aef492cc0 100644 --- a/modules/openapi-generator/src/main/resources/graphql-schema/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-schema/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/haskell-http-client/Model.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/Model.mustache index 3132f106bd..5c45d2f0c1 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/Model.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/Model.mustache @@ -74,7 +74,7 @@ newtype {{classname}} = {{classname}} { un{{classname}} :: {{{vendorExtensions.x-dataType}}} } deriving (P.Eq, P.Show, P.Typeable, A.ToJSON, A.FromJSON{{#modelDeriving}}, {{modelDeriving}}{{/modelDeriving}}){{/isAlias}}{{^isAlias}} data {{classname}} = {{classname}} - { {{#vars}}{{name}} :: {{#x-strictFields}}!({{/x-strictFields}}{{^required}}Maybe {{/required}}{{{vendorExtensions.x-dataType}}}{{#x-strictFields}}){{/x-strictFields}} -- ^ {{#required}}/Required/ {{/required}}{{#readOnly}}/ReadOnly/ {{/readOnly}}"{{baseName}}"{{#description}} - {{description}}{{/description}}{{#hasMore}} + { {{#vars}}{{name}} :: {{#x-strictFields}}!({{/x-strictFields}}{{^required}}Maybe {{/required}}{{{vendorExtensions.x-dataType}}}{{#x-strictFields}}){{/x-strictFields}} -- ^ {{#required}}/Required/ {{/required}}{{#isReadOnly}}/ReadOnly/ {{/isReadOnly}}"{{baseName}}"{{#description}} - {{description}}{{/description}}{{#hasMore}} , {{/hasMore}}{{/vars}} } deriving (P.Show, P.Eq, P.Typeable{{#modelDeriving}}, {{modelDeriving}}{{/modelDeriving}}){{/isAlias}} diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/stack.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/stack.mustache index ef3c63b223..7023285982 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/stack.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/stack.mustache @@ -1,8 +1,7 @@ -resolver: lts-14.3 +resolver: lts-14.7 build: haddock-arguments: haddock-args: - "--odir=./docs" -extra-deps: [ katip-0.8.3.0 ] packages: - '.' diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/typeInfoAnnotation.mustache index 8e4b33b784..a8ab10768e 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/typeInfoAnnotation.mustache @@ -1,6 +1,6 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache index 9ee04616e1..14e11991fa 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache @@ -17,7 +17,7 @@ import {{packageName}}.infrastructure.Success import {{packageName}}.infrastructure.toMultiValue {{#operations}} -class {{classname}}(basePath: kotlin.String = "{{{basePath}}}") : ApiClient(basePath) { +{{#nonPublicApi}}internal {{/nonPublicApi}}class {{classname}}(basePath: kotlin.String = "{{{basePath}}}") : ApiClient(basePath) { {{#operation}} /** diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache index e735dc05a2..89e0197f8f 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache @@ -35,7 +35,12 @@ dependencies { {{#gson}} implementation "com.google.code.gson:gson:2.8.5" {{/gson}} - compile "com.squareup.okhttp3:okhttp:4.0.1" + {{#jvm-okhttp3}} + compile "com.squareup.okhttp3:okhttp:3.12.4" + {{/jvm-okhttp3}} + {{#jvm-okhttp4}} + compile "com.squareup.okhttp3:okhttp:4.2.0" + {{/jvm-okhttp4}} {{#threetenbp}} compile "org.threeten:threetenbp:1.3.8" {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/class_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/class_doc.mustache index b363fc5a61..a3405b25c8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/class_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/class_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}} +{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache index 1cb58bb49e..a0630c4fa0 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache @@ -28,7 +28,7 @@ import java.io.Serializable @Parcelize {{/parcelizeModels}} {{#multiplatform}}@Serializable{{/multiplatform}} -data class {{classname}} ( +{{#nonPublicApi}}internal {{/nonPublicApi}}data class {{classname}} ( {{#requiredVars}} {{>data_class_req_var}}{{^-last}}, {{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, @@ -37,16 +37,25 @@ data class {{classname}} ( ) {{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}} {{^parcelizeModels}}{{#serializableModel}}: Serializable {{/serializableModel}}{{/parcelizeModels}} {{#parcelizeModels}}{{#serializableModel}} : Parcelable, Serializable {{/serializableModel}}{{/parcelizeModels}} -{{#hasEnums}} +{{#vendorExtensions.x-has-data-class-body}} { -{{#vars}}{{#isEnum}} +{{/vendorExtensions.x-has-data-class-body}} +{{#serializableModel}} + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object { + private const val serialVersionUID: Long = 123 + } +{{/serializableModel}} +{{#hasEnums}} +{{#vars}} +{{#isEnum}} /** * {{{description}}} * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ {{#multiplatform}}@Serializable(with = {{nameInCamelCase}}.Serializer::class){{/multiplatform}} - enum class {{{nameInCamelCase}}}(val value: {{#isListContainer}}{{{ nestedType }}}{{/isListContainer}}{{^isListContainer}}{{{dataType}}}{{/isListContainer}}){ - {{#allowableValues}}{{#enumVars}} + {{#nonPublicApi}}internal {{/nonPublicApi}}enum class {{{nameInCamelCase}}}(val value: {{#isListContainer}}{{{ nestedType }}}{{/isListContainer}}{{^isListContainer}}{{{dataType}}}{{/isListContainer}}){ + {{#allowableValues}} + {{#enumVars}} {{#jvm}} {{#moshi}} @Json(name = {{{value}}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} @@ -58,12 +67,16 @@ data class {{classname}} ( {{#multiplatform}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/multiplatform}} - {{/enumVars}}{{/allowableValues}} - + {{/enumVars}} + {{/allowableValues}} {{#multiplatform}} - object Serializer : CommonEnumSerializer<{{nameInCamelCase}}>("{{nameInCamelCase}}", values(), values().map { it.value }.toTypedArray()) + + {{#nonPublicApi}}internal {{/nonPublicApi}}object Serializer : CommonEnumSerializer<{{nameInCamelCase}}>("{{nameInCamelCase}}", values(), values().map { it.value }.toTypedArray()) {{/multiplatform}} } -{{/isEnum}}{{/vars}} -} +{{/isEnum}} +{{/vars}} {{/hasEnums}} +{{#vendorExtensions.x-has-data-class-body}} +} +{{/vendorExtensions.x-has-data-class-body}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache index ccf8eb0c89..102a2a2f93 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache @@ -16,7 +16,7 @@ import kotlinx.serialization.internal.CommonEnumSerializer * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ {{#multiplatform}}@Serializable(with = {{classname}}.Serializer::class){{/multiplatform}} -enum class {{classname}}(val value: {{{dataType}}}){ +{{#nonPublicApi}}internal {{/nonPublicApi}}enum class {{classname}}(val value: {{{dataType}}}){ {{#allowableValues}}{{#enumVars}} {{#jvm}} @@ -42,6 +42,6 @@ enum class {{classname}}(val value: {{{dataType}}}){ {{/enumVars}}{{/allowableValues}} {{#multiplatform}} - object Serializer : CommonEnumSerializer<{{classname}}>("{{classname}}", values(), values().map { it.value }.toTypedArray()) + {{#nonPublicApi}}internal {{/nonPublicApi}}object Serializer : CommonEnumSerializer<{{classname}}>("{{classname}}", values(), values().map { it.value }.toTypedArray()) {{/multiplatform}} } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/ApiAbstractions.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/ApiAbstractions.kt.mustache index 6123c8b01b..7cdc8cc962 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/ApiAbstractions.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/ApiAbstractions.kt.mustache @@ -2,7 +2,7 @@ package {{packageName}}.infrastructure typealias MultiValueMap = Map> -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { +{{#nonPublicApi}}internal {{/nonPublicApi}}fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { "csv" -> "," "tsv" -> "\t" "pipes" -> "|" @@ -10,12 +10,12 @@ fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { else -> "" } -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } +{{#nonPublicApi}}internal {{/nonPublicApi}}val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) +{{#nonPublicApi}}internal {{/nonPublicApi}}fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) = toMultiValue(items.asIterable(), collectionFormat, map) -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { +{{#nonPublicApi}}internal {{/nonPublicApi}}fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { return when(collectionFormat) { "multi" -> items.map(map) else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache index 7216feeb01..bac8d60f7a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache @@ -8,7 +8,7 @@ package {{packageName}}.infrastructure * NOTE: Headers is a Map because rfc2616 defines * multi-valued headers as csv-only. */ -data class RequestConfig( +{{#nonPublicApi}}internal {{/nonPublicApi}}data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestMethod.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestMethod.kt.mustache index 5774235985..8c7c162f47 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestMethod.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestMethod.kt.mustache @@ -3,6 +3,6 @@ package {{packageName}}.infrastructure /** * Provides enumerated HTTP verbs */ -enum class RequestMethod { +{{#nonPublicApi}}internal {{/nonPublicApi}}enum class RequestMethod { GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiClient.kt.mustache index e57a0addfd..1cd9edcf4b 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiClient.kt.mustache @@ -2,17 +2,29 @@ package {{packageName}}.infrastructure import okhttp3.OkHttpClient import okhttp3.RequestBody +{{#jvm-okhttp3}} +import okhttp3.MediaType +{{/jvm-okhttp3}} +{{#jvm-okhttp4}} import okhttp3.RequestBody.Companion.asRequestBody import okhttp3.RequestBody.Companion.toRequestBody +{{/jvm-okhttp4}} import okhttp3.FormBody +{{#jvm-okhttp3}} +import okhttp3.HttpUrl +{{/jvm-okhttp3}} +{{#jvm-okhttp4}} import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +{{/jvm-okhttp4}} import okhttp3.ResponseBody +{{#jvm-okhttp4}} import okhttp3.MediaType.Companion.toMediaTypeOrNull +{{/jvm-okhttp4}} import okhttp3.Request import java.io.File -open class ApiClient(val baseUrl: String) { - companion object { +{{#nonPublicApi}}internal {{/nonPublicApi}}open class ApiClient(val baseUrl: String) { + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object { protected const val ContentType = "Content-Type" protected const val Accept = "Accept" protected const val Authorization = "Authorization" @@ -38,9 +50,16 @@ open class ApiClient(val baseUrl: String) { protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = when { + {{#jvm-okhttp3}} + content is File -> RequestBody.create( + MediaType.parse(mediaType), content + ) + {{/jvm-okhttp3}} + {{#jvm-okhttp4}} content is File -> content.asRequestBody( mediaType.toMediaTypeOrNull() ) + {{/jvm-okhttp4}} mediaType == FormDataMediaType || mediaType == FormUrlEncMediaType -> { FormBody.Builder().apply { // content's type *must* be Map @@ -50,9 +69,16 @@ open class ApiClient(val baseUrl: String) { } }.build() } + {{#jvm-okhttp3}} + mediaType == JsonMediaType -> RequestBody.create( + MediaType.parse(mediaType), Serializer.moshi.adapter(T::class.java).toJson(content) + ) + {{/jvm-okhttp3}} + {{#jvm-okhttp4}} mediaType == JsonMediaType -> Serializer.moshi.adapter(T::class.java).toJson(content).toRequestBody( mediaType.toMediaTypeOrNull() ) + {{/jvm-okhttp4}} mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") // TODO: this should be extended with other serializers else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") @@ -123,7 +149,12 @@ open class ApiClient(val baseUrl: String) { {{/hasAuthMethods}} protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + {{#jvm-okhttp3}} + val httpUrl = HttpUrl.parse(baseUrl) ?: throw IllegalStateException("baseUrl is invalid.") + {{/jvm-okhttp3}} + {{#jvm-okhttp4}} val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") + {{/jvm-okhttp4}} {{#hasAuthMethods}} // take authMethod from operation @@ -161,7 +192,7 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete() + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) @@ -178,29 +209,29 @@ open class ApiClient(val baseUrl: String) { // TODO: handle specific mapping types. e.g. Map> when { response.isRedirect -> return Redirection( - response.code, - response.headers.toMultimap() + response.code{{#jvm-okhttp3}}(){{/jvm-okhttp3}}, + response.headers{{#jvm-okhttp3}}(){{/jvm-okhttp3}}.toMultimap() ) response.isInformational -> return Informational( - response.message, - response.code, - response.headers.toMultimap() + response.message{{#jvm-okhttp3}}(){{/jvm-okhttp3}}, + response.code{{#jvm-okhttp3}}(){{/jvm-okhttp3}}, + response.headers{{#jvm-okhttp3}}(){{/jvm-okhttp3}}.toMultimap() ) response.isSuccessful -> return Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() + responseBody(response.body{{#jvm-okhttp3}}(){{/jvm-okhttp3}}, accept), + response.code{{#jvm-okhttp3}}(){{/jvm-okhttp3}}, + response.headers{{#jvm-okhttp3}}(){{/jvm-okhttp3}}.toMultimap() ) response.isClientError -> return ClientError( - response.body?.string(), - response.code, - response.headers.toMultimap() + response.body{{#jvm-okhttp3}}(){{/jvm-okhttp3}}?.string(), + response.code{{#jvm-okhttp3}}(){{/jvm-okhttp3}}, + response.headers{{#jvm-okhttp3}}(){{/jvm-okhttp3}}.toMultimap() ) else -> return ServerError( null, - response.body?.string(), - response.code, - response.headers.toMultimap() + response.body{{#jvm-okhttp3}}(){{/jvm-okhttp3}}?.string(), + response.code{{#jvm-okhttp3}}(){{/jvm-okhttp3}}, + response.headers{{#jvm-okhttp3}}(){{/jvm-okhttp3}}.toMultimap() ) } } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiInfrastructureResponse.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiInfrastructureResponse.kt.mustache index 9b6bdad4ba..1970b34824 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiInfrastructureResponse.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiInfrastructureResponse.kt.mustache @@ -1,38 +1,38 @@ package {{packageName}}.infrastructure -enum class ResponseType { +{{#nonPublicApi}}internal {{/nonPublicApi}}enum class ResponseType { Success, Informational, Redirection, ClientError, ServerError } -abstract class ApiInfrastructureResponse(val responseType: ResponseType) { +{{#nonPublicApi}}internal {{/nonPublicApi}}abstract class ApiInfrastructureResponse(val responseType: ResponseType) { abstract val statusCode: Int abstract val headers: Map> } -class Success( +{{#nonPublicApi}}internal {{/nonPublicApi}}class Success( val data: T, override val statusCode: Int = -1, override val headers: Map> = mapOf() ): ApiInfrastructureResponse(ResponseType.Success) -class Informational( +{{#nonPublicApi}}internal {{/nonPublicApi}}class Informational( val statusText: String, override val statusCode: Int = -1, override val headers: Map> = mapOf() ) : ApiInfrastructureResponse(ResponseType.Informational) -class Redirection( +{{#nonPublicApi}}internal {{/nonPublicApi}}class Redirection( override val statusCode: Int = -1, override val headers: Map> = mapOf() ) : ApiInfrastructureResponse(ResponseType.Redirection) -class ClientError( +{{#nonPublicApi}}internal {{/nonPublicApi}}class ClientError( val body: Any? = null, override val statusCode: Int = -1, override val headers: Map> = mapOf() ) : ApiInfrastructureResponse(ResponseType.ClientError) -class ServerError( +{{#nonPublicApi}}internal {{/nonPublicApi}}class ServerError( val message: String? = null, val body: Any? = null, override val statusCode: Int = -1, diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApplicationDelegates.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApplicationDelegates.kt.mustache index bc4e1cd6a1..6311226317 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApplicationDelegates.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApplicationDelegates.kt.mustache @@ -3,7 +3,7 @@ package {{packageName}}.infrastructure import kotlin.properties.ReadWriteProperty import kotlin.reflect.KProperty -object ApplicationDelegates { +{{#nonPublicApi}}internal {{/nonPublicApi}}object ApplicationDelegates { /** * Provides a property delegate, allowing the property to be set once and only once. * diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ByteArrayAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ByteArrayAdapter.kt.mustache index 404f093eb6..aacd100ea7 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ByteArrayAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ByteArrayAdapter.kt.mustache @@ -3,7 +3,7 @@ package {{packageName}}.infrastructure import com.squareup.moshi.FromJson import com.squareup.moshi.ToJson -class ByteArrayAdapter { +{{#nonPublicApi}}internal {{/nonPublicApi}}class ByteArrayAdapter { @ToJson fun toJson(data: ByteArray): String = String(data) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/Errors.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/Errors.kt.mustache index 1f6d106d94..e1043e95b1 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/Errors.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/Errors.kt.mustache @@ -3,7 +3,7 @@ package {{packageName}}.infrastructure import java.lang.RuntimeException -open class ClientException : RuntimeException { +{{#nonPublicApi}}internal {{/nonPublicApi}}open class ClientException : RuntimeException { /** * Constructs an [ClientException] with no detail message. @@ -17,12 +17,12 @@ open class ClientException : RuntimeException { */ constructor(message: kotlin.String) : super(message) - companion object { + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object { private const val serialVersionUID: Long = 123L } } -open class ServerException : RuntimeException { +{{#nonPublicApi}}internal {{/nonPublicApi}}open class ServerException : RuntimeException { /** * Constructs an [ServerException] with no detail message. @@ -36,7 +36,7 @@ open class ServerException : RuntimeException { */ constructor(message: kotlin.String) : super(message) - companion object { + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object { private const val serialVersionUID: Long = 456L } } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/LocalDateAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/LocalDateAdapter.kt.mustache index 5f5d93af65..84635bd2f1 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/LocalDateAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/LocalDateAdapter.kt.mustache @@ -11,7 +11,7 @@ import org.threeten.bp.LocalDate import org.threeten.bp.format.DateTimeFormatter {{/threetenbp}} -class LocalDateAdapter { +{{#nonPublicApi}}internal {{/nonPublicApi}}class LocalDateAdapter { @ToJson fun toJson(value: LocalDate): String { return DateTimeFormatter.ISO_LOCAL_DATE.format(value) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/LocalDateTimeAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/LocalDateTimeAdapter.kt.mustache index 765144bad5..48f40dbe7c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/LocalDateTimeAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/LocalDateTimeAdapter.kt.mustache @@ -11,7 +11,7 @@ import org.threeten.bp.LocalDateTime import org.threeten.bp.format.DateTimeFormatter {{/threetenbp}} -class LocalDateTimeAdapter { +{{#nonPublicApi}}internal {{/nonPublicApi}}class LocalDateTimeAdapter { @ToJson fun toJson(value: LocalDateTime): String { return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ResponseExtensions.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ResponseExtensions.kt.mustache index 8dd8939983..93c69816bc 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ResponseExtensions.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ResponseExtensions.kt.mustache @@ -5,19 +5,19 @@ import okhttp3.Response /** * Provides an extension to evaluation whether the response is a 1xx code */ -val Response.isInformational : Boolean get() = this.code in 100..199 +{{#nonPublicApi}}internal {{/nonPublicApi}}val Response.isInformational : Boolean get() = this.code{{#jvm-okhttp3}}(){{/jvm-okhttp3}} in 100..199 /** * Provides an extension to evaluation whether the response is a 3xx code */ -val Response.isRedirect : Boolean get() = this.code in 300..399 +{{#nonPublicApi}}internal {{/nonPublicApi}}val Response.isRedirect : Boolean get() = this.code{{#jvm-okhttp3}}(){{/jvm-okhttp3}} in 300..399 /** * Provides an extension to evaluation whether the response is a 4xx code */ -val Response.isClientError : Boolean get() = this.code in 400..499 +{{#nonPublicApi}}internal {{/nonPublicApi}}val Response.isClientError : Boolean get() = this.code{{#jvm-okhttp3}}(){{/jvm-okhttp3}} in 400..499 /** * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code */ -val Response.isServerError : Boolean get() = this.code in 500..999 \ No newline at end of file +{{#nonPublicApi}}internal {{/nonPublicApi}}val Response.isServerError : Boolean get() = this.code{{#jvm-okhttp3}}(){{/jvm-okhttp3}} in 500..999 diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/Serializer.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/Serializer.kt.mustache index b370c468c6..699a78f923 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/Serializer.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/Serializer.kt.mustache @@ -5,7 +5,7 @@ import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date -object Serializer { +{{#nonPublicApi}}internal {{/nonPublicApi}}object Serializer { @JvmStatic val moshi: Moshi = Moshi.Builder() .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/UUIDAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/UUIDAdapter.kt.mustache index cd973554cd..a1ebc2cfce 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/UUIDAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/UUIDAdapter.kt.mustache @@ -4,7 +4,7 @@ import com.squareup.moshi.FromJson import com.squareup.moshi.ToJson import java.util.UUID -class UUIDAdapter { +{{#nonPublicApi}}internal {{/nonPublicApi}}class UUIDAdapter { @ToJson fun toJson(uuid: UUID) = uuid.toString() diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache index bab78f865b..89777b14b8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache @@ -16,7 +16,7 @@ import kotlinx.serialization.* import kotlinx.serialization.internal.StringDescriptor {{#operations}} -class {{classname}} @UseExperimental(UnstableDefault::class) constructor( +{{#nonPublicApi}}internal {{/nonPublicApi}}class {{classname}} @UseExperimental(UnstableDefault::class) constructor( baseUrl: kotlin.String = "{{{basePath}}}", httpClientEngine: HttpClientEngine? = null, serializer: KotlinxSerializer) @@ -101,7 +101,7 @@ class {{classname}} @UseExperimental(UnstableDefault::class) constructor( {{/operation}} - companion object { + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object { internal fun setMappers(serializer: KotlinxSerializer) { {{#operation}} {{#hasBodyParam}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache index fdb83114b7..26927bfd48 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache @@ -24,7 +24,7 @@ import kotlinx.serialization.json.JsonConfiguration import {{apiPackage}}.* import {{modelPackage}}.* -open class ApiClient( +{{#nonPublicApi}}internal {{/nonPublicApi}}open class ApiClient( private val baseUrl: String, httpClientEngine: HttpClientEngine?, serializer: KotlinxSerializer) { @@ -46,7 +46,7 @@ open class ApiClient( httpClientEngine?.let { HttpClient(it, clientConfig) } ?: HttpClient(clientConfig) } - companion object { + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object { protected val UNSAFE_HEADERS = listOf(HttpHeaders.ContentType) private fun setMappers(serializer: KotlinxSerializer) { diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/HttpResponse.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/HttpResponse.kt.mustache index 6bf43085b7..87f27a5cf5 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/HttpResponse.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/HttpResponse.kt.mustache @@ -5,14 +5,14 @@ import io.ktor.client.call.typeInfo import io.ktor.http.Headers import io.ktor.http.isSuccess -open class HttpResponse(val response: io.ktor.client.response.HttpResponse, val provider: BodyProvider) { +{{#nonPublicApi}}internal {{/nonPublicApi}}open class HttpResponse(val response: io.ktor.client.response.HttpResponse, val provider: BodyProvider) { val status: Int = response.status.value val success: Boolean = response.status.isSuccess() val headers: Map> = response.headers.mapEntries() suspend fun body(): T = provider.body(response) suspend fun typedBody(type: TypeInfo): V = provider.typedBody(response, type) - companion object { + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object { private fun Headers.mapEntries(): Map> { val result = mutableMapOf>() entries().forEach { result[it.key] = it.value } @@ -21,12 +21,12 @@ open class HttpResponse(val response: io.ktor.client.response.HttpRespo } } -interface BodyProvider { +{{#nonPublicApi}}internal {{/nonPublicApi}}interface BodyProvider { suspend fun body(response: io.ktor.client.response.HttpResponse): T suspend fun typedBody(response: io.ktor.client.response.HttpResponse, type: TypeInfo): V } -class TypedBodyProvider(private val type: TypeInfo) : BodyProvider { +{{#nonPublicApi}}internal {{/nonPublicApi}}class TypedBodyProvider(private val type: TypeInfo) : BodyProvider { @Suppress("UNCHECKED_CAST") override suspend fun body(response: io.ktor.client.response.HttpResponse): T = response.call.receive(type) as T @@ -36,7 +36,7 @@ class TypedBodyProvider(private val type: TypeInfo) : BodyProvider { response.call.receive(type) as V } -class MappedBodyProvider(private val provider: BodyProvider, private val block: S.() -> T) : BodyProvider { +{{#nonPublicApi}}internal {{/nonPublicApi}}class MappedBodyProvider(private val provider: BodyProvider, private val block: S.() -> T) : BodyProvider { override suspend fun body(response: io.ktor.client.response.HttpResponse): T = block(provider.body(response)) @@ -44,8 +44,8 @@ class MappedBodyProvider(private val provider: BodyProvider provider.typedBody(response, type) } -inline fun io.ktor.client.response.HttpResponse.wrap(): HttpResponse = +{{#nonPublicApi}}internal {{/nonPublicApi}}inline fun io.ktor.client.response.HttpResponse.wrap(): HttpResponse = HttpResponse(this, TypedBodyProvider(typeInfo())) -fun HttpResponse.map(block: T.() -> V): HttpResponse = +{{#nonPublicApi}}internal {{/nonPublicApi}}fun HttpResponse.map(block: T.() -> V): HttpResponse = HttpResponse(response, MappedBodyProvider(provider, block)) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_request_list.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_request_list.mustache index 1e240683b8..6b07c05f44 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_request_list.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_request_list.mustache @@ -1,7 +1,7 @@ @Serializable private class {{operationIdCamelCase}}Request(val value: List<{{#bodyParam}}{{baseType}}{{/bodyParam}}>) { @Serializer({{operationIdCamelCase}}Request::class) - companion object : KSerializer<{{operationIdCamelCase}}Request> { + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object : KSerializer<{{operationIdCamelCase}}Request> { private val serializer: KSerializer> = {{#bodyParam}}{{baseType}}{{/bodyParam}}.serializer().list override val descriptor = StringDescriptor.withName("{{operationIdCamelCase}}Request") override fun serialize(encoder: Encoder, obj: {{operationIdCamelCase}}Request) = serializer.serialize(encoder, obj.value) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_request_map.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_request_map.mustache index 7da90c9974..f3a28700ad 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_request_map.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_request_map.mustache @@ -1,7 +1,7 @@ @Serializable private class {{operationIdCamelCase}}Request(val value: Map) { @Serializer({{operationIdCamelCase}}Request::class) - companion object : KSerializer<{{operationIdCamelCase}}Request> { + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object : KSerializer<{{operationIdCamelCase}}Request> { private val serializer: KSerializer> = (kotlin.String.serializer() to {{#bodyParam}}{{baseType}}{{/bodyParam}}.serializer()).map override val descriptor = StringDescriptor.withName("{{operationIdCamelCase}}Request") override fun serialize(encoder: Encoder, obj: {{operationIdCamelCase}}Request) = serializer.serialize(encoder, obj.value) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_response_list.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_response_list.mustache index 91403ee50b..838a8f1e53 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_response_list.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_response_list.mustache @@ -1,7 +1,7 @@ @Serializable private class {{operationIdCamelCase}}Response(val value: List<{{returnBaseType}}>) { @Serializer({{operationIdCamelCase}}Response::class) - companion object : KSerializer<{{operationIdCamelCase}}Response> { + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object : KSerializer<{{operationIdCamelCase}}Response> { private val serializer: KSerializer> = {{returnBaseType}}.serializer().list override val descriptor = StringDescriptor.withName("{{operationIdCamelCase}}Response") override fun serialize(encoder: Encoder, obj: {{operationIdCamelCase}}Response) = serializer.serialize(encoder, obj.value) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_response_map.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_response_map.mustache index 730e0b672c..c23dcadcdc 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_response_map.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/serial_wrapper_response_map.mustache @@ -1,7 +1,7 @@ @Serializable private class {{operationIdCamelCase}}Response(val value: Map) { @Serializer({{operationIdCamelCase}}Response::class) - companion object : KSerializer<{{operationIdCamelCase}}Response> { + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object : KSerializer<{{operationIdCamelCase}}Response> { private val serializer: KSerializer> = (kotlin.String.serializer() to {{returnBaseType}}.serializer()).map override val descriptor = StringDescriptor.withName("{{operationIdCamelCase}}Response") override fun serialize(encoder: Encoder, obj: {{operationIdCamelCase}}Response) = serializer.serialize(encoder, obj.value) diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/class_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/class_doc.mustache index b363fc5a61..a3405b25c8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/class_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/class_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}} +{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache index fe88e433f2..6c251cee2a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache @@ -21,19 +21,32 @@ data class {{classname}} ( {{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, {{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>data_class_opt_var}}{{^-last}}, {{/-last}}{{/optionalVars}} -) {{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}} -{{^parcelizeModels}}{{#serializableModel}}: Serializable {{/serializableModel}}{{/parcelizeModels}} -{{#parcelizeModels}}{{#serializableModel}} : Parcelable, Serializable {{/serializableModel}}{{/parcelizeModels}} +) {{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}}{{^parcelizeModels}}{{#serializableModel}}: Serializable {{/serializableModel}}{{/parcelizeModels}}{{#parcelizeModels}}{{#serializableModel}} : Parcelable, Serializable {{/serializableModel}}{{/parcelizeModels}} +{{#vendorExtensions.x-has-data-class-body}} { -{{#hasEnums}}{{#vars}}{{#isEnum}} +{{/vendorExtensions.x-has-data-class-body}} +{{#serializableModel}} + companion object { + private const val serialVersionUID: Long = 123 + } +{{/serializableModel}} +{{#hasEnums}} + {{#vars}} + {{#isEnum}} /** * {{{description}}} * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ enum class {{nameInCamelCase}}(val value: {{dataType}}){ - {{#allowableValues}}{{#enumVars}} + {{#allowableValues}} + {{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} - {{/enumVars}}{{/allowableValues}} + {{/enumVars}} + {{/allowableValues}} } -{{/isEnum}}{{/vars}}{{/hasEnums}} +{{/isEnum}} +{{/vars}} +{{/hasEnums}} +{{#vendorExtensions.x-has-data-class-body}} } +{{/vendorExtensions.x-has-data-class-body}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/typeInfoAnnotation.mustache index a110d9ea9c..35d740aa79 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/typeInfoAnnotation.mustache @@ -1,6 +1,6 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminatorName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes( {{#discriminator.mappedModels}} JsonSubTypes.Type(value = {{modelName}}::class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"){{^-last}},{{/-last}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/class_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/class_doc.mustache index b363fc5a61..a3405b25c8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/class_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/class_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}} +{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/lua/model_doc.mustache b/modules/openapi-generator/src/main/resources/lua/model_doc.mustache index ccfd3f8d0d..8aef492cc0 100644 --- a/modules/openapi-generator/src/main/resources/lua/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/lua/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/objc/model_doc.mustache b/modules/openapi-generator/src/main/resources/objc/model_doc.mustache index 0216a3372c..71c106fdc5 100644 --- a/modules/openapi-generator/src/main/resources/objc/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/objc/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/perl/object_doc.mustache b/modules/openapi-generator/src/main/resources/perl/object_doc.mustache index b7300173fc..fef90732de 100644 --- a/modules/openapi-generator/src/main/resources/perl/object_doc.mustache +++ b/modules/openapi-generator/src/main/resources/perl/object_doc.mustache @@ -8,7 +8,7 @@ use {{moduleName}}::Object::{{classname}}; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/php-symfony/model_doc.mustache b/modules/openapi-generator/src/main/resources/php-symfony/model_doc.mustache index 0216a3372c..71c106fdc5 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/php/model_doc.mustache b/modules/openapi-generator/src/main/resources/php/model_doc.mustache index ddb646cee8..82a4c3313f 100644 --- a/modules/openapi-generator/src/main/resources/php/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/php/model_doc.mustache @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/powershell/model.mustache b/modules/openapi-generator/src/main/resources/powershell/model.mustache index 8c2452cd02..c03f5daca6 100644 --- a/modules/openapi-generator/src/main/resources/powershell/model.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/model.mustache @@ -5,7 +5,7 @@ function New-{{{classname}}} { Param ( {{#vars}} [Parameter(Position = {{vendorExtensions.x-index}}, ValueFromPipelineByPropertyName = $true{{#required}}, Mandatory = $true{{/required}})] - [{{#isString}}{{{dataType}}}{{/isString}}{{^isString}}{{^required}}System.Nullable[{{/required}}{{dataType}}{{^required}}]{{/required}}{{/isString}}] + [{{#isString}}{{{dataType}}}{{/isString}}{{^isString}}{{#isListContainer}}{{{dataType}}}{{/isListContainer}}{{^isListContainer}}{{#isPrimitiveType}}{{^required}}System.Nullable[{{/required}}{{dataType}}{{^required}}]{{/required}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{dataType}}{{/isPrimitiveType}}{{/isListContainer}}{{/isString}}] {{=<% %>=}} ${<%name%>}<%^-last%>,<%/-last%> <%={{ }}=%> diff --git a/modules/openapi-generator/src/main/resources/powershell/model_doc.mustache b/modules/openapi-generator/src/main/resources/powershell/model_doc.mustache index 01028bbaaf..04d7df156f 100644 --- a/modules/openapi-generator/src/main/resources/powershell/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/model_doc.mustache @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index 590299dc5f..f1a110bd47 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -126,8 +126,8 @@ class {{classname}}(object): {{^isNullable}} {{#required}} # verify the required parameter '{{paramName}}' is set - if ('{{paramName}}' not in local_var_params or - local_var_params['{{paramName}}'] is None): + if self.api_client.client_side_validation and ('{{paramName}}' not in local_var_params or # noqa: E501 + local_var_params['{{paramName}}'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `{{paramName}}` when calling `{{operationId}}`") # noqa: E501 {{/required}} {{/isNullable}} @@ -136,35 +136,35 @@ class {{classname}}(object): {{#allParams}} {{#hasValidation}} {{#maxLength}} - if ('{{paramName}}' in local_var_params and - len(local_var_params['{{paramName}}']) > {{maxLength}}): + if self.api_client.client_side_validation and ('{{paramName}}' in local_var_params and # noqa: E501 + len(local_var_params['{{paramName}}']) > {{maxLength}}): # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, length must be less than or equal to `{{maxLength}}`") # noqa: E501 {{/maxLength}} {{#minLength}} - if ('{{paramName}}' in local_var_params and - len(local_var_params['{{paramName}}']) < {{minLength}}): + if self.api_client.client_side_validation and ('{{paramName}}' in local_var_params and # noqa: E501 + len(local_var_params['{{paramName}}']) < {{minLength}}): # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, length must be greater than or equal to `{{minLength}}`") # noqa: E501 {{/minLength}} {{#maximum}} - if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}: # noqa: E501 + if self.api_client.client_side_validation and '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}: # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must be a value less than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}`{{maximum}}`") # noqa: E501 {{/maximum}} {{#minimum}} - if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}: # noqa: E501 + if self.api_client.client_side_validation and '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}: # noqa: E501 raise ApiValueError("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(r'{{{vendorExtensions.x-regex}}}', local_var_params['{{paramName}}']{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 + if self.api_client.client_side_validation and '{{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 ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must conform to the pattern `{{{pattern}}}`") # noqa: E501 {{/pattern}} {{#maxItems}} - if ('{{paramName}}' in local_var_params and - len(local_var_params['{{paramName}}']) > {{maxItems}}): + if self.api_client.client_side_validation and ('{{paramName}}' in local_var_params and # noqa: E501 + len(local_var_params['{{paramName}}']) > {{maxItems}}): # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, number of items must be less than or equal to `{{maxItems}}`") # noqa: E501 {{/maxItems}} {{#minItems}} - if ('{{paramName}}' in local_var_params and - len(local_var_params['{{paramName}}']) < {{minItems}}): + if self.api_client.client_side_validation and ('{{paramName}}' in local_var_params and # noqa: E501 + len(local_var_params['{{paramName}}']) < {{minItems}}): # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, number of items must be greater than or equal to `{{minItems}}`") # noqa: E501 {{/minItems}} {{/hasValidation}} @@ -182,7 +182,7 @@ class {{classname}}(object): query_params = [] {{#queryParams}} - if '{{paramName}}' in local_var_params: + if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] is not None: # noqa: E501 query_params.append(('{{baseName}}', local_var_params['{{paramName}}'])){{#isListContainer}} # noqa: E501 collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isListContainer}} # noqa: E501 {{/queryParams}} 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 768b8d973f..63dd91ebb5 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -72,6 +72,7 @@ class ApiClient(object): self.cookie = cookie # Set default User-Agent. self.user_agent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' + self.client_side_validation = configuration.client_side_validation def __del__(self): if self._pool: @@ -379,10 +380,8 @@ class ApiClient(object): return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, diff --git a/modules/openapi-generator/src/main/resources/python/configuration.mustache b/modules/openapi-generator/src/main/resources/python/configuration.mustache index 2afcb7478e..9677031a8c 100644 --- a/modules/openapi-generator/src/main/resources/python/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/python/configuration.mustache @@ -149,6 +149,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/modules/openapi-generator/src/main/resources/python/model.mustache b/modules/openapi-generator/src/main/resources/python/model.mustache index 16c8dadbf6..17264bb46b 100644 --- a/modules/openapi-generator/src/main/resources/python/model.mustache +++ b/modules/openapi-generator/src/main/resources/python/model.mustache @@ -7,6 +7,8 @@ import re # noqa: F401 import six +from {{packageName}}.configuration import Configuration + {{#models}} {{#model}} @@ -51,8 +53,11 @@ class {{classname}}(object): } {{/discriminator}} - def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501 + def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}, local_vars_configuration=None): # noqa: E501 """{{classname}} - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration {{#vars}}{{#-first}} {{/-first}} self._{{name}} = None @@ -101,7 +106,7 @@ class {{classname}}(object): """ {{^isNullable}} {{#required}} - if {{name}} is None: + if self.local_vars_configuration.client_side_validation and {{name}} is None: # noqa: E501 raise ValueError("Invalid value for `{{name}}`, must not be `None`") # noqa: E501 {{/required}} {{/isNullable}} @@ -109,7 +114,8 @@ class {{classname}}(object): {{#isContainer}} allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501 {{#isListContainer}} - if not set({{{name}}}).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set({{{name}}}).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `{{{name}}}` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set({{{name}}}) - set(allowed_values))), # noqa: E501 @@ -117,7 +123,8 @@ class {{classname}}(object): ) {{/isListContainer}} {{#isMapContainer}} - if not set({{{name}}}.keys()).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set({{{name}}}.keys()).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid keys in `{{{name}}}` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set({{{name}}}.keys()) - set(allowed_values))), # noqa: E501 @@ -127,7 +134,7 @@ class {{classname}}(object): {{/isContainer}} {{^isContainer}} allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#isString}}"{{/isString}}{{{this}}}{{#isString}}"{{/isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501 - if {{{name}}} not in allowed_values: + if self.local_vars_configuration.client_side_validation and {{{name}}} not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `{{{name}}}` ({0}), must be one of {1}" # noqa: E501 .format({{{name}}}, allowed_values) @@ -137,31 +144,38 @@ class {{classname}}(object): {{^isEnum}} {{#hasValidation}} {{#maxLength}} - if {{name}} is not None and len({{name}}) > {{maxLength}}: + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and len({{name}}) > {{maxLength}}): raise ValueError("Invalid value for `{{name}}`, length must be less than or equal to `{{maxLength}}`") # noqa: E501 {{/maxLength}} {{#minLength}} - if {{name}} is not None and len({{name}}) < {{minLength}}: + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and len({{name}}) < {{minLength}}): raise ValueError("Invalid value for `{{name}}`, length must be greater than or equal to `{{minLength}}`") # noqa: E501 {{/minLength}} {{#maximum}} - if {{name}} is not None and {{name}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and {{name}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}): # noqa: E501 raise ValueError("Invalid value for `{{name}}`, must be a value less than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}`{{maximum}}`") # noqa: E501 {{/maximum}} {{#minimum}} - if {{name}} is not None and {{name}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and {{name}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}): # noqa: E501 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(r'{{{vendorExtensions.x-regex}}}', {{name}}{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + {{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}}: + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and len({{name}}) > {{maxItems}}): raise ValueError("Invalid value for `{{name}}`, number of items must be less than or equal to `{{maxItems}}`") # noqa: E501 {{/maxItems}} {{#minItems}} - if {{name}} is not None and len({{name}}) < {{minItems}}: + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and len({{name}}) < {{minItems}}): raise ValueError("Invalid value for `{{name}}`, number of items must be greater than or equal to `{{minItems}}`") # noqa: E501 {{/minItems}} {{/hasValidation}} @@ -215,10 +229,13 @@ class {{classname}}(object): if not isinstance(other, {{classname}}): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, {{classname}}): + return True + + return self.to_dict() != other.to_dict() {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/python/model_doc.mustache b/modules/openapi-generator/src/main/resources/python/model_doc.mustache index 0216a3372c..71c106fdc5 100644 --- a/modules/openapi-generator/src/main/resources/python/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache index b6e1b263fc..16592869b7 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#requiredVars}}{{^defaultValue}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{#readOnly}}[readonly] {{/readOnly}} -{{/defaultValue}}{{/requiredVars}}{{#requiredVars}}{{#defaultValue}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}defaults to {{{.}}}{{/defaultValue}} -{{/defaultValue}}{{/requiredVars}}{{#optionalVars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | [optional] {{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} +{{#requiredVars}}{{^defaultValue}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{#isReadOnly}}[readonly] {{/isReadOnly}} +{{/defaultValue}}{{/requiredVars}}{{#requiredVars}}{{#defaultValue}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}defaults to {{{.}}}{{/defaultValue}} +{{/defaultValue}}{{/requiredVars}}{{#optionalVars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | [optional] {{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} {{/optionalVars}} [[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/modules/openapi-generator/src/main/resources/r/model_doc.mustache b/modules/openapi-generator/src/main/resources/r/model_doc.mustache index 22fc527cc0..e24917d02d 100644 --- a/modules/openapi-generator/src/main/resources/r/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/r/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} {{/vars}} {{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/ruby-client/model_doc.mustache b/modules/openapi-generator/src/main/resources/ruby-client/model_doc.mustache index 2112d2bc6d..c2a790d9da 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/model_doc.mustache @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} {{/vars}} ## Code Sample diff --git a/modules/openapi-generator/src/main/resources/rust-server/model_doc.mustache b/modules/openapi-generator/src/main/resources/rust-server/model_doc.mustache index aeaeb95916..7c3ecd7c31 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{{name}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{{complexType}}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{{name}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{{complexType}}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/rust/api_doc.mustache b/modules/openapi-generator/src/main/resources/rust/api_doc.mustache index df4b7d7f14..87ae9d1e9e 100644 --- a/modules/openapi-generator/src/main/resources/rust/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/rust/api_doc.mustache @@ -25,7 +25,7 @@ Method | HTTP request | Description Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} {{#allParams}} -**{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{baseType}}}.md){{/isPrimitiveType}} | {{{description}}} | {{#required}}Required{{/required}} | {{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} +**{{{paramName}}}** | {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}} | {{{description}}} | {{#required}}[required]{{/required}} |{{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache index 872148bddd..c7a228eceb 100644 --- a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache @@ -1,6 +1,8 @@ {{>partial_header}} use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -16,7 +18,7 @@ pub struct {{{classname}}}Client { impl {{{classname}}}Client { pub fn new(configuration: Rc>) -> {{{classname}}}Client { {{{classname}}}Client { - configuration: configuration, + configuration, } } } @@ -24,17 +26,16 @@ impl {{{classname}}}Client { pub trait {{{classname}}} { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>>; + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>>; {{/operation}} {{/operations}} } - impl{{{classname}}} for {{{classname}}}Client { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>> { - __internal_request::Request::new(hyper::Method::{{{httpMethod}}}, "{{{path}}}".to_string()) + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::{{{httpMethod}}}, "{{{path}}}".to_string()) {{#hasAuthMethods}} {{#authMethods}} {{#isApiKey}} @@ -52,36 +53,113 @@ impl{{{classname}}} for {{{classname}}}Client { {{/isOAuth}} {{/authMethods}} {{/hasAuthMethods}} + ; {{#queryParams}} - .with_query_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()) + {{#required}} + {{^isNullable}} + req = req.with_query_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req = req.with_query_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { req = req.with_query_param("{{{baseName}}}".to_string(), "".to_string()); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(ref s) = {{{paramName}}} { + req = req.with_query_param("{{{baseName}}}".to_string(), s{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/queryParams}} {{#pathParams}} - .with_path_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()) + {{#required}} + {{^isNullable}} + req = req.with_path_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req = req.with_path_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { req = req.with_path_param("{{{baseName}}}".to_string(), "".to_string()); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + req = req.with_path_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/pathParams}} {{#hasHeaderParams}} {{#headerParams}} - .with_header_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()) + {{#required}} + {{^isNullable}} + req = req.with_header_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req = req.with_header_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { req = req.with_header_param("{{{baseName}}}".to_string(), "".to_string()); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + req = req.with_header_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/headerParams}} {{/hasHeaderParams}} {{#hasFormParams}} {{#formParams}} {{#isFile}} - .with_form_param("{{{baseName}}}".to_string(), unimplemented!()) + {{#required}} + {{^isNullable}} + req = req.with_form_param("{{{baseName}}}".to_string(), unimplemented!()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req = req.with_form_param("{{{baseName}}}".to_string(), unimplemented!()); }, + None => { req = req.with_form_param("{{{baseName}}}".to_string(), unimplemented!()); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + req = req.with_form_param("{{{baseName}}}".to_string(), unimplemented!()); + } + {{/required}} {{/isFile}} {{^isFile}} - .with_form_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()) + {{#required}} + {{^isNullable}} + req = req.with_form_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req = req.with_form_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { req = req.with_form_param("{{{baseName}}}".to_string(), "".to_string()); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + req = req.with_form_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/isFile}} {{/formParams}} {{/hasFormParams}} {{#hasBodyParam}} {{#bodyParams}} - .with_body_param({{{paramName}}}) + req = req.with_body_param({{{paramName}}}); {{/bodyParams}} {{/hasBodyParam}} {{^returnType}} - .returns_nothing() + req = req.returns_nothing(); {{/returnType}} - .execute(self.configuration.borrow()) + + req.execute(self.configuration.borrow()) } {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache index 2aa7338b4b..5b3bcf85c7 100644 --- a/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache +++ b/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache @@ -9,7 +9,7 @@ pub struct APIClient { {{#operations}} {{#operation}} {{#-last}} - {{{classFilename}}}: Box, + {{{classFilename}}}: Box, {{/-last}} {{/operation}} {{/operations}} @@ -41,7 +41,7 @@ impl APIClient { {{#operations}} {{#operation}} {{#-last}} - pub fn {{{classFilename}}}(&self) -> &crate::apis::{{{classname}}}{ + pub fn {{{classFilename}}}(&self) -> &dyn crate::apis::{{{classname}}}{ self.{{{classFilename}}}.as_ref() } diff --git a/modules/openapi-generator/src/main/resources/rust/model.mustache b/modules/openapi-generator/src/main/resources/rust/model.mustache index 1572a1a871..054cd2deb2 100644 --- a/modules/openapi-generator/src/main/resources/rust/model.mustache +++ b/modules/openapi-generator/src/main/resources/rust/model.mustache @@ -8,7 +8,7 @@ {{!-- for enum schemas --}} {{#isEnum}} /// {{{description}}} -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub enum {{classname}} { {{#allowableValues}} {{#enumVars}} @@ -18,8 +18,32 @@ pub enum {{classname}} { } {{/isEnum}} +{{!-- for schemas that have a discriminator --}} +{{#discriminator}} +#[derive(Debug, PartialEq, Serialize, Deserialize)] +#[serde(tag = "{{{vendorExtensions.tagName}}}")] +pub enum {{classname}} { +{{#vendorExtensions}} + {{#mappedModels}} + #[serde(rename="{{mappingName}}")] + {{modelName}} { + {{#vars}} + {{#description}} + /// {{{description}}} + {{/description}} + #[serde(rename = "{{{baseName}}}"{{^required}}, skip_serializing_if = "Option::is_none"{{/required}})] + {{{name}}}: {{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{^required}}Option<{{/required}}{{#isEnum}}{{{enumName}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^required}}>{{/required}}, + {{/vars}} + }, + {{/mappedModels}} +{{/vendorExtensions}} +} + +{{/discriminator}} + {{!-- for non-enum schemas --}} {{^isEnum}} +{{^discriminator}} #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct {{{classname}}} { {{#vars}} @@ -38,11 +62,12 @@ impl {{{classname}}} { pub fn new({{#requiredVars}}{{{name}}}: {{#isNullable}}Option<{{/isNullable}}{{#isEnum}}{{{enumName}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}>{{/isNullable}}{{^-last}}, {{/-last}}{{/requiredVars}}) -> {{{classname}}} { {{{classname}}} { {{#vars}} - {{{name}}}: {{#required}}{{{name}}}{{/required}}{{^required}}{{#isListContainer}}None{{/isListContainer}}{{#isMapContainer}}None{{/isMapContainer}}{{^isContainer}}None{{/isContainer}}{{/required}}, + {{{name}}}{{^required}}{{#isListContainer}}: None{{/isListContainer}}{{#isMapContainer}}: None{{/isMapContainer}}{{^isContainer}}: None{{/isContainer}}{{/required}}, {{/vars}} } } } +{{/discriminator}} {{/isEnum}} {{!-- for properties that are of enum type --}} diff --git a/modules/openapi-generator/src/main/resources/rust/model_doc.mustache b/modules/openapi-generator/src/main/resources/rust/model_doc.mustache index 63c25fc27d..7c1230e426 100644 --- a/modules/openapi-generator/src/main/resources/rust/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/rust/model_doc.mustache @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{{name}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{{complexType}}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{{name}}}** | {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{complexType}}}.md){{/isPrimitiveType}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}} | {{{description}}} | {{^required}}[optional]{{/required}}{{#isReadOnly}}[readonly]{{/isReadOnly}}{{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/rust/model_mod.mustache b/modules/openapi-generator/src/main/resources/rust/model_mod.mustache index daddc889b8..06bf92f019 100644 --- a/modules/openapi-generator/src/main/resources/rust/model_mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust/model_mod.mustache @@ -1,6 +1,6 @@ {{#models}} {{#model}} -mod {{{classFilename}}}; +pub mod {{{classFilename}}}; pub use self::{{{classFilename}}}::{{{classname}}}; {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/rust/request.rs b/modules/openapi-generator/src/main/resources/rust/request.rs index 2d5c7eb5a6..f97b527719 100644 --- a/modules/openapi-generator/src/main/resources/rust/request.rs +++ b/modules/openapi-generator/src/main/resources/rust/request.rs @@ -98,7 +98,7 @@ impl Request { pub fn execute<'a, C, U>( self, conf: &configuration::Configuration, - ) -> Box> + 'a> + ) -> Box> + 'a> where C: hyper::client::Connect, U: Sized + 'a, diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache index 35d25dfde7..448f6c302c 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -1,6 +1,8 @@ {{>partial_header}} use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -13,7 +15,7 @@ pub struct {{{classname}}}Client { impl {{{classname}}}Client { pub fn new(configuration: Rc) -> {{{classname}}}Client { {{{classname}}}Client { - configuration: configuration, + configuration, } } } @@ -21,7 +23,7 @@ impl {{{classname}}}Client { pub trait {{{classname}}} { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error>; + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error>; {{/operation}} {{/operations}} } @@ -29,15 +31,22 @@ pub trait {{{classname}}} { impl {{{classname}}} for {{{classname}}}Client { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> { + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}{{{path}}}", configuration.base_path{{#pathParams}}, {{{baseName}}}={{#isString}}crate::apis::urlencode({{/isString}}{{{paramName}}}{{#isListContainer}}.join(",").as_ref(){{/isListContainer}}{{#isString}}){{/isString}}{{/pathParams}}); + let uri_str = format!("{}{{{path}}}", configuration.base_path{{#pathParams}}, {{{baseName}}}={{#isString}}crate::apis::urlencode({{/isString}}{{{paramName}}}{{^required}}.unwrap(){{/required}}{{#required}}{{#isNullable}}.unwrap(){{/isNullable}}{{/required}}{{#isListContainer}}.join(",").as_ref(){{/isListContainer}}{{#isString}}){{/isString}}{{/pathParams}}); let mut req_builder = client.{{{httpMethod}}}(uri_str.as_str()); {{#queryParams}} + {{#required}} req_builder = req_builder.query(&[("{{{baseName}}}", &{{{paramName}}}{{#isListContainer}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isListContainer}}.to_string())]); + {{/required}} + {{^required}} + if let Some(ref s) = {{{paramName}}} { + req_builder = req_builder.query(&[("{{{baseName}}}", &s{{#isListContainer}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isListContainer}}.to_string())]); + } + {{/required}} {{/queryParams}} {{#hasAuthMethods}} {{#authMethods}} @@ -60,7 +69,22 @@ impl {{{classname}}} for {{{classname}}}Client { } {{#hasHeaderParams}} {{#headerParams}} + {{#required}} + {{^isNullable}} req_builder = req_builder.header("{{{baseName}}}", {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req_builder = req_builder.header("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { req_builder = req_builder.header("{{{baseName}}}", ""); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + req_builder = req_builder.header("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/headerParams}} {{/hasHeaderParams}} {{#hasAuthMethods}} @@ -98,13 +122,43 @@ impl {{{classname}}} for {{{classname}}}Client { {{/hasAuthMethods}} {{#isMultipart}} {{#hasFormParams}} - let form = reqwest::multipart::Form::new() + let mut form = reqwest::multipart::Form::new(); {{#formParams}} {{#isFile}} - .file("{{{baseName}}}", {{{paramName}}})?{{#-last}};{{/-last}} + {{#required}} + {{^isNullable}} + form = form.file("{{{baseName}}}", {{{paramName}}})?; + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { form = form.file("{{{baseName}}}", param_value)?; }, + None => { unimplemented!("Required nullable form file param not supported"); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + form = form.file("{{{baseName}}}", param_value)?; + } + {{/required}} {{/isFile}} {{^isFile}} - .text("{{{baseName}}}", {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()){{#-last}};{{/-last}} + {{#required}} + {{^isNullable}} + form = form.text("{{{baseName}}}", {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { form = form.text("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { form = form.text("{{{baseName}}}", ""); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + form = form.text("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/isFile}} {{/formParams}} req_builder = req_builder.multipart(form); @@ -115,10 +169,40 @@ impl {{{classname}}} for {{{classname}}}Client { let mut form_params = std::collections::HashMap::new(); {{#formParams}} {{#isFile}} + {{#required}} + {{^isNullable}} form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content")); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content")); }, + None => { unimplemented!("Required nullable file form param not supported with x-www-form-urlencoded content"); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content")); + } + {{/required}} {{/isFile}} {{^isFile}} + {{#required}} + {{^isNullable}} form_params.insert("{{{baseName}}}", {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { form_params.insert("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { form_params.insert("{{{baseName}}}", ""); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + form_params.insert("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/isFile}} {{/formParams}} req_builder = req_builder.form(&form_params); diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache index 9eab132865..60be0f295f 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache @@ -8,7 +8,7 @@ pub struct APIClient { {{#operations}} {{#operation}} {{#-last}} - {{{classFilename}}}: Box, + {{{classFilename}}}: Box, {{/-last}} {{/operation}} {{/operations}} @@ -40,7 +40,7 @@ impl APIClient { {{#operations}} {{#operation}} {{#-last}} - pub fn {{{classFilename}}}(&self) -> &crate::apis::{{{classname}}}{ + pub fn {{{classFilename}}}(&self) -> &dyn crate::apis::{{{classname}}}{ self.{{{classFilename}}}.as_ref() } diff --git a/modules/openapi-generator/src/main/resources/swift4/model_doc.mustache b/modules/openapi-generator/src/main/resources/swift4/model_doc.mustache index d912845d33..d3e4ecf5c7 100644 --- a/modules/openapi-generator/src/main/resources/swift4/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isContainer}}[**{{dataType}}**]({{complexType}}.md){{/isContainer}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isContainer}}[**{{dataType}}**]({{complexType}}.md){{/isContainer}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index 36f29be6f6..7e776e3f2e 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -193,7 +193,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur localVarRequestOptions.data = localVarFormParams{{#vendorExtensions}}{{^multipartFormData}}.toString(){{/multipartFormData}}{{/vendorExtensions}}; {{/hasFormParams}} {{#bodyParam}} - const needsSerialization = ("{{dataType}}" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof {{paramName}} !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify({{paramName}} !== undefined ? {{paramName}} : {}) : ({{paramName}} || ""); {{/bodyParam}} diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache index 73504161a1..8080ff0245 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable {{>licenseInfo}} import * as runtime from '../runtime'; diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/models.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/models.mustache index bb7d43bce3..87d5531951 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/models.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/models.mustache @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable {{>licenseInfo}} {{#models}} {{#model}} diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache index bd53174f17..33ecaa1197 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable {{>licenseInfo}} export const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, ""); @@ -49,7 +50,7 @@ export class BaseAPI { // do not handle correctly sometimes. url += '?' + this.configuration.queryParamsStringify(context.query); } - const body = (context.body instanceof FormData || isBlob(context.body)) + const body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body)) ? context.body : JSON.stringify(context.body); diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache index 3c548d7b54..0c70dc5e6c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache @@ -86,7 +86,7 @@ export class {{classname}} extends BaseAPI { {{/hasHttpHeaders}} {{#hasQueryParams}} - const query: HttpQuery = { + const query: HttpQuery = { {{#queryParams}} {{#isListContainer}} {{#isCollectionFormatMulti}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 8c00cbc281..e9965da174 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -595,6 +595,25 @@ public class DefaultCodegenTest { Assert.assertEquals(co2.path, "/some/path"); } + @Test + public void testDefaultResponseShouldBeLast() { + OpenAPI openAPI = TestUtils.createOpenAPI(); + Operation myOperation = new Operation().operationId("myOperation").responses( + new ApiResponses() + .addApiResponse( + "default", new ApiResponse().description("Default")) + .addApiResponse( + "422", new ApiResponse().description("Error")) + ); + openAPI.path("/here", new PathItem().get(myOperation)); + final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + + CodegenOperation co = codegen.fromOperation("/here", "get", myOperation, null); + Assert.assertEquals(co.responses.get(0).message, "Error"); + Assert.assertEquals(co.responses.get(1).message, "Default"); + } + @Test public void testResponseWithNoSchemaInHeaders() { OpenAPI openAPI = TestUtils.createOpenAPI(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java index fec2422d7f..227a75f71b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java @@ -100,6 +100,35 @@ public class InlineModelResolverTest { assertNotNull(address.getProperties().get("street")); } + @Test + public void resolveInlineModelTestWithTitleWithSpaces() { + OpenAPI openapi = new OpenAPI(); + openapi.setComponents(new Components()); + openapi.getComponents().addSchemas("User", new ObjectSchema() + .name("user") + .description("a common user") + .addProperties("name", new StringSchema()) + .addProperties("address", new ObjectSchema() + .title("User Address Title") + .readOnly(false) + .description("description") + .name("name") + .addProperties("street", new StringSchema()) + .addProperties("city", new StringSchema()))); + + new InlineModelResolver().flatten(openapi); + + Schema user = openapi.getComponents().getSchemas().get("User"); + + assertNotNull(user); + assertTrue(user.getProperties().get("address") instanceof Schema); + + Schema address = openapi.getComponents().getSchemas().get("User_Address_Title"); + assertNotNull(address); + assertNotNull(address.getProperties().get("city")); + assertNotNull(address.getProperties().get("street")); + } + @Test public void resolveInlineModel2EqualInnerModels() { OpenAPI openapi = new OpenAPI(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/elm/ElmClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/elm/ElmClientCodegenTest.java index 5bc8904073..dd59a7a02b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/elm/ElmClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/elm/ElmClientCodegenTest.java @@ -65,7 +65,7 @@ public class ElmClientCodegenTest { assertTrue(result.containsKey("operations")); assertTrue(result.containsKey("elmImports")); - assertEquals(rootOp.path, "\"\""); + assertEquals(rootOp.path, "/"); } @Test diff --git a/modules/openapi-generator/src/test/resources/2_0/swift4Test.json b/modules/openapi-generator/src/test/resources/2_0/swift4Test.json index f5e60112f0..9cb77020b4 100644 --- a/modules/openapi-generator/src/test/resources/2_0/swift4Test.json +++ b/modules/openapi-generator/src/test/resources/2_0/swift4Test.json @@ -230,7 +230,7 @@ ] } }, - "description": "Object which contains lots of different primitive Swagger types" + "description": "Object which contains lots of different primitive OpenAPI types" }, "ErrorInfo": { "type": "object", diff --git a/pom.xml b/pom.xml index 012848e185..972ea9c484 100644 --- a/pom.xml +++ b/pom.xml @@ -1034,6 +1034,7 @@ + samples/server/petstore/python-aiohttp samples/client/petstore/c @@ -1073,7 +1074,6 @@ samples/client/petstore/typescript-angular-v7-provided-in-root samples/server/petstore/rust-server - samples/server/petstore/python-aiohttp samples/server/petstore/python-flask samples/server/petstore/python-flask-python2 @@ -1245,6 +1245,7 @@ samples/client/petstore/erlang-proper samples/client/petstore/kotlin-multiplatform samples/client/petstore/kotlin/ + samples/client/petstore/kotlin-okhttp3/ samples/client/petstore/kotlin-threetenbp/ samples/client/petstore/kotlin-string/ diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION index d1a8f58b38..c3a2c7076f 100644 --- a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.2-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-qt5/CMakeLists.txt b/samples/client/petstore/cpp-qt5/CMakeLists.txt new file mode 100644 index 0000000000..517669ae80 --- /dev/null +++ b/samples/client/petstore/cpp-qt5/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.2) + +project(cpp-qt5-petstore) +set(CMAKE_VERBOSE_MAKEFILE ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wno-unused-variable") + +find_package(Qt5Core REQUIRED) +find_package(Qt5Network REQUIRED) +find_package(Qt5Test REQUIRED) + +file(GLOB SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/PetStore/*.cpp +) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/client +) + +add_subdirectory(client) +add_executable(${PROJECT_NAME} ${SRCS}) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Network Qt5::Test ssl crypto client) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_EXTENSIONS OFF) + +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) diff --git a/samples/client/petstore/cpp-qt5/client/CMakeLists.txt b/samples/client/petstore/cpp-qt5/client/CMakeLists.txt new file mode 100644 index 0000000000..c53100cca6 --- /dev/null +++ b/samples/client/petstore/cpp-qt5/client/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.2) + +project(client) +set(CMAKE_VERBOSE_MAKEFILE ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wno-unused-variable") + +find_package(Qt5Core REQUIRED) +find_package(Qt5Network REQUIRED) + +file(GLOB SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp +) + +add_library(${PROJECT_NAME} ${SRCS}) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Network ssl crypto) + +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_EXTENSIONS OFF) + +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator-ignore b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator-ignore index 7484ee590a..e7a7363b75 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator-ignore +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator-ignore @@ -21,3 +21,5 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/HasOnlyReadOnly.md index 95f49de194..4a5d17ea88 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Name.md index ca82e46fe5..ee5704947a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Name.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_Name** | **int** | | -**SnakeCase** | **int** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] +**_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ReadOnlyFirst.md index 6c2571cb48..5c3762e880 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator-ignore b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator-ignore index 7484ee590a..e7a7363b75 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator-ignore +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator-ignore @@ -21,3 +21,5 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/HasOnlyReadOnly.md index 95f49de194..4a5d17ea88 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Name.md index ca82e46fe5..ee5704947a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Name.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_Name** | **int** | | -**SnakeCase** | **int** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] +**_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ReadOnlyFirst.md index 6c2571cb48..5c3762e880 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore index 7484ee590a..e7a7363b75 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore @@ -21,3 +21,5 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClient/docs/HasOnlyReadOnly.md index 4a2624f111..043d2442b4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/HasOnlyReadOnly.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Name.md index 77b9b2e750..bfd7955e5b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Name.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/Name.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_Name** | **int** | | -**SnakeCase** | **int** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] +**_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClient/docs/ReadOnlyFirst.md index f4581ec105..8ea3b95919 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/ReadOnlyFirst.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/dart-dio/.gitignore b/samples/client/petstore/dart-dio/.gitignore new file mode 100644 index 0000000000..7c28044164 --- /dev/null +++ b/samples/client/petstore/dart-dio/.gitignore @@ -0,0 +1,27 @@ +# See https://www.dartlang.org/tools/private-files.html + +# Files and directories created by pub +.buildlog +.packages +.project +.pub/ +build/ +**/packages/ + +# Files created by dart2js +# (Most Dart developers will use pub build to compile Dart, use/modify these +# rules if you intend to use dart2js directly +# Convention is to use extension '.dart.js' for Dart compiled to Javascript to +# differentiate from explicit Javascript files) +*.dart.js +*.part.js +*.js.deps +*.js.map +*.info.json + +# Directory created by dartdoc +doc/api/ + +# Don't commit pubspec lock file +# (Library packages only! Remove pattern if developing an application package) +pubspec.lock diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore b/samples/client/petstore/dart-dio/.openapi-generator-ignore similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore rename to samples/client/petstore/dart-dio/.openapi-generator-ignore diff --git a/samples/client/petstore/dart-dio/.openapi-generator/VERSION b/samples/client/petstore/dart-dio/.openapi-generator/VERSION new file mode 100644 index 0000000000..0e97bd19ef --- /dev/null +++ b/samples/client/petstore/dart-dio/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.1.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/README.md b/samples/client/petstore/dart-dio/README.md new file mode 100644 index 0000000000..ded15d6b92 --- /dev/null +++ b/samples/client/petstore/dart-dio/README.md @@ -0,0 +1,116 @@ +# openapi +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Build date: 2019-10-03T14:20:56.615+13:00[Pacific/Auckland] +- Build package: org.openapitools.codegen.languages.DartDioClientCodegen + +## Requirements + +Dart 1.20.0 or later OR Flutter 0.0.20 or later + +## Installation & Usage + +### Github +If this Dart package is published to Github, please include the following in pubspec.yaml +``` +name: openapi +version: 1.0.0 +description: OpenAPI API client +dependencies: + openapi: + git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git + version: 'any' +``` + +### Local +To use the package in your local drive, please include the following in pubspec.yaml +``` +dependencies: + openapi: + path: /path/to/openapi +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:openapi/api.dart'; + + +var api_instance = new PetApi(); +var body = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.addPet(body); +} catch (e) { + print("Exception when calling PetApi->addPet: $e\n"); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PetApi* | [**addPet**](docs//PetApi.md#addpet) | **post** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](docs//PetApi.md#deletepet) | **delete** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](docs//PetApi.md#findpetsbystatus) | **get** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](docs//PetApi.md#findpetsbytags) | **get** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](docs//PetApi.md#getpetbyid) | **get** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](docs//PetApi.md#updatepet) | **put** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](docs//PetApi.md#updatepetwithform) | **post** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](docs//PetApi.md#uploadfile) | **post** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](docs//StoreApi.md#deleteorder) | **delete** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](docs//StoreApi.md#getinventory) | **get** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](docs//StoreApi.md#getorderbyid) | **get** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](docs//StoreApi.md#placeorder) | **post** /store/order | Place an order for a pet +*UserApi* | [**createUser**](docs//UserApi.md#createuser) | **post** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](docs//UserApi.md#createuserswitharrayinput) | **post** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](docs//UserApi.md#createuserswithlistinput) | **post** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs//UserApi.md#deleteuser) | **delete** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs//UserApi.md#getuserbyname) | **get** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs//UserApi.md#loginuser) | **get** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs//UserApi.md#logoutuser) | **get** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs//UserApi.md#updateuser) | **put** /user/{username} | Updated user + + +## Documentation For Models + + - [ApiResponse](docs//ApiResponse.md) + - [Category](docs//Category.md) + - [Order](docs//Order.md) + - [Pet](docs//Pet.md) + - [Tag](docs//Tag.md) + - [User](docs//User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + + diff --git a/samples/client/petstore/dart-dio/analysis_options.yaml b/samples/client/petstore/dart-dio/analysis_options.yaml new file mode 100644 index 0000000000..655cb67bd8 --- /dev/null +++ b/samples/client/petstore/dart-dio/analysis_options.yaml @@ -0,0 +1 @@ +analyzer: \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md b/samples/client/petstore/dart-dio/docs/ApiResponse.md similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md rename to samples/client/petstore/dart-dio/docs/ApiResponse.md diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md b/samples/client/petstore/dart-dio/docs/Category.md similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md rename to samples/client/petstore/dart-dio/docs/Category.md diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md b/samples/client/petstore/dart-dio/docs/Order.md similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md rename to samples/client/petstore/dart-dio/docs/Order.md diff --git a/samples/client/petstore/dart-dio/docs/Pet.md b/samples/client/petstore/dart-dio/docs/Pet.md new file mode 100644 index 0000000000..619e45d184 --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/Pet.md @@ -0,0 +1,20 @@ +# openapi.model.Pet + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**category** | [**Category**](Category.md) | | [optional] [default to null] +**name** | **String** | | [default to null] +**photoUrls** | **BuiltList<String>** | | [default to const []] +**tags** | [**BuiltList<Tag>**](Tag.md) | | [optional] [default to const []] +**status** | **String** | pet status in the store | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart-dio/docs/PetApi.md b/samples/client/petstore/dart-dio/docs/PetApi.md new file mode 100644 index 0000000000..e781974607 --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/PetApi.md @@ -0,0 +1,379 @@ +# openapi.api.PetApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **post** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **delete** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **get** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **get** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **get** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **put** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **post** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **post** /pet/{petId}/uploadImage | uploads an image + + +# **addPet** +> addPet(body) + +Add a new pet to the store + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var body = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.addPet(body); +} catch (e) { + print("Exception when calling PetApi->addPet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | Pet id to delete +var apiKey = apiKey_example; // String | + +try { + api_instance.deletePet(petId, apiKey); +} catch (e) { + print("Exception when calling PetApi->deletePet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| Pet id to delete | [default to null] + **apiKey** | **String**| | [optional] [default to null] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### 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) + +# **findPetsByStatus** +> List findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var status = []; // List | Status values that need to be considered for filter + +try { + var result = api_instance.findPetsByStatus(status); + print(result); +} catch (e) { + print("Exception when calling PetApi->findPetsByStatus: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [default to const []] + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +> List findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var tags = []; // List | Tags to filter by + +try { + var result = api_instance.findPetsByTags(tags); + print(result); +} catch (e) { + print("Exception when calling PetApi->findPetsByTags: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**List<String>**](String.md)| Tags to filter by | [default to const []] + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet to return + +try { + var result = api_instance.getPetById(petId); + print(result); +} catch (e) { + print("Exception when calling PetApi->getPetById: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to return | [default to null] + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +> updatePet(body) + +Update an existing pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var body = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.updatePet(body); +} catch (e) { + print("Exception when calling PetApi->updatePet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet that needs to be updated +var name = name_example; // String | Updated name of the pet +var status = status_example; // String | Updated status of the pet + +try { + api_instance.updatePetWithForm(petId, name, status); +} catch (e) { + print("Exception when calling PetApi->updatePetWithForm: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet that needs to be updated | [default to null] + **name** | **String**| Updated name of the pet | [optional] [default to null] + **status** | **String**| Updated status of the pet | [optional] [default to null] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +> ApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet to update +var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +var file = BINARY_DATA_HERE; // Uint8List | file to upload + +try { + var result = api_instance.uploadFile(petId, additionalMetadata, file); + print(result); +} catch (e) { + print("Exception when calling PetApi->uploadFile: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to update | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + **file** | **Uint8List**| file to upload | [optional] [default to null] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/dart-dio/docs/StoreApi.md b/samples/client/petstore/dart-dio/docs/StoreApi.md new file mode 100644 index 0000000000..33896baac9 --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/StoreApi.md @@ -0,0 +1,186 @@ +# openapi.api.StoreApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **delete** /store/order/{orderId} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **get** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **get** /store/order/{orderId} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **post** /store/order | Place an order for a pet + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var orderId = orderId_example; // String | ID of the order that needs to be deleted + +try { + api_instance.deleteOrder(orderId); +} catch (e) { + print("Exception when calling StoreApi->deleteOrder: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | [default to null] + +### 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) + +# **getInventory** +> Map getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +var api_instance = new StoreApi(); + +try { + var result = api_instance.getInventory(); + print(result); +} catch (e) { + print("Exception when calling StoreApi->getInventory: $e\n"); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**Map** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var orderId = 789; // int | ID of pet that needs to be fetched + +try { + var result = api_instance.getOrderById(orderId); + print(result); +} catch (e) { + print("Exception when calling StoreApi->getOrderById: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **int**| ID of pet that needs to be fetched | [default to null] + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +> Order placeOrder(body) + +Place an order for a pet + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var body = new Order(); // Order | order placed for purchasing the pet + +try { + var result = api_instance.placeOrder(body); + print(result); +} catch (e) { + print("Exception when calling StoreApi->placeOrder: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md b/samples/client/petstore/dart-dio/docs/Tag.md similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md rename to samples/client/petstore/dart-dio/docs/Tag.md diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md b/samples/client/petstore/dart-dio/docs/User.md similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md rename to samples/client/petstore/dart-dio/docs/User.md diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md b/samples/client/petstore/dart-dio/docs/UserApi.md similarity index 94% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md rename to samples/client/petstore/dart-dio/docs/UserApi.md index d3bb61265e..052dc20aef 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md +++ b/samples/client/petstore/dart-dio/docs/UserApi.md @@ -9,14 +9,14 @@ All URIs are relative to *http://petstore.swagger.io/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**createUser**](UserApi.md#createUser) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user +[**createUser**](UserApi.md#createUser) | **post** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **post** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **post** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **delete** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **get** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **get** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **get** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **put** /user/{username} | Updated user # **createUser** diff --git a/samples/client/petstore/dart-dio/lib/api.dart b/samples/client/petstore/dart-dio/lib/api.dart new file mode 100644 index 0000000000..b2575064fb --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/api.dart @@ -0,0 +1,52 @@ +library openapi.api; + +import 'package:http/io_client.dart'; +import 'package:dio/dio.dart'; +import 'package:built_value/serializer.dart'; +import 'package:openapi/serializers.dart'; +import 'package:openapi/api/pet_api.dart'; +import 'package:openapi/api/store_api.dart'; +import 'package:openapi/api/user_api.dart'; + +class Openapi { + Dio dio; + Serializers serializers; + String basePath = "http://petstore.swagger.io/v2"; + + Openapi({this.dio, Serializers serializers}) { + if (dio == null) { + BaseOptions options = new BaseOptions( + baseUrl: basePath, + connectTimeout: 5000, + receiveTimeout: 3000, + ); + this.dio = new Dio(options); + } + + this.serializers = serializers ?? standardSerializers; + } + + /** + * Get PetApi instance, base route and serializer can be overridden by a given but be careful, + * by doing that all interceptors will not be executed + */ + PetApi getPetApi() { + return PetApi(dio, serializers); + } + + /** + * Get StoreApi instance, base route and serializer can be overridden by a given but be careful, + * by doing that all interceptors will not be executed + */ + StoreApi getStoreApi() { + return StoreApi(dio, serializers); + } + + /** + * Get UserApi instance, base route and serializer can be overridden by a given but be careful, + * by doing that all interceptors will not be executed + */ + UserApi getUserApi() { + return UserApi(dio, serializers); + } +} diff --git a/samples/client/petstore/dart-dio/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/lib/api/pet_api.dart new file mode 100644 index 0000000000..fee534d854 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/api/pet_api.dart @@ -0,0 +1,376 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:convert'; +import 'package:dio/dio.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; + +import 'package:openapi/model/pet.dart'; +import 'package:openapi/model/api_response.dart'; +import 'dart:typed_data'; + +class PetApi { + final Dio _dio; + Serializers _serializers; + + PetApi(this._dio, this._serializers); + + /// Add a new pet to the store + /// + /// + Future addPet( + Pet body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/pet"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = ["application/json", "application/xml"]; + + var serializedBody = _serializers.serialize(body); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Deletes a pet + /// + /// + Future deletePet( + int petId, { + String apiKey, + CancelToken cancelToken, + Map headers, + }) async { + String path = + "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + headerParams["api_key"] = apiKey; + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'delete'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Finds Pets by status + /// + /// Multiple status values can be provided with comma separated strings + Future>> findPetsByStatus( + List status, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/pet/findByStatus"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams["status"] = status; + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + final FullType type = + const FullType(BuiltList, const [const FullType(Pet)]); + BuiltList dataList = + _serializers.deserialize(response.data, specifiedType: type); + var data = dataList.toList(); + + return Response>( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + + /// Finds Pets by tags + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + Future>> findPetsByTags( + List tags, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/pet/findByTags"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams["tags"] = tags; + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + final FullType type = + const FullType(BuiltList, const [const FullType(Pet)]); + BuiltList dataList = + _serializers.deserialize(response.data, specifiedType: type); + var data = dataList.toList(); + + return Response>( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + + /// Find pet by ID + /// + /// Returns a single pet + Future> getPetById( + int petId, { + CancelToken cancelToken, + Map headers, + }) async { + String path = + "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + var serializer = _serializers.serializerForType(Pet); + var data = _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + + /// Update an existing pet + /// + /// + Future updatePet( + Pet body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/pet"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = ["application/json", "application/xml"]; + + var serializedBody = _serializers.serialize(body); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'put'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Updates a pet in the store with form data + /// + /// + Future updatePetWithForm( + int petId, { + String name, + String status, + CancelToken cancelToken, + Map headers, + }) async { + String path = + "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = ["application/x-www-form-urlencoded"]; + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// uploads an image + /// + /// + Future> uploadFile( + int petId, { + String additionalMetadata, + Uint8List file, + CancelToken cancelToken, + Map headers, + }) async { + String path = "/pet/{petId}/uploadImage" + .replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = ["multipart/form-data"]; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + var serializer = _serializers.serializerForType(ApiResponse); + var data = + _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } +} diff --git a/samples/client/petstore/dart-dio/lib/api/store_api.dart b/samples/client/petstore/dart-dio/lib/api/store_api.dart new file mode 100644 index 0000000000..440dcd604b --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/api/store_api.dart @@ -0,0 +1,180 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:convert'; +import 'package:dio/dio.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; + +import 'package:openapi/model/order.dart'; + +class StoreApi { + final Dio _dio; + Serializers _serializers; + + StoreApi(this._dio, this._serializers); + + /// Delete purchase order by ID + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + Future deleteOrder(String orderId, { CancelToken cancelToken, Map headers,}) async { + String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'delete'.toUpperCase(), + headers: headerParams, + contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + /// Returns pet inventories by status + /// + /// Returns a map of status codes to quantities + Future>>getInventory({ CancelToken cancelToken, Map headers,}) async { + + String path = "/store/inventory"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ).then((response) { + + var serializer = _serializers.serializerForType(Map); + var data = _serializers.deserializeWith>(serializer, response.data); + + return Response>( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + /// Find purchase order by ID + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + Future>getOrderById(int orderId,{ CancelToken cancelToken, Map headers,}) async { + + String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ).then((response) { + + var serializer = _serializers.serializerForType(Order); + var data = _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + /// Place an order for a pet + /// + /// + Future>placeOrder(Order body,{ CancelToken cancelToken, Map headers,}) async { + + String path = "/store/order"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + var serializedBody = _serializers.serialize(body); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ).then((response) { + + var serializer = _serializers.serializerForType(Order); + var data = _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + } diff --git a/samples/client/petstore/dart-dio/lib/api/user_api.dart b/samples/client/petstore/dart-dio/lib/api/user_api.dart new file mode 100644 index 0000000000..d30d72c380 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/api/user_api.dart @@ -0,0 +1,344 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:convert'; +import 'package:dio/dio.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; + +import 'package:openapi/model/user.dart'; + +class UserApi { + final Dio _dio; + Serializers _serializers; + + UserApi(this._dio, this._serializers); + + /// Create user + /// + /// This can only be done by the logged in user. + Future createUser( + User body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + var serializedBody = _serializers.serialize(body); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Creates list of users with given input array + /// + /// + Future createUsersWithArrayInput( + List body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/createWithArray"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + final type = const FullType(BuiltList, const [const FullType(User)]); + var serializedBody = + _serializers.serialize(BuiltList.from(body), specifiedType: type); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Creates list of users with given input array + /// + /// + Future createUsersWithListInput( + List body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/createWithList"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + final type = const FullType(BuiltList, const [const FullType(User)]); + var serializedBody = + _serializers.serialize(BuiltList.from(body), specifiedType: type); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Delete user + /// + /// This can only be done by the logged in user. + Future deleteUser( + String username, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/{username}" + .replaceAll("{" + "username" + "}", username.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'delete'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Get user by user name + /// + /// + Future> getUserByName( + String username, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/{username}" + .replaceAll("{" + "username" + "}", username.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + var serializer = _serializers.serializerForType(User); + var data = _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + + /// Logs user into the system + /// + /// + Future> loginUser( + String username, + String password, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/login"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams["username"] = username; + queryParams["password"] = password; + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + var serializer = _serializers.serializerForType(String); + var data = + _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + + /// Logs out current logged in user session + /// + /// + Future logoutUser({ + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/logout"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Updated user + /// + /// This can only be done by the logged in user. + Future updateUser( + String username, + User body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/{username}" + .replaceAll("{" + "username" + "}", username.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + var serializedBody = _serializers.serialize(body); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'put'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } +} diff --git a/samples/client/petstore/dart-dio/lib/model/api_response.dart b/samples/client/petstore/dart-dio/lib/model/api_response.dart new file mode 100644 index 0000000000..0feebafb00 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/api_response.dart @@ -0,0 +1,24 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'api_response.g.dart'; + +abstract class ApiResponse implements Built { + @nullable + @BuiltValueField(wireName: 'code') + int get code; + + @nullable + @BuiltValueField(wireName: 'type') + String get type; + + @nullable + @BuiltValueField(wireName: 'message') + String get message; + + // Boilerplate code needed to wire-up generated code + ApiResponse._(); + + factory ApiResponse([updates(ApiResponseBuilder b)]) = _$ApiResponse; + static Serializer get serializer => _$apiResponseSerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/api_response.g.dart b/samples/client/petstore/dart-dio/lib/model/api_response.g.dart new file mode 100644 index 0000000000..ca7c7161ba --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/api_response.g.dart @@ -0,0 +1,167 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'api_response.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$apiResponseSerializer = new _$ApiResponseSerializer(); + +class _$ApiResponseSerializer implements StructuredSerializer { + @override + final Iterable types = const [ApiResponse, _$ApiResponse]; + @override + final String wireName = 'ApiResponse'; + + @override + Iterable serialize(Serializers serializers, ApiResponse object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'code', + serializers.serialize(object.code, specifiedType: const FullType(int)), + 'type', + serializers.serialize(object.type, specifiedType: const FullType(String)), + 'message', + serializers.serialize(object.message, + specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + ApiResponse deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new ApiResponseBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'code': + result.code = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'type': + result.type = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'message': + result.message = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + } + } + + return result.build(); + } +} + +class _$ApiResponse extends ApiResponse { + @override + final int code; + @override + final String type; + @override + final String message; + + factory _$ApiResponse([void Function(ApiResponseBuilder) updates]) => + (new ApiResponseBuilder()..update(updates)).build(); + + _$ApiResponse._({this.code, this.type, this.message}) : super._() { + if (code == null) { + throw new BuiltValueNullFieldError('ApiResponse', 'code'); + } + if (type == null) { + throw new BuiltValueNullFieldError('ApiResponse', 'type'); + } + if (message == null) { + throw new BuiltValueNullFieldError('ApiResponse', 'message'); + } + } + + @override + ApiResponse rebuild(void Function(ApiResponseBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + ApiResponseBuilder toBuilder() => new ApiResponseBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is ApiResponse && + code == other.code && + type == other.type && + message == other.message; + } + + @override + int get hashCode { + return $jf( + $jc($jc($jc(0, code.hashCode), type.hashCode), message.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('ApiResponse') + ..add('code', code) + ..add('type', type) + ..add('message', message)) + .toString(); + } +} + +class ApiResponseBuilder implements Builder { + _$ApiResponse _$v; + + int _code; + int get code => _$this._code; + set code(int code) => _$this._code = code; + + String _type; + String get type => _$this._type; + set type(String type) => _$this._type = type; + + String _message; + String get message => _$this._message; + set message(String message) => _$this._message = message; + + ApiResponseBuilder(); + + ApiResponseBuilder get _$this { + if (_$v != null) { + _code = _$v.code; + _type = _$v.type; + _message = _$v.message; + _$v = null; + } + return this; + } + + @override + void replace(ApiResponse other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$ApiResponse; + } + + @override + void update(void Function(ApiResponseBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$ApiResponse build() { + final _$result = + _$v ?? new _$ApiResponse._(code: code, type: type, message: message); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/model/category.dart b/samples/client/petstore/dart-dio/lib/model/category.dart new file mode 100644 index 0000000000..5d80fb5036 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/category.dart @@ -0,0 +1,20 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'category.g.dart'; + +abstract class Category implements Built { + @nullable + @BuiltValueField(wireName: 'id') + int get id; + + @nullable + @BuiltValueField(wireName: 'name') + String get name; + + // Boilerplate code needed to wire-up generated code + Category._(); + + factory Category([updates(CategoryBuilder b)]) = _$Category; + static Serializer get serializer => _$categorySerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/category.g.dart b/samples/client/petstore/dart-dio/lib/model/category.g.dart new file mode 100644 index 0000000000..4e4b83a006 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/category.g.dart @@ -0,0 +1,144 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'category.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$categorySerializer = new _$CategorySerializer(); + +class _$CategorySerializer implements StructuredSerializer { + @override + final Iterable types = const [Category, _$Category]; + @override + final String wireName = 'Category'; + + @override + Iterable serialize(Serializers serializers, Category object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'id', + serializers.serialize(object.id, specifiedType: const FullType(int)), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + Category deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new CategoryBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'id': + result.id = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'name': + result.name = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + } + } + + return result.build(); + } +} + +class _$Category extends Category { + @override + final int id; + @override + final String name; + + factory _$Category([void Function(CategoryBuilder) updates]) => + (new CategoryBuilder()..update(updates)).build(); + + _$Category._({this.id, this.name}) : super._() { + if (id == null) { + throw new BuiltValueNullFieldError('Category', 'id'); + } + if (name == null) { + throw new BuiltValueNullFieldError('Category', 'name'); + } + } + + @override + Category rebuild(void Function(CategoryBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + CategoryBuilder toBuilder() => new CategoryBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Category && id == other.id && name == other.name; + } + + @override + int get hashCode { + return $jf($jc($jc(0, id.hashCode), name.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('Category') + ..add('id', id) + ..add('name', name)) + .toString(); + } +} + +class CategoryBuilder implements Builder { + _$Category _$v; + + int _id; + int get id => _$this._id; + set id(int id) => _$this._id = id; + + String _name; + String get name => _$this._name; + set name(String name) => _$this._name = name; + + CategoryBuilder(); + + CategoryBuilder get _$this { + if (_$v != null) { + _id = _$v.id; + _name = _$v.name; + _$v = null; + } + return this; + } + + @override + void replace(Category other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$Category; + } + + @override + void update(void Function(CategoryBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$Category build() { + final _$result = _$v ?? new _$Category._(id: id, name: name); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/model/order.dart b/samples/client/petstore/dart-dio/lib/model/order.dart new file mode 100644 index 0000000000..a5bcec14b3 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/order.dart @@ -0,0 +1,39 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'order.g.dart'; + +abstract class Order implements Built { + @nullable + @BuiltValueField(wireName: 'id') + int get id; + + @nullable + @BuiltValueField(wireName: 'petId') + int get petId; + + @nullable + @BuiltValueField(wireName: 'quantity') + int get quantity; + + @nullable + @BuiltValueField(wireName: 'shipDate') + DateTime get shipDate; + /* Order Status */ + @nullable + + /* Order Status */ + @BuiltValueField(wireName: 'status') + String get status; + //enum statusEnum { placed, approved, delivered, };{ + + @nullable + @BuiltValueField(wireName: 'complete') + bool get complete; + + // Boilerplate code needed to wire-up generated code + Order._(); + + factory Order([updates(OrderBuilder b)]) = _$Order; + static Serializer get serializer => _$orderSerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/order.g.dart b/samples/client/petstore/dart-dio/lib/model/order.g.dart new file mode 100644 index 0000000000..e4eede934c --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/order.g.dart @@ -0,0 +1,243 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'order.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$orderSerializer = new _$OrderSerializer(); + +class _$OrderSerializer implements StructuredSerializer { + @override + final Iterable types = const [Order, _$Order]; + @override + final String wireName = 'Order'; + + @override + Iterable serialize(Serializers serializers, Order object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'id', + serializers.serialize(object.id, specifiedType: const FullType(int)), + 'petId', + serializers.serialize(object.petId, specifiedType: const FullType(int)), + 'quantity', + serializers.serialize(object.quantity, + specifiedType: const FullType(int)), + 'shipDate', + serializers.serialize(object.shipDate, + specifiedType: const FullType(DateTime)), + 'status', + serializers.serialize(object.status, + specifiedType: const FullType(String)), + 'complete', + serializers.serialize(object.complete, + specifiedType: const FullType(bool)), + ]; + + return result; + } + + @override + Order deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new OrderBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'id': + result.id = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'petId': + result.petId = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'quantity': + result.quantity = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'shipDate': + result.shipDate = serializers.deserialize(value, + specifiedType: const FullType(DateTime)) as DateTime; + break; + case 'status': + result.status = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'complete': + result.complete = serializers.deserialize(value, + specifiedType: const FullType(bool)) as bool; + break; + } + } + + return result.build(); + } +} + +class _$Order extends Order { + @override + final int id; + @override + final int petId; + @override + final int quantity; + @override + final DateTime shipDate; + @override + final String status; + @override + final bool complete; + + factory _$Order([void Function(OrderBuilder) updates]) => + (new OrderBuilder()..update(updates)).build(); + + _$Order._( + {this.id, + this.petId, + this.quantity, + this.shipDate, + this.status, + this.complete}) + : super._() { + if (id == null) { + throw new BuiltValueNullFieldError('Order', 'id'); + } + if (petId == null) { + throw new BuiltValueNullFieldError('Order', 'petId'); + } + if (quantity == null) { + throw new BuiltValueNullFieldError('Order', 'quantity'); + } + if (shipDate == null) { + throw new BuiltValueNullFieldError('Order', 'shipDate'); + } + if (status == null) { + throw new BuiltValueNullFieldError('Order', 'status'); + } + if (complete == null) { + throw new BuiltValueNullFieldError('Order', 'complete'); + } + } + + @override + Order rebuild(void Function(OrderBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + OrderBuilder toBuilder() => new OrderBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Order && + id == other.id && + petId == other.petId && + quantity == other.quantity && + shipDate == other.shipDate && + status == other.status && + complete == other.complete; + } + + @override + int get hashCode { + return $jf($jc( + $jc( + $jc( + $jc($jc($jc(0, id.hashCode), petId.hashCode), + quantity.hashCode), + shipDate.hashCode), + status.hashCode), + complete.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('Order') + ..add('id', id) + ..add('petId', petId) + ..add('quantity', quantity) + ..add('shipDate', shipDate) + ..add('status', status) + ..add('complete', complete)) + .toString(); + } +} + +class OrderBuilder implements Builder { + _$Order _$v; + + int _id; + int get id => _$this._id; + set id(int id) => _$this._id = id; + + int _petId; + int get petId => _$this._petId; + set petId(int petId) => _$this._petId = petId; + + int _quantity; + int get quantity => _$this._quantity; + set quantity(int quantity) => _$this._quantity = quantity; + + DateTime _shipDate; + DateTime get shipDate => _$this._shipDate; + set shipDate(DateTime shipDate) => _$this._shipDate = shipDate; + + String _status; + String get status => _$this._status; + set status(String status) => _$this._status = status; + + bool _complete; + bool get complete => _$this._complete; + set complete(bool complete) => _$this._complete = complete; + + OrderBuilder(); + + OrderBuilder get _$this { + if (_$v != null) { + _id = _$v.id; + _petId = _$v.petId; + _quantity = _$v.quantity; + _shipDate = _$v.shipDate; + _status = _$v.status; + _complete = _$v.complete; + _$v = null; + } + return this; + } + + @override + void replace(Order other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$Order; + } + + @override + void update(void Function(OrderBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$Order build() { + final _$result = _$v ?? + new _$Order._( + id: id, + petId: petId, + quantity: quantity, + shipDate: shipDate, + status: status, + complete: complete); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/model/pet.dart b/samples/client/petstore/dart-dio/lib/model/pet.dart new file mode 100644 index 0000000000..c3554e4239 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/pet.dart @@ -0,0 +1,42 @@ +import 'package:openapi/model/tag.dart'; +import 'package:openapi/model/category.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'pet.g.dart'; + +abstract class Pet implements Built { + @nullable + @BuiltValueField(wireName: 'id') + int get id; + + @nullable + @BuiltValueField(wireName: 'category') + Category get category; + + @nullable + @BuiltValueField(wireName: 'name') + String get name; + + @nullable + @BuiltValueField(wireName: 'photoUrls') + BuiltList get photoUrls; + + @nullable + @BuiltValueField(wireName: 'tags') + BuiltList get tags; + /* pet status in the store */ + @nullable + + /* pet status in the store */ + @BuiltValueField(wireName: 'status') + String get status; + //enum statusEnum { available, pending, sold, };{ + + // Boilerplate code needed to wire-up generated code + Pet._(); + + factory Pet([updates(PetBuilder b)]) = _$Pet; + static Serializer get serializer => _$petSerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/pet.g.dart b/samples/client/petstore/dart-dio/lib/model/pet.g.dart new file mode 100644 index 0000000000..058ad2dc9b --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/pet.g.dart @@ -0,0 +1,258 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'pet.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$petSerializer = new _$PetSerializer(); + +class _$PetSerializer implements StructuredSerializer { + @override + final Iterable types = const [Pet, _$Pet]; + @override + final String wireName = 'Pet'; + + @override + Iterable serialize(Serializers serializers, Pet object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'id', + serializers.serialize(object.id, specifiedType: const FullType(int)), + 'category', + serializers.serialize(object.category, + specifiedType: const FullType(Category)), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + 'photoUrls', + serializers.serialize(object.photoUrls, + specifiedType: const FullType(List, const [const FullType(String)])), + 'tags', + serializers.serialize(object.tags, + specifiedType: const FullType(List, const [const FullType(Tag)])), + 'status', + serializers.serialize(object.status, + specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + Pet deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new PetBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'id': + result.id = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'category': + result.category.replace(serializers.deserialize(value, + specifiedType: const FullType(Category)) as Category); + break; + case 'name': + result.name = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'photoUrls': + result.photoUrls = serializers.deserialize(value, + specifiedType: + const FullType(List, const [const FullType(String)])) + as List; + break; + case 'tags': + result.tags = serializers.deserialize(value, + specifiedType: + const FullType(List, const [const FullType(Tag)])) + as List; + break; + case 'status': + result.status = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + } + } + + return result.build(); + } +} + +class _$Pet extends Pet { + @override + final int id; + @override + final Category category; + @override + final String name; + @override + final List photoUrls; + @override + final List tags; + @override + final String status; + + factory _$Pet([void Function(PetBuilder) updates]) => + (new PetBuilder()..update(updates)).build(); + + _$Pet._( + {this.id, + this.category, + this.name, + this.photoUrls, + this.tags, + this.status}) + : super._() { + if (id == null) { + throw new BuiltValueNullFieldError('Pet', 'id'); + } + if (category == null) { + throw new BuiltValueNullFieldError('Pet', 'category'); + } + if (name == null) { + throw new BuiltValueNullFieldError('Pet', 'name'); + } + if (photoUrls == null) { + throw new BuiltValueNullFieldError('Pet', 'photoUrls'); + } + if (tags == null) { + throw new BuiltValueNullFieldError('Pet', 'tags'); + } + if (status == null) { + throw new BuiltValueNullFieldError('Pet', 'status'); + } + } + + @override + Pet rebuild(void Function(PetBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + PetBuilder toBuilder() => new PetBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Pet && + id == other.id && + category == other.category && + name == other.name && + photoUrls == other.photoUrls && + tags == other.tags && + status == other.status; + } + + @override + int get hashCode { + return $jf($jc( + $jc( + $jc($jc($jc($jc(0, id.hashCode), category.hashCode), name.hashCode), + photoUrls.hashCode), + tags.hashCode), + status.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('Pet') + ..add('id', id) + ..add('category', category) + ..add('name', name) + ..add('photoUrls', photoUrls) + ..add('tags', tags) + ..add('status', status)) + .toString(); + } +} + +class PetBuilder implements Builder { + _$Pet _$v; + + int _id; + int get id => _$this._id; + set id(int id) => _$this._id = id; + + CategoryBuilder _category; + CategoryBuilder get category => _$this._category ??= new CategoryBuilder(); + set category(CategoryBuilder category) => _$this._category = category; + + String _name; + String get name => _$this._name; + set name(String name) => _$this._name = name; + + List _photoUrls; + List get photoUrls => _$this._photoUrls; + set photoUrls(List photoUrls) => _$this._photoUrls = photoUrls; + + List _tags; + List get tags => _$this._tags; + set tags(List tags) => _$this._tags = tags; + + String _status; + String get status => _$this._status; + set status(String status) => _$this._status = status; + + PetBuilder(); + + PetBuilder get _$this { + if (_$v != null) { + _id = _$v.id; + _category = _$v.category?.toBuilder(); + _name = _$v.name; + _photoUrls = _$v.photoUrls; + _tags = _$v.tags; + _status = _$v.status; + _$v = null; + } + return this; + } + + @override + void replace(Pet other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$Pet; + } + + @override + void update(void Function(PetBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$Pet build() { + _$Pet _$result; + try { + _$result = _$v ?? + new _$Pet._( + id: id, + category: category.build(), + name: name, + photoUrls: photoUrls, + tags: tags, + status: status); + } catch (_) { + String _$failedField; + try { + _$failedField = 'category'; + category.build(); + } catch (e) { + throw new BuiltValueNestedFieldError( + 'Pet', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/model/tag.dart b/samples/client/petstore/dart-dio/lib/model/tag.dart new file mode 100644 index 0000000000..9d30476772 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/tag.dart @@ -0,0 +1,20 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'tag.g.dart'; + +abstract class Tag implements Built { + @nullable + @BuiltValueField(wireName: 'id') + int get id; + + @nullable + @BuiltValueField(wireName: 'name') + String get name; + + // Boilerplate code needed to wire-up generated code + Tag._(); + + factory Tag([updates(TagBuilder b)]) = _$Tag; + static Serializer get serializer => _$tagSerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/tag.g.dart b/samples/client/petstore/dart-dio/lib/model/tag.g.dart new file mode 100644 index 0000000000..e7de1eab62 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/tag.g.dart @@ -0,0 +1,144 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'tag.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$tagSerializer = new _$TagSerializer(); + +class _$TagSerializer implements StructuredSerializer { + @override + final Iterable types = const [Tag, _$Tag]; + @override + final String wireName = 'Tag'; + + @override + Iterable serialize(Serializers serializers, Tag object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'id', + serializers.serialize(object.id, specifiedType: const FullType(int)), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + Tag deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new TagBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'id': + result.id = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'name': + result.name = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + } + } + + return result.build(); + } +} + +class _$Tag extends Tag { + @override + final int id; + @override + final String name; + + factory _$Tag([void Function(TagBuilder) updates]) => + (new TagBuilder()..update(updates)).build(); + + _$Tag._({this.id, this.name}) : super._() { + if (id == null) { + throw new BuiltValueNullFieldError('Tag', 'id'); + } + if (name == null) { + throw new BuiltValueNullFieldError('Tag', 'name'); + } + } + + @override + Tag rebuild(void Function(TagBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + TagBuilder toBuilder() => new TagBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Tag && id == other.id && name == other.name; + } + + @override + int get hashCode { + return $jf($jc($jc(0, id.hashCode), name.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('Tag') + ..add('id', id) + ..add('name', name)) + .toString(); + } +} + +class TagBuilder implements Builder { + _$Tag _$v; + + int _id; + int get id => _$this._id; + set id(int id) => _$this._id = id; + + String _name; + String get name => _$this._name; + set name(String name) => _$this._name = name; + + TagBuilder(); + + TagBuilder get _$this { + if (_$v != null) { + _id = _$v.id; + _name = _$v.name; + _$v = null; + } + return this; + } + + @override + void replace(Tag other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$Tag; + } + + @override + void update(void Function(TagBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$Tag build() { + final _$result = _$v ?? new _$Tag._(id: id, name: name); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/model/user.dart b/samples/client/petstore/dart-dio/lib/model/user.dart new file mode 100644 index 0000000000..da351b55d8 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/user.dart @@ -0,0 +1,46 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'user.g.dart'; + +abstract class User implements Built { + @nullable + @BuiltValueField(wireName: 'id') + int get id; + + @nullable + @BuiltValueField(wireName: 'username') + String get username; + + @nullable + @BuiltValueField(wireName: 'firstName') + String get firstName; + + @nullable + @BuiltValueField(wireName: 'lastName') + String get lastName; + + @nullable + @BuiltValueField(wireName: 'email') + String get email; + + @nullable + @BuiltValueField(wireName: 'password') + String get password; + + @nullable + @BuiltValueField(wireName: 'phone') + String get phone; + /* User Status */ + @nullable + + /* User Status */ + @BuiltValueField(wireName: 'userStatus') + int get userStatus; + + // Boilerplate code needed to wire-up generated code + User._(); + + factory User([updates(UserBuilder b)]) = _$User; + static Serializer get serializer => _$userSerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/user.g.dart b/samples/client/petstore/dart-dio/lib/model/user.g.dart new file mode 100644 index 0000000000..2b277e1d49 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/user.g.dart @@ -0,0 +1,290 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$userSerializer = new _$UserSerializer(); + +class _$UserSerializer implements StructuredSerializer { + @override + final Iterable types = const [User, _$User]; + @override + final String wireName = 'User'; + + @override + Iterable serialize(Serializers serializers, User object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'id', + serializers.serialize(object.id, specifiedType: const FullType(int)), + 'username', + serializers.serialize(object.username, + specifiedType: const FullType(String)), + 'firstName', + serializers.serialize(object.firstName, + specifiedType: const FullType(String)), + 'lastName', + serializers.serialize(object.lastName, + specifiedType: const FullType(String)), + 'email', + serializers.serialize(object.email, + specifiedType: const FullType(String)), + 'password', + serializers.serialize(object.password, + specifiedType: const FullType(String)), + 'phone', + serializers.serialize(object.phone, + specifiedType: const FullType(String)), + 'userStatus', + serializers.serialize(object.userStatus, + specifiedType: const FullType(int)), + ]; + + return result; + } + + @override + User deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new UserBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'id': + result.id = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'username': + result.username = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'firstName': + result.firstName = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'lastName': + result.lastName = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'email': + result.email = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'password': + result.password = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'phone': + result.phone = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'userStatus': + result.userStatus = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + } + } + + return result.build(); + } +} + +class _$User extends User { + @override + final int id; + @override + final String username; + @override + final String firstName; + @override + final String lastName; + @override + final String email; + @override + final String password; + @override + final String phone; + @override + final int userStatus; + + factory _$User([void Function(UserBuilder) updates]) => + (new UserBuilder()..update(updates)).build(); + + _$User._( + {this.id, + this.username, + this.firstName, + this.lastName, + this.email, + this.password, + this.phone, + this.userStatus}) + : super._() { + if (id == null) { + throw new BuiltValueNullFieldError('User', 'id'); + } + if (username == null) { + throw new BuiltValueNullFieldError('User', 'username'); + } + if (firstName == null) { + throw new BuiltValueNullFieldError('User', 'firstName'); + } + if (lastName == null) { + throw new BuiltValueNullFieldError('User', 'lastName'); + } + if (email == null) { + throw new BuiltValueNullFieldError('User', 'email'); + } + if (password == null) { + throw new BuiltValueNullFieldError('User', 'password'); + } + if (phone == null) { + throw new BuiltValueNullFieldError('User', 'phone'); + } + if (userStatus == null) { + throw new BuiltValueNullFieldError('User', 'userStatus'); + } + } + + @override + User rebuild(void Function(UserBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + UserBuilder toBuilder() => new UserBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is User && + id == other.id && + username == other.username && + firstName == other.firstName && + lastName == other.lastName && + email == other.email && + password == other.password && + phone == other.phone && + userStatus == other.userStatus; + } + + @override + int get hashCode { + return $jf($jc( + $jc( + $jc( + $jc( + $jc( + $jc($jc($jc(0, id.hashCode), username.hashCode), + firstName.hashCode), + lastName.hashCode), + email.hashCode), + password.hashCode), + phone.hashCode), + userStatus.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('User') + ..add('id', id) + ..add('username', username) + ..add('firstName', firstName) + ..add('lastName', lastName) + ..add('email', email) + ..add('password', password) + ..add('phone', phone) + ..add('userStatus', userStatus)) + .toString(); + } +} + +class UserBuilder implements Builder { + _$User _$v; + + int _id; + int get id => _$this._id; + set id(int id) => _$this._id = id; + + String _username; + String get username => _$this._username; + set username(String username) => _$this._username = username; + + String _firstName; + String get firstName => _$this._firstName; + set firstName(String firstName) => _$this._firstName = firstName; + + String _lastName; + String get lastName => _$this._lastName; + set lastName(String lastName) => _$this._lastName = lastName; + + String _email; + String get email => _$this._email; + set email(String email) => _$this._email = email; + + String _password; + String get password => _$this._password; + set password(String password) => _$this._password = password; + + String _phone; + String get phone => _$this._phone; + set phone(String phone) => _$this._phone = phone; + + int _userStatus; + int get userStatus => _$this._userStatus; + set userStatus(int userStatus) => _$this._userStatus = userStatus; + + UserBuilder(); + + UserBuilder get _$this { + if (_$v != null) { + _id = _$v.id; + _username = _$v.username; + _firstName = _$v.firstName; + _lastName = _$v.lastName; + _email = _$v.email; + _password = _$v.password; + _phone = _$v.phone; + _userStatus = _$v.userStatus; + _$v = null; + } + return this; + } + + @override + void replace(User other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$User; + } + + @override + void update(void Function(UserBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$User build() { + final _$result = _$v ?? + new _$User._( + id: id, + username: username, + firstName: firstName, + lastName: lastName, + email: email, + password: password, + phone: phone, + userStatus: userStatus); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/serializers.dart b/samples/client/petstore/dart-dio/lib/serializers.dart new file mode 100644 index 0000000000..88a06193f3 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/serializers.dart @@ -0,0 +1,48 @@ +library serializers; + +import 'package:built_value/serializer.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/standard_json_plugin.dart'; + +import 'package:openapi/model/api_response.dart'; +import 'package:openapi/model/category.dart'; +import 'package:openapi/model/order.dart'; +import 'package:openapi/model/pet.dart'; +import 'package:openapi/model/tag.dart'; +import 'package:openapi/model/user.dart'; + +part 'serializers.g.dart'; + +@SerializersFor(const [ + ApiResponse, + Category, + Order, + Pet, + Tag, + User, +]) + +//allow all models to be serialized within a list +Serializers serializers = (_$serializers.toBuilder() + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(ApiResponse)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Category)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Order)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Pet)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Tag)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(User)]), + () => new ListBuilder())) + .build(); + +Serializers standardSerializers = + (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/samples/client/petstore/dart-dio/lib/serializers.g.dart b/samples/client/petstore/dart-dio/lib/serializers.g.dart new file mode 100644 index 0000000000..8106577235 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/serializers.g.dart @@ -0,0 +1,18 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of serializers; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializers _$serializers = (new Serializers().toBuilder() + ..add(ApiResponse.serializer) + ..add(Category.serializer) + ..add(Order.serializer) + ..add(Pet.serializer) + ..add(Tag.serializer) + ..add(User.serializer)) + .build(); + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/pubspec.yaml b/samples/client/petstore/dart-dio/pubspec.yaml new file mode 100644 index 0000000000..b2d0d4d00a --- /dev/null +++ b/samples/client/petstore/dart-dio/pubspec.yaml @@ -0,0 +1,13 @@ +name: openapi +version: 1.0.0 +description: OpenAPI API client +environment: + sdk: ">=2.3.0 <3.0.0" +dependencies: + dio: ^3.0.3 + built_value: 6.7.0 + built_collection: 4.2.2 +dev_dependencies: + built_value_generator: ^6.7.1 + build_runner: ^1.7.1 + test: 1.6.5 \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart deleted file mode 100644 index 4e77ddcf6e..0000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart +++ /dev/null @@ -1,14 +0,0 @@ -part of openapi.api; - -class HttpBasicAuth implements Authentication { - - String username; - String password; - - @override - void applyToParams(List queryParams, Map headerParams) { - String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); - headerParams["Authorization"] = "Basic " + BASE64.encode(UTF8.encode(str)); - } - -} \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart deleted file mode 100644 index 13bfd79974..0000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart +++ /dev/null @@ -1,19 +0,0 @@ -part of openapi.api; - -class OAuth implements Authentication { - String accessToken; - - OAuth({this.accessToken}) { - } - - @override - void applyToParams(List queryParams, Map headerParams) { - if (accessToken != null) { - headerParams["Authorization"] = "Bearer " + accessToken; - } - } - - void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } -} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart deleted file mode 100644 index f2fddde347..0000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart +++ /dev/null @@ -1,56 +0,0 @@ -part of openapi.api; - -class ApiResponse { - - int code = null; - - String type = null; - - String message = null; - ApiResponse(); - - @override - String toString() { - return 'ApiResponse[code=$code, type=$type, message=$message, ]'; - } - - ApiResponse.fromJson(Map json) { - if (json == null) return; - if (json['code'] == null) { - code = null; - } else { - code = json['code']; - } - if (json['type'] == null) { - type = null; - } else { - type = json['type']; - } - if (json['message'] == null) { - message = null; - } else { - message = json['message']; - } - } - - Map toJson() { - return { - 'code': code, - 'type': type, - 'message': message - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new ApiResponse.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new ApiResponse.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart deleted file mode 100644 index 1750c6a0ac..0000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart +++ /dev/null @@ -1,48 +0,0 @@ -part of openapi.api; - -class Category { - - int id = null; - - String name = null; - Category(); - - @override - String toString() { - return 'Category[id=$id, name=$name, ]'; - } - - Category.fromJson(Map json) { - if (json == null) return; - if (json['id'] == null) { - id = null; - } else { - id = json['id']; - } - if (json['name'] == null) { - name = null; - } else { - name = json['name']; - } - } - - Map toJson() { - return { - 'id': id, - 'name': name - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new Category.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new Category.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart deleted file mode 100644 index 51d15f7304..0000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart +++ /dev/null @@ -1,81 +0,0 @@ -part of openapi.api; - -class Order { - - int id = null; - - int petId = null; - - int quantity = null; - - DateTime shipDate = null; - /* Order Status */ - String status = null; - //enum statusEnum { placed, approved, delivered, };{ - - bool complete = false; - Order(); - - @override - String toString() { - return 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete, ]'; - } - - Order.fromJson(Map json) { - if (json == null) return; - if (json['id'] == null) { - id = null; - } else { - id = json['id']; - } - if (json['petId'] == null) { - petId = null; - } else { - petId = json['petId']; - } - if (json['quantity'] == null) { - quantity = null; - } else { - quantity = json['quantity']; - } - if (json['shipDate'] == null) { - shipDate = null; - } else { - shipDate = DateTime.parse(json['shipDate']); - } - if (json['status'] == null) { - status = null; - } else { - status = json['status']; - } - if (json['complete'] == null) { - complete = null; - } else { - complete = json['complete']; - } - } - - Map toJson() { - return { - 'id': id, - 'petId': petId, - 'quantity': quantity, - 'shipDate': shipDate == null ? '' : shipDate.toUtc().toIso8601String(), - 'status': status, - 'complete': complete - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new Order.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new Order.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart deleted file mode 100644 index c64406368d..0000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart +++ /dev/null @@ -1,81 +0,0 @@ -part of openapi.api; - -class Pet { - - int id = null; - - Category category = null; - - String name = null; - - List photoUrls = []; - - List tags = []; - /* pet status in the store */ - String status = null; - //enum statusEnum { available, pending, sold, };{ - Pet(); - - @override - String toString() { - return 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status, ]'; - } - - Pet.fromJson(Map json) { - if (json == null) return; - if (json['id'] == null) { - id = null; - } else { - id = json['id']; - } - if (json['category'] == null) { - category = null; - } else { - category = new Category.fromJson(json['category']); - } - if (json['name'] == null) { - name = null; - } else { - name = json['name']; - } - if (json['photoUrls'] == null) { - photoUrls = null; - } else { - photoUrls = (json['photoUrls'] as List).map((item) => item as String).toList(); - } - if (json['tags'] == null) { - tags = null; - } else { - tags = Tag.listFromJson(json['tags']); - } - if (json['status'] == null) { - status = null; - } else { - status = json['status']; - } - } - - Map toJson() { - return { - 'id': id, - 'category': category, - 'name': name, - 'photoUrls': photoUrls, - 'tags': tags, - 'status': status - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new Pet.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new Pet.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart deleted file mode 100644 index 980c6e0163..0000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart +++ /dev/null @@ -1,48 +0,0 @@ -part of openapi.api; - -class Tag { - - int id = null; - - String name = null; - Tag(); - - @override - String toString() { - return 'Tag[id=$id, name=$name, ]'; - } - - Tag.fromJson(Map json) { - if (json == null) return; - if (json['id'] == null) { - id = null; - } else { - id = json['id']; - } - if (json['name'] == null) { - name = null; - } else { - name = json['name']; - } - } - - Map toJson() { - return { - 'id': id, - 'name': name - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new Tag.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new Tag.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart deleted file mode 100644 index 1555eb0a3e..0000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart +++ /dev/null @@ -1,96 +0,0 @@ -part of openapi.api; - -class User { - - int id = null; - - String username = null; - - String firstName = null; - - String lastName = null; - - String email = null; - - String password = null; - - String phone = null; - /* User Status */ - int userStatus = null; - User(); - - @override - String toString() { - return 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus, ]'; - } - - User.fromJson(Map json) { - if (json == null) return; - if (json['id'] == null) { - id = null; - } else { - id = json['id']; - } - if (json['username'] == null) { - username = null; - } else { - username = json['username']; - } - if (json['firstName'] == null) { - firstName = null; - } else { - firstName = json['firstName']; - } - if (json['lastName'] == null) { - lastName = null; - } else { - lastName = json['lastName']; - } - if (json['email'] == null) { - email = null; - } else { - email = json['email']; - } - if (json['password'] == null) { - password = null; - } else { - password = json['password']; - } - if (json['phone'] == null) { - phone = null; - } else { - phone = json['phone']; - } - if (json['userStatus'] == null) { - userStatus = null; - } else { - userStatus = json['userStatus']; - } - } - - Map toJson() { - return { - 'id': id, - 'username': username, - 'firstName': firstName, - 'lastName': lastName, - 'email': email, - 'password': password, - 'phone': phone, - 'userStatus': userStatus - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new User.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new User.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart2/openapi/.gitignore b/samples/client/petstore/dart2/openapi/.gitignore new file mode 100644 index 0000000000..7c28044164 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/.gitignore @@ -0,0 +1,27 @@ +# See https://www.dartlang.org/tools/private-files.html + +# Files and directories created by pub +.buildlog +.packages +.project +.pub/ +build/ +**/packages/ + +# Files created by dart2js +# (Most Dart developers will use pub build to compile Dart, use/modify these +# rules if you intend to use dart2js directly +# Convention is to use extension '.dart.js' for Dart compiled to Javascript to +# differentiate from explicit Javascript files) +*.dart.js +*.part.js +*.js.deps +*.js.map +*.info.json + +# Directory created by dartdoc +doc/api/ + +# Don't commit pubspec lock file +# (Library packages only! Remove pattern if developing an application package) +pubspec.lock diff --git a/samples/client/petstore/dart2/openapi/.openapi-generator-ignore b/samples/client/petstore/dart2/openapi/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/dart2/openapi/.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/dart/flutter_petstore/swagger/.openapi-generator/VERSION b/samples/client/petstore/dart2/openapi/.openapi-generator/VERSION similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION rename to samples/client/petstore/dart2/openapi/.openapi-generator/VERSION diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.travis.yml b/samples/client/petstore/dart2/openapi/.travis.yml similarity index 93% rename from samples/client/petstore/dart/flutter_petstore/swagger/.travis.yml rename to samples/client/petstore/dart2/openapi/.travis.yml index 82b19541fa..d0758bc9f0 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/.travis.yml +++ b/samples/client/petstore/dart2/openapi/.travis.yml @@ -3,7 +3,7 @@ language: dart dart: # Install a specific stable release -- "1.24.3" +- "2.2.0" install: - pub get diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/README.md b/samples/client/petstore/dart2/openapi/README.md similarity index 89% rename from samples/client/petstore/dart/flutter_petstore/swagger/README.md rename to samples/client/petstore/dart2/openapi/README.md index 8520a219f8..a32c667b4e 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/README.md +++ b/samples/client/petstore/dart2/openapi/README.md @@ -8,24 +8,20 @@ This Dart package is automatically generated by the [OpenAPI Generator](https:// ## Requirements -Dart 1.20.0 or later OR Flutter 0.0.20 or later +Dart 2.0 or later ## Installation & Usage ### Github -If this Dart package is published to Github, please include the following in pubspec.yaml +If this Dart package is published to Github, add the following dependency to your pubspec.yaml ``` -name: openapi -version: 1.0.0 -description: OpenAPI API client dependencies: openapi: git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git - version: 'any' ``` ### Local -To use the package in your local drive, please include the following in pubspec.yaml +To use the package in your local drive, add the following dependency to your pubspec.yaml ``` dependencies: openapi: @@ -44,10 +40,10 @@ Please follow the [installation procedure](#installation--usage) and then run th import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; -var api_instance = new PetApi(); -var body = new Pet(); // Pet | Pet object that needs to be added to the store +var api_instance = PetApi(); +var body = Pet(); // Pet | Pet object that needs to be added to the store try { api_instance.addPet(body); diff --git a/samples/client/petstore/dart2/openapi/docs/ApiResponse.md b/samples/client/petstore/dart2/openapi/docs/ApiResponse.md new file mode 100644 index 0000000000..92422f0f44 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/docs/ApiResponse.md @@ -0,0 +1,17 @@ +# openapi.model.ApiResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] [default to null] +**type** | **String** | | [optional] [default to null] +**message** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart2/openapi/docs/Category.md b/samples/client/petstore/dart2/openapi/docs/Category.md new file mode 100644 index 0000000000..cc0d1633b5 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/docs/Category.md @@ -0,0 +1,16 @@ +# openapi.model.Category + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart2/openapi/docs/Order.md b/samples/client/petstore/dart2/openapi/docs/Order.md new file mode 100644 index 0000000000..310ce6c65b --- /dev/null +++ b/samples/client/petstore/dart2/openapi/docs/Order.md @@ -0,0 +1,20 @@ +# openapi.model.Order + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**petId** | **int** | | [optional] [default to null] +**quantity** | **int** | | [optional] [default to null] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] [default to null] +**status** | **String** | Order Status | [optional] [default to null] +**complete** | **bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md b/samples/client/petstore/dart2/openapi/docs/Pet.md similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md rename to samples/client/petstore/dart2/openapi/docs/Pet.md diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md b/samples/client/petstore/dart2/openapi/docs/PetApi.md similarity index 88% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md rename to samples/client/petstore/dart2/openapi/docs/PetApi.md index 5780e7f380..7b5de3894a 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md +++ b/samples/client/petstore/dart2/openapi/docs/PetApi.md @@ -28,10 +28,10 @@ Add a new pet to the store ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; -var api_instance = new PetApi(); -var body = new Pet(); // Pet | Pet object that needs to be added to the store +var api_instance = PetApi(); +var body = Pet(); // Pet | Pet object that needs to be added to the store try { api_instance.addPet(body); @@ -70,9 +70,9 @@ Deletes a pet ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; -var api_instance = new PetApi(); +var api_instance = PetApi(); var petId = 789; // int | Pet id to delete var apiKey = apiKey_example; // String | @@ -116,9 +116,9 @@ Multiple status values can be provided with comma separated strings ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; -var api_instance = new PetApi(); +var api_instance = PetApi(); var status = []; // List | Status values that need to be considered for filter try { @@ -161,9 +161,9 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; -var api_instance = new PetApi(); +var api_instance = PetApi(); var tags = []; // List | Tags to filter by try { @@ -206,11 +206,11 @@ Returns a single pet ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key -//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; // uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; -var api_instance = new PetApi(); +var api_instance = PetApi(); var petId = 789; // int | ID of pet to return try { @@ -251,10 +251,10 @@ Update an existing pet ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; -var api_instance = new PetApi(); -var body = new Pet(); // Pet | Pet object that needs to be added to the store +var api_instance = PetApi(); +var body = Pet(); // Pet | Pet object that needs to be added to the store try { api_instance.updatePet(body); @@ -293,9 +293,9 @@ Updates a pet in the store with form data ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; -var api_instance = new PetApi(); +var api_instance = PetApi(); var petId = 789; // int | ID of pet that needs to be updated var name = name_example; // String | Updated name of the pet var status = status_example; // String | Updated status of the pet @@ -339,9 +339,9 @@ uploads an image ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; -var api_instance = new PetApi(); +var api_instance = PetApi(); var petId = 789; // int | ID of pet to update var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server var file = BINARY_DATA_HERE; // MultipartFile | file to upload diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md b/samples/client/petstore/dart2/openapi/docs/StoreApi.md similarity index 92% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md rename to samples/client/petstore/dart2/openapi/docs/StoreApi.md index df76647f11..1cc37e2a47 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md +++ b/samples/client/petstore/dart2/openapi/docs/StoreApi.md @@ -26,7 +26,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ```dart import 'package:openapi/api.dart'; -var api_instance = new StoreApi(); +var api_instance = StoreApi(); var orderId = orderId_example; // String | ID of the order that needs to be deleted try { @@ -68,11 +68,11 @@ Returns a map of status codes to quantities ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key -//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; // uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; -var api_instance = new StoreApi(); +var api_instance = StoreApi(); try { var result = api_instance.getInventory(); @@ -111,7 +111,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ```dart import 'package:openapi/api.dart'; -var api_instance = new StoreApi(); +var api_instance = StoreApi(); var orderId = 789; // int | ID of pet that needs to be fetched try { @@ -152,8 +152,8 @@ Place an order for a pet ```dart import 'package:openapi/api.dart'; -var api_instance = new StoreApi(); -var body = new Order(); // Order | order placed for purchasing the pet +var api_instance = StoreApi(); +var body = Order(); // Order | order placed for purchasing the pet try { var result = api_instance.placeOrder(body); diff --git a/samples/client/petstore/dart2/openapi/docs/Tag.md b/samples/client/petstore/dart2/openapi/docs/Tag.md new file mode 100644 index 0000000000..ded7b32ac3 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/docs/Tag.md @@ -0,0 +1,16 @@ +# openapi.model.Tag + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart2/openapi/docs/User.md b/samples/client/petstore/dart2/openapi/docs/User.md new file mode 100644 index 0000000000..3761b70cf0 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/docs/User.md @@ -0,0 +1,22 @@ +# openapi.model.User + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**username** | **String** | | [optional] [default to null] +**firstName** | **String** | | [optional] [default to null] +**lastName** | **String** | | [optional] [default to null] +**email** | **String** | | [optional] [default to null] +**password** | **String** | | [optional] [default to null] +**phone** | **String** | | [optional] [default to null] +**userStatus** | **int** | User Status | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart2/openapi/docs/UserApi.md b/samples/client/petstore/dart2/openapi/docs/UserApi.md new file mode 100644 index 0000000000..1ee5f6fced --- /dev/null +++ b/samples/client/petstore/dart2/openapi/docs/UserApi.md @@ -0,0 +1,349 @@ +# openapi.api.UserApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user + + +# **createUser** +> createUser(body) + +Create user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var body = User(); // User | Created user object + +try { + api_instance.createUser(body); +} catch (e) { + print("Exception when calling UserApi->createUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| Created user object | + +### 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) + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(body) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var body = [List<User>()]; // List | List of user object + +try { + api_instance.createUsersWithArrayInput(body); +} catch (e) { + print("Exception when calling UserApi->createUsersWithArrayInput: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### 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) + +# **createUsersWithListInput** +> createUsersWithListInput(body) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var body = [List<User>()]; // List | List of user object + +try { + api_instance.createUsersWithListInput(body); +} catch (e) { + print("Exception when calling UserApi->createUsersWithListInput: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### 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) + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var username = username_example; // String | The name that needs to be deleted + +try { + api_instance.deleteUser(username); +} catch (e) { + print("Exception when calling UserApi->deleteUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | [default to null] + +### 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) + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var username = username_example; // String | The name that needs to be fetched. Use user1 for testing. + +try { + var result = api_instance.getUserByName(username); + print(result); +} catch (e) { + print("Exception when calling UserApi->getUserByName: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | [default to null] + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var username = username_example; // String | The user name for login +var password = password_example; // String | The password for login in clear text + +try { + var result = api_instance.loginUser(username, password); + print(result); +} catch (e) { + print("Exception when calling UserApi->loginUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | [default to null] + **password** | **String**| The password for login in clear text | [default to null] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); + +try { + api_instance.logoutUser(); +} catch (e) { + print("Exception when calling UserApi->logoutUser: $e\n"); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +> updateUser(username, body) + +Updated user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var username = username_example; // String | name that need to be deleted +var body = User(); // User | Updated user object + +try { + api_instance.updateUser(username, body); +} catch (e) { + print("Exception when calling UserApi->updateUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | [default to null] + **body** | [**User**](User.md)| Updated user object | + +### 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) + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh b/samples/client/petstore/dart2/openapi/git_push.sh similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh rename to samples/client/petstore/dart2/openapi/git_push.sh diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart b/samples/client/petstore/dart2/openapi/lib/api.dart similarity index 92% rename from samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart rename to samples/client/petstore/dart2/openapi/lib/api.dart index 9a64a5342b..69c3ecd2e1 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart +++ b/samples/client/petstore/dart2/openapi/lib/api.dart @@ -24,4 +24,4 @@ part 'model/tag.dart'; part 'model/user.dart'; -ApiClient defaultApiClient = new ApiClient(); +ApiClient defaultApiClient = ApiClient(); diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart b/samples/client/petstore/dart2/openapi/lib/api/pet_api.dart similarity index 73% rename from samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart rename to samples/client/petstore/dart2/openapi/lib/api/pet_api.dart index 6ffc146490..2b00c7d63b 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart +++ b/samples/client/petstore/dart2/openapi/lib/api/pet_api.dart @@ -7,15 +7,15 @@ class PetApi { PetApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - /// Add a new pet to the store + /// Add a new pet to the store with HTTP info returned /// /// - Future addPet(Pet body) async { + Future addPetWithHttpInfo(Pet body) async { Object postBody = body; // verify required params are set if(body == null) { - throw new ApiException(400, "Missing required param: body"); + throw ApiException(400, "Missing required param: body"); } // create path and map variables @@ -28,12 +28,12 @@ class PetApi { List contentTypes = ["application/json","application/xml"]; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = ["petstore_auth"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -48,23 +48,31 @@ class PetApi { formParams, contentType, authNames); + return response; + } + /// Add a new pet to the store + /// + /// + Future addPet(Pet body) async { + Response response = await addPetWithHttpInfo(body); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } - /// Deletes a pet + + /// Deletes a pet with HTTP info returned /// /// - Future deletePet(int petId, { String apiKey }) async { - Object postBody = null; + Future deletePetWithHttpInfo(int petId, { String apiKey }) async { + Object postBody; // verify required params are set if(petId == null) { - throw new ApiException(400, "Missing required param: petId"); + throw ApiException(400, "Missing required param: petId"); } // create path and map variables @@ -78,12 +86,12 @@ class PetApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = ["petstore_auth"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -98,23 +106,31 @@ class PetApi { formParams, contentType, authNames); + return response; + } + /// Deletes a pet + /// + /// + Future deletePet(int petId, { String apiKey }) async { + Response response = await deletePetWithHttpInfo(petId, apiKey: apiKey ); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } - /// Finds Pets by status + + /// Finds Pets by status with HTTP info returned /// /// Multiple status values can be provided with comma separated strings - Future> findPetsByStatus(List status) async { - Object postBody = null; + Future findPetsByStatusWithHttpInfo(List status) async { + Object postBody; // verify required params are set if(status == null) { - throw new ApiException(400, "Missing required param: status"); + throw ApiException(400, "Missing required param: status"); } // create path and map variables @@ -128,12 +144,12 @@ class PetApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = ["petstore_auth"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -148,24 +164,32 @@ class PetApi { formParams, contentType, authNames); + return response; + } + /// Finds Pets by status + /// + /// Multiple status values can be provided with comma separated strings + Future> findPetsByStatus(List status) async { + Response response = await findPetsByStatusWithHttpInfo(status); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List).map((item) => item as Pet).toList(); } else { return null; } } - /// Finds Pets by tags + + /// Finds Pets by tags with HTTP info returned /// /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - Future> findPetsByTags(List tags) async { - Object postBody = null; + Future findPetsByTagsWithHttpInfo(List tags) async { + Object postBody; // verify required params are set if(tags == null) { - throw new ApiException(400, "Missing required param: tags"); + throw ApiException(400, "Missing required param: tags"); } // create path and map variables @@ -179,12 +203,12 @@ class PetApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = ["petstore_auth"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -199,24 +223,32 @@ class PetApi { formParams, contentType, authNames); + return response; + } + /// Finds Pets by tags + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + Future> findPetsByTags(List tags) async { + Response response = await findPetsByTagsWithHttpInfo(tags); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List).map((item) => item as Pet).toList(); } else { return null; } } - /// Find pet by ID + + /// Find pet by ID with HTTP info returned /// /// Returns a single pet - Future getPetById(int petId) async { - Object postBody = null; + Future getPetByIdWithHttpInfo(int petId) async { + Object postBody; // verify required params are set if(petId == null) { - throw new ApiException(400, "Missing required param: petId"); + throw ApiException(400, "Missing required param: petId"); } // create path and map variables @@ -229,12 +261,12 @@ class PetApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = ["api_key"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -249,24 +281,32 @@ class PetApi { formParams, contentType, authNames); + return response; + } + /// Find pet by ID + /// + /// Returns a single pet + Future getPetById(int petId) async { + Response response = await getPetByIdWithHttpInfo(petId); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { return apiClient.deserialize(_decodeBodyBytes(response), 'Pet') as Pet; } else { return null; } } - /// Update an existing pet + + /// Update an existing pet with HTTP info returned /// /// - Future updatePet(Pet body) async { + Future updatePetWithHttpInfo(Pet body) async { Object postBody = body; // verify required params are set if(body == null) { - throw new ApiException(400, "Missing required param: body"); + throw ApiException(400, "Missing required param: body"); } // create path and map variables @@ -279,12 +319,12 @@ class PetApi { List contentTypes = ["application/json","application/xml"]; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = ["petstore_auth"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -299,23 +339,31 @@ class PetApi { formParams, contentType, authNames); + return response; + } + /// Update an existing pet + /// + /// + Future updatePet(Pet body) async { + Response response = await updatePetWithHttpInfo(body); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } - /// Updates a pet in the store with form data + + /// Updates a pet in the store with form data with HTTP info returned /// /// - Future updatePetWithForm(int petId, { String name, String status }) async { - Object postBody = null; + Future updatePetWithFormWithHttpInfo(int petId, { String name, String status }) async { + Object postBody; // verify required params are set if(petId == null) { - throw new ApiException(400, "Missing required param: petId"); + throw ApiException(400, "Missing required param: petId"); } // create path and map variables @@ -328,12 +376,12 @@ class PetApi { List contentTypes = ["application/x-www-form-urlencoded"]; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = ["petstore_auth"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if (name != null) { hasFields = true; mp.fields['name'] = parameterToString(name); @@ -360,23 +408,31 @@ class PetApi { formParams, contentType, authNames); + return response; + } + /// Updates a pet in the store with form data + /// + /// + Future updatePetWithForm(int petId, { String name, String status }) async { + Response response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status ); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } - /// uploads an image + + /// uploads an image with HTTP info returned /// /// - Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async { - Object postBody = null; + Future uploadFileWithHttpInfo(int petId, { String additionalMetadata, MultipartFile file }) async { + Object postBody; // verify required params are set if(petId == null) { - throw new ApiException(400, "Missing required param: petId"); + throw ApiException(400, "Missing required param: petId"); } // create path and map variables @@ -389,12 +445,12 @@ class PetApi { List contentTypes = ["multipart/form-data"]; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = ["petstore_auth"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if (additionalMetadata != null) { hasFields = true; mp.fields['additionalMetadata'] = parameterToString(additionalMetadata); @@ -420,13 +476,21 @@ class PetApi { formParams, contentType, authNames); + return response; + } + /// uploads an image + /// + /// + Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async { + Response response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file ); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { return apiClient.deserialize(_decodeBodyBytes(response), 'ApiResponse') as ApiResponse; } else { return null; } } + } diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart b/samples/client/petstore/dart2/openapi/lib/api/store_api.dart similarity index 71% rename from samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart rename to samples/client/petstore/dart2/openapi/lib/api/store_api.dart index 7475aa4d99..3b48cbbc4a 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart +++ b/samples/client/petstore/dart2/openapi/lib/api/store_api.dart @@ -7,15 +7,15 @@ class StoreApi { StoreApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - /// Delete purchase order by ID + /// Delete purchase order by ID with HTTP info returned /// /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - Future deleteOrder(String orderId) async { - Object postBody = null; + Future deleteOrderWithHttpInfo(String orderId) async { + Object postBody; // verify required params are set if(orderId == null) { - throw new ApiException(400, "Missing required param: orderId"); + throw ApiException(400, "Missing required param: orderId"); } // create path and map variables @@ -28,12 +28,12 @@ class StoreApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -48,19 +48,27 @@ class StoreApi { formParams, contentType, authNames); + return response; + } + /// Delete purchase order by ID + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + Future deleteOrder(String orderId) async { + Response response = await deleteOrderWithHttpInfo(orderId); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } - /// Returns pet inventories by status + + /// Returns pet inventories by status with HTTP info returned /// /// Returns a map of status codes to quantities - Future> getInventory() async { - Object postBody = null; + Future getInventoryWithHttpInfo() async { + Object postBody; // verify required params are set @@ -74,12 +82,12 @@ class StoreApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = ["api_key"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -94,25 +102,33 @@ class StoreApi { formParams, contentType, authNames); + return response; + } + /// Returns pet inventories by status + /// + /// Returns a map of status codes to quantities + Future> getInventory() async { + Response response = await getInventoryWithHttpInfo(); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { - return new Map.from(apiClient.deserialize(_decodeBodyBytes(response), 'Map')); + return Map.from(apiClient.deserialize(_decodeBodyBytes(response), 'Map')); ; } else { return null; } } - /// Find purchase order by ID + + /// Find purchase order by ID with HTTP info returned /// /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - Future getOrderById(int orderId) async { - Object postBody = null; + Future getOrderByIdWithHttpInfo(int orderId) async { + Object postBody; // verify required params are set if(orderId == null) { - throw new ApiException(400, "Missing required param: orderId"); + throw ApiException(400, "Missing required param: orderId"); } // create path and map variables @@ -125,12 +141,12 @@ class StoreApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -145,24 +161,32 @@ class StoreApi { formParams, contentType, authNames); + return response; + } + /// Find purchase order by ID + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + Future getOrderById(int orderId) async { + Response response = await getOrderByIdWithHttpInfo(orderId); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { return apiClient.deserialize(_decodeBodyBytes(response), 'Order') as Order; } else { return null; } } - /// Place an order for a pet + + /// Place an order for a pet with HTTP info returned /// /// - Future placeOrder(Order body) async { + Future placeOrderWithHttpInfo(Order body) async { Object postBody = body; // verify required params are set if(body == null) { - throw new ApiException(400, "Missing required param: body"); + throw ApiException(400, "Missing required param: body"); } // create path and map variables @@ -175,12 +199,12 @@ class StoreApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -195,13 +219,21 @@ class StoreApi { formParams, contentType, authNames); + return response; + } + /// Place an order for a pet + /// + /// + Future placeOrder(Order body) async { + Response response = await placeOrderWithHttpInfo(body); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { return apiClient.deserialize(_decodeBodyBytes(response), 'Order') as Order; } else { return null; } } + } diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart b/samples/client/petstore/dart2/openapi/lib/api/user_api.dart similarity index 72% rename from samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart rename to samples/client/petstore/dart2/openapi/lib/api/user_api.dart index 8f00081a8c..5a35ba394c 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart +++ b/samples/client/petstore/dart2/openapi/lib/api/user_api.dart @@ -7,15 +7,15 @@ class UserApi { UserApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - /// Create user + /// Create user with HTTP info returned /// /// This can only be done by the logged in user. - Future createUser(User body) async { + Future createUserWithHttpInfo(User body) async { Object postBody = body; // verify required params are set if(body == null) { - throw new ApiException(400, "Missing required param: body"); + throw ApiException(400, "Missing required param: body"); } // create path and map variables @@ -28,12 +28,12 @@ class UserApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -48,23 +48,31 @@ class UserApi { formParams, contentType, authNames); + return response; + } + /// Create user + /// + /// This can only be done by the logged in user. + Future createUser(User body) async { + Response response = await createUserWithHttpInfo(body); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } - /// Creates list of users with given input array + + /// Creates list of users with given input array with HTTP info returned /// /// - Future createUsersWithArrayInput(List body) async { + Future createUsersWithArrayInputWithHttpInfo(List body) async { Object postBody = body; // verify required params are set if(body == null) { - throw new ApiException(400, "Missing required param: body"); + throw ApiException(400, "Missing required param: body"); } // create path and map variables @@ -77,12 +85,12 @@ class UserApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -97,23 +105,31 @@ class UserApi { formParams, contentType, authNames); + return response; + } + /// Creates list of users with given input array + /// + /// + Future createUsersWithArrayInput(List body) async { + Response response = await createUsersWithArrayInputWithHttpInfo(body); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } - /// Creates list of users with given input array + + /// Creates list of users with given input array with HTTP info returned /// /// - Future createUsersWithListInput(List body) async { + Future createUsersWithListInputWithHttpInfo(List body) async { Object postBody = body; // verify required params are set if(body == null) { - throw new ApiException(400, "Missing required param: body"); + throw ApiException(400, "Missing required param: body"); } // create path and map variables @@ -126,12 +142,12 @@ class UserApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -146,23 +162,31 @@ class UserApi { formParams, contentType, authNames); + return response; + } + /// Creates list of users with given input array + /// + /// + Future createUsersWithListInput(List body) async { + Response response = await createUsersWithListInputWithHttpInfo(body); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } - /// Delete user + + /// Delete user with HTTP info returned /// /// This can only be done by the logged in user. - Future deleteUser(String username) async { - Object postBody = null; + Future deleteUserWithHttpInfo(String username) async { + Object postBody; // verify required params are set if(username == null) { - throw new ApiException(400, "Missing required param: username"); + throw ApiException(400, "Missing required param: username"); } // create path and map variables @@ -175,12 +199,12 @@ class UserApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -195,23 +219,31 @@ class UserApi { formParams, contentType, authNames); + return response; + } + /// Delete user + /// + /// This can only be done by the logged in user. + Future deleteUser(String username) async { + Response response = await deleteUserWithHttpInfo(username); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } - /// Get user by user name + + /// Get user by user name with HTTP info returned /// /// - Future getUserByName(String username) async { - Object postBody = null; + Future getUserByNameWithHttpInfo(String username) async { + Object postBody; // verify required params are set if(username == null) { - throw new ApiException(400, "Missing required param: username"); + throw ApiException(400, "Missing required param: username"); } // create path and map variables @@ -224,12 +256,12 @@ class UserApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -244,27 +276,35 @@ class UserApi { formParams, contentType, authNames); + return response; + } + /// Get user by user name + /// + /// + Future getUserByName(String username) async { + Response response = await getUserByNameWithHttpInfo(username); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { return apiClient.deserialize(_decodeBodyBytes(response), 'User') as User; } else { return null; } } - /// Logs user into the system + + /// Logs user into the system with HTTP info returned /// /// - Future loginUser(String username, String password) async { - Object postBody = null; + Future loginUserWithHttpInfo(String username, String password) async { + Object postBody; // verify required params are set if(username == null) { - throw new ApiException(400, "Missing required param: username"); + throw ApiException(400, "Missing required param: username"); } if(password == null) { - throw new ApiException(400, "Missing required param: password"); + throw ApiException(400, "Missing required param: password"); } // create path and map variables @@ -279,12 +319,12 @@ class UserApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -299,20 +339,28 @@ class UserApi { formParams, contentType, authNames); + return response; + } + /// Logs user into the system + /// + /// + Future loginUser(String username, String password) async { + Response response = await loginUserWithHttpInfo(username, password); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } else { return null; } } - /// Logs out current logged in user session + + /// Logs out current logged in user session with HTTP info returned /// /// - Future logoutUser() async { - Object postBody = null; + Future logoutUserWithHttpInfo() async { + Object postBody; // verify required params are set @@ -326,12 +374,12 @@ class UserApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -346,26 +394,34 @@ class UserApi { formParams, contentType, authNames); + return response; + } + /// Logs out current logged in user session + /// + /// + Future logoutUser() async { + Response response = await logoutUserWithHttpInfo(); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } - /// Updated user + + /// Updated user with HTTP info returned /// /// This can only be done by the logged in user. - Future updateUser(String username, User body) async { + Future updateUserWithHttpInfo(String username, User body) async { Object postBody = body; // verify required params are set if(username == null) { - throw new ApiException(400, "Missing required param: username"); + throw ApiException(400, "Missing required param: username"); } if(body == null) { - throw new ApiException(400, "Missing required param: body"); + throw ApiException(400, "Missing required param: body"); } // create path and map variables @@ -378,12 +434,12 @@ class UserApi { List contentTypes = []; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json"; List authNames = []; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); + MultipartRequest mp = MultipartRequest(null, null); if(hasFields) postBody = mp; } @@ -398,12 +454,20 @@ class UserApi { formParams, contentType, authNames); + return response; + } + /// Updated user + /// + /// This can only be done by the logged in user. + Future updateUser(String username, User body) async { + Response response = await updateUserWithHttpInfo(username, body); if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, _decodeBodyBytes(response)); + throw ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { } else { return; } } + } diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart b/samples/client/petstore/dart2/openapi/lib/api_client.dart similarity index 75% rename from samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart rename to samples/client/petstore/dart2/openapi/lib/api_client.dart index b99ddeeccb..fcf60c919f 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart +++ b/samples/client/petstore/dart2/openapi/lib/api_client.dart @@ -10,18 +10,18 @@ class QueryParam { class ApiClient { String basePath; - var client = new Client(); + var client = Client(); Map _defaultHeaderMap = {}; Map _authentications = {}; - final _RegList = new RegExp(r'^List<(.*)>$'); - final _RegMap = new RegExp(r'^Map$'); + final _regList = RegExp(r'^List<(.*)>$'); + final _regMap = RegExp(r'^Map$'); - ApiClient({this.basePath: "http://petstore.swagger.io/v2"}) { + ApiClient({this.basePath = "http://petstore.swagger.io/v2"}) { // Setup authentications (key: authentication name, value: authentication). - _authentications['api_key'] = new ApiKeyAuth("header", "api_key"); - _authentications['petstore_auth'] = new OAuth(); + _authentications['api_key'] = ApiKeyAuth("header", "api_key"); + _authentications['petstore_auth'] = OAuth(); } void addDefaultHeader(String key, String value) { @@ -40,36 +40,36 @@ class ApiClient { case 'double': return value is double ? value : double.parse('$value'); case 'ApiResponse': - return new ApiResponse.fromJson(value); + return ApiResponse.fromJson(value); case 'Category': - return new Category.fromJson(value); + return Category.fromJson(value); case 'Order': - return new Order.fromJson(value); + return Order.fromJson(value); case 'Pet': - return new Pet.fromJson(value); + return Pet.fromJson(value); case 'Tag': - return new Tag.fromJson(value); + return Tag.fromJson(value); case 'User': - return new User.fromJson(value); + return User.fromJson(value); default: { Match match; if (value is List && - (match = _RegList.firstMatch(targetType)) != null) { + (match = _regList.firstMatch(targetType)) != null) { var newTargetType = match[1]; return value.map((v) => _deserialize(v, newTargetType)).toList(); } else if (value is Map && - (match = _RegMap.firstMatch(targetType)) != null) { + (match = _regMap.firstMatch(targetType)) != null) { var newTargetType = match[1]; - return new Map.fromIterables(value.keys, + return Map.fromIterables(value.keys, value.values.map((v) => _deserialize(v, newTargetType))); } } } - } catch (e, stack) { - throw new ApiException.withInner(500, 'Exception during deserialization.', e, stack); + } on Exception catch (e, stack) { + throw ApiException.withInner(500, 'Exception during deserialization.', e, stack); } - throw new ApiException(500, 'Could not find a suitable class for deserialization'); + throw ApiException(500, 'Could not find a suitable class for deserialization'); } dynamic deserialize(String json, String targetType) { @@ -78,7 +78,7 @@ class ApiClient { if (targetType == 'String') return json; - var decodedJson = JSON.decode(json); + var decodedJson = jsonDecode(json); return _deserialize(decodedJson, targetType); } @@ -87,7 +87,7 @@ class ApiClient { if (obj == null) { serialized = ''; } else { - serialized = JSON.encode(obj); + serialized = json.encode(obj); } return serialized; } @@ -119,7 +119,7 @@ class ApiClient { headerParams['Content-Type'] = contentType; if(body is MultipartRequest) { - var request = new MultipartRequest(method, Uri.parse(url)); + var request = MultipartRequest(method, Uri.parse(url)); request.fields.addAll(body.fields); request.files.addAll(body.files); request.headers.addAll(body.headers); @@ -148,16 +148,14 @@ class ApiClient { void _updateParamsForAuth(List authNames, List queryParams, Map headerParams) { authNames.forEach((authName) { Authentication auth = _authentications[authName]; - if (auth == null) throw new ArgumentError("Authentication undefined: " + authName); + if (auth == null) throw ArgumentError("Authentication undefined: " + authName); auth.applyToParams(queryParams, headerParams); }); } - void setAccessToken(String accessToken) { - _authentications.forEach((key, auth) { - if (auth is OAuth) { - auth.setAccessToken(accessToken); - } - }); + T getAuthentication(String name) { + var authentication = _authentications[name]; + + return authentication is T ? authentication : null; } } diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart b/samples/client/petstore/dart2/openapi/lib/api_exception.dart similarity index 69% rename from samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart rename to samples/client/petstore/dart2/openapi/lib/api_exception.dart index f188fd125a..668abe2c96 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart +++ b/samples/client/petstore/dart2/openapi/lib/api_exception.dart @@ -2,9 +2,9 @@ part of openapi.api; class ApiException implements Exception { int code = 0; - String message = null; - Exception innerException = null; - StackTrace stackTrace = null; + String message; + Exception innerException; + StackTrace stackTrace; ApiException(this.code, this.message); @@ -17,7 +17,7 @@ class ApiException implements Exception { return "ApiException $code: $message"; } - return "ApiException $code: $message (Inner exception: ${innerException})\n\n" + + return "ApiException $code: $message (Inner exception: $innerException)\n\n" + stackTrace.toString(); } } diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart b/samples/client/petstore/dart2/openapi/lib/api_helper.dart similarity index 86% rename from samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart rename to samples/client/petstore/dart2/openapi/lib/api_helper.dart index 9c1497017e..c57b111ca8 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart +++ b/samples/client/petstore/dart2/openapi/lib/api_helper.dart @@ -11,7 +11,7 @@ Iterable _convertParametersForCollectionFormat( if (name == null || name.isEmpty || value == null) return params; if (value is! List) { - params.add(new QueryParam(name, parameterToString(value))); + params.add(QueryParam(name, parameterToString(value))); return params; } @@ -23,12 +23,12 @@ Iterable _convertParametersForCollectionFormat( : collectionFormat; // default: csv if (collectionFormat == "multi") { - return values.map((v) => new QueryParam(name, parameterToString(v))); + return values.map((v) => QueryParam(name, parameterToString(v))); } String delimiter = _delimiters[collectionFormat] ?? ","; - params.add(new QueryParam(name, values.map((v) => parameterToString(v)).join(delimiter))); + params.add(QueryParam(name, values.map((v) => parameterToString(v)).join(delimiter))); return params; } diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart b/samples/client/petstore/dart2/openapi/lib/auth/api_key_auth.dart similarity index 74% rename from samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart rename to samples/client/petstore/dart2/openapi/lib/auth/api_key_auth.dart index f9617f7ae4..8384f0516c 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart +++ b/samples/client/petstore/dart2/openapi/lib/auth/api_key_auth.dart @@ -4,22 +4,24 @@ class ApiKeyAuth implements Authentication { final String location; final String paramName; - String apiKey; + String _apiKey; String apiKeyPrefix; + set apiKey(String key) => _apiKey = key; + ApiKeyAuth(this.location, this.paramName); @override void applyToParams(List queryParams, Map headerParams) { String value; if (apiKeyPrefix != null) { - value = '$apiKeyPrefix $apiKey'; + value = '$apiKeyPrefix $_apiKey'; } else { - value = apiKey; + value = _apiKey; } if (location == 'query' && value != null) { - queryParams.add(new QueryParam(paramName, value)); + queryParams.add(QueryParam(paramName, value)); } else if (location == 'header' && value != null) { headerParams[paramName] = value; } diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart b/samples/client/petstore/dart2/openapi/lib/auth/authentication.dart similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart rename to samples/client/petstore/dart2/openapi/lib/auth/authentication.dart diff --git a/samples/client/petstore/dart2/openapi/lib/auth/http_basic_auth.dart b/samples/client/petstore/dart2/openapi/lib/auth/http_basic_auth.dart new file mode 100644 index 0000000000..da931fa263 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/lib/auth/http_basic_auth.dart @@ -0,0 +1,16 @@ +part of openapi.api; + +class HttpBasicAuth implements Authentication { + + String _username; + String _password; + + @override + void applyToParams(List queryParams, Map headerParams) { + String str = (_username == null ? "" : _username) + ":" + (_password == null ? "" : _password); + headerParams["Authorization"] = "Basic " + base64.encode(utf8.encode(str)); + } + + set username(String username) => _username = username; + set password(String password) => _password = password; +} diff --git a/samples/client/petstore/dart2/openapi/lib/auth/oauth.dart b/samples/client/petstore/dart2/openapi/lib/auth/oauth.dart new file mode 100644 index 0000000000..230471e44f --- /dev/null +++ b/samples/client/petstore/dart2/openapi/lib/auth/oauth.dart @@ -0,0 +1,16 @@ +part of openapi.api; + +class OAuth implements Authentication { + String _accessToken; + + OAuth({String accessToken}) : _accessToken = accessToken; + + @override + void applyToParams(List queryParams, Map headerParams) { + if (_accessToken != null) { + headerParams["Authorization"] = "Bearer $_accessToken"; + } + } + + set accessToken(String accessToken) => _accessToken = accessToken; +} diff --git a/samples/client/petstore/dart2/openapi/lib/model/api_response.dart b/samples/client/petstore/dart2/openapi/lib/model/api_response.dart new file mode 100644 index 0000000000..c5b6886be8 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/lib/model/api_response.dart @@ -0,0 +1,58 @@ +part of openapi.api; + +class ApiResponse { + + int code = null; + + String type = null; + + String message = null; + ApiResponse(); + + @override + String toString() { + return 'ApiResponse[code=$code, type=$type, message=$message, ]'; + } + + ApiResponse.fromJson(Map json) { + if (json == null) return; + code = json['code']; + type = json['type']; + message = json['message']; + } + + Map toJson() { + Map json = {}; + if (code != null) + json['code'] = code; + if (type != null) + json['type'] = type; + if (message != null) + json['message'] = message; + return json; + } + + static List listFromJson(List json) { + return json == null ? List() : json.map((value) => ApiResponse.fromJson(value)).toList(); + } + + static Map mapFromJson(Map json) { + var map = Map(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) => map[key] = ApiResponse.fromJson(value)); + } + return map; + } + + // maps a json object with a list of ApiResponse-objects as value to a dart map + static Map> mapListFromJson(Map json) { + var map = Map>(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) { + map[key] = ApiResponse.listFromJson(value); + }); + } + return map; + } +} + diff --git a/samples/client/petstore/dart2/openapi/lib/model/category.dart b/samples/client/petstore/dart2/openapi/lib/model/category.dart new file mode 100644 index 0000000000..686ad33cac --- /dev/null +++ b/samples/client/petstore/dart2/openapi/lib/model/category.dart @@ -0,0 +1,53 @@ +part of openapi.api; + +class Category { + + int id = null; + + String name = null; + Category(); + + @override + String toString() { + return 'Category[id=$id, name=$name, ]'; + } + + Category.fromJson(Map json) { + if (json == null) return; + id = json['id']; + name = json['name']; + } + + Map toJson() { + Map json = {}; + if (id != null) + json['id'] = id; + if (name != null) + json['name'] = name; + return json; + } + + static List listFromJson(List json) { + return json == null ? List() : json.map((value) => Category.fromJson(value)).toList(); + } + + static Map mapFromJson(Map json) { + var map = Map(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) => map[key] = Category.fromJson(value)); + } + return map; + } + + // maps a json object with a list of Category-objects as value to a dart map + static Map> mapListFromJson(Map json) { + var map = Map>(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) { + map[key] = Category.listFromJson(value); + }); + } + return map; + } +} + diff --git a/samples/client/petstore/dart2/openapi/lib/model/order.dart b/samples/client/petstore/dart2/openapi/lib/model/order.dart new file mode 100644 index 0000000000..34370b21e3 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/lib/model/order.dart @@ -0,0 +1,76 @@ +part of openapi.api; + +class Order { + + int id = null; + + int petId = null; + + int quantity = null; + + DateTime shipDate = null; + /* Order Status */ + String status = null; + //enum statusEnum { placed, approved, delivered, };{ + + bool complete = false; + Order(); + + @override + String toString() { + return 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete, ]'; + } + + Order.fromJson(Map json) { + if (json == null) return; + id = json['id']; + petId = json['petId']; + quantity = json['quantity']; + shipDate = (json['shipDate'] == null) ? + null : + DateTime.parse(json['shipDate']); + status = json['status']; + complete = json['complete']; + } + + Map toJson() { + Map json = {}; + if (id != null) + json['id'] = id; + if (petId != null) + json['petId'] = petId; + if (quantity != null) + json['quantity'] = quantity; + if (shipDate != null) + json['shipDate'] = shipDate == null ? null : shipDate.toUtc().toIso8601String(); + if (status != null) + json['status'] = status; + if (complete != null) + json['complete'] = complete; + return json; + } + + static List listFromJson(List json) { + return json == null ? List() : json.map((value) => Order.fromJson(value)).toList(); + } + + static Map mapFromJson(Map json) { + var map = Map(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) => map[key] = Order.fromJson(value)); + } + return map; + } + + // maps a json object with a list of Order-objects as value to a dart map + static Map> mapListFromJson(Map json) { + var map = Map>(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) { + map[key] = Order.listFromJson(value); + }); + } + return map; + } +} + diff --git a/samples/client/petstore/dart2/openapi/lib/model/pet.dart b/samples/client/petstore/dart2/openapi/lib/model/pet.dart new file mode 100644 index 0000000000..92a096c402 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/lib/model/pet.dart @@ -0,0 +1,80 @@ +part of openapi.api; + +class Pet { + + int id = null; + + Category category = null; + + String name = null; + + List photoUrls = []; + + List tags = []; + /* pet status in the store */ + String status = null; + //enum statusEnum { available, pending, sold, };{ + Pet(); + + @override + String toString() { + return 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status, ]'; + } + + Pet.fromJson(Map json) { + if (json == null) return; + id = json['id']; + category = (json['category'] == null) ? + null : + Category.fromJson(json['category']); + name = json['name']; + photoUrls = (json['photoUrls'] == null) ? + null : + (json['photoUrls'] as List).cast(); + tags = (json['tags'] == null) ? + null : + Tag.listFromJson(json['tags']); + status = json['status']; + } + + Map toJson() { + Map json = {}; + if (id != null) + json['id'] = id; + if (category != null) + json['category'] = category; + if (name != null) + json['name'] = name; + if (photoUrls != null) + json['photoUrls'] = photoUrls; + if (tags != null) + json['tags'] = tags; + if (status != null) + json['status'] = status; + return json; + } + + static List listFromJson(List json) { + return json == null ? List() : json.map((value) => Pet.fromJson(value)).toList(); + } + + static Map mapFromJson(Map json) { + var map = Map(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) => map[key] = Pet.fromJson(value)); + } + return map; + } + + // maps a json object with a list of Pet-objects as value to a dart map + static Map> mapListFromJson(Map json) { + var map = Map>(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) { + map[key] = Pet.listFromJson(value); + }); + } + return map; + } +} + diff --git a/samples/client/petstore/dart2/openapi/lib/model/tag.dart b/samples/client/petstore/dart2/openapi/lib/model/tag.dart new file mode 100644 index 0000000000..5b758c01b7 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/lib/model/tag.dart @@ -0,0 +1,53 @@ +part of openapi.api; + +class Tag { + + int id = null; + + String name = null; + Tag(); + + @override + String toString() { + return 'Tag[id=$id, name=$name, ]'; + } + + Tag.fromJson(Map json) { + if (json == null) return; + id = json['id']; + name = json['name']; + } + + Map toJson() { + Map json = {}; + if (id != null) + json['id'] = id; + if (name != null) + json['name'] = name; + return json; + } + + static List listFromJson(List json) { + return json == null ? List() : json.map((value) => Tag.fromJson(value)).toList(); + } + + static Map mapFromJson(Map json) { + var map = Map(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) => map[key] = Tag.fromJson(value)); + } + return map; + } + + // maps a json object with a list of Tag-objects as value to a dart map + static Map> mapListFromJson(Map json) { + var map = Map>(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) { + map[key] = Tag.listFromJson(value); + }); + } + return map; + } +} + diff --git a/samples/client/petstore/dart2/openapi/lib/model/user.dart b/samples/client/petstore/dart2/openapi/lib/model/user.dart new file mode 100644 index 0000000000..685ffadb4e --- /dev/null +++ b/samples/client/petstore/dart2/openapi/lib/model/user.dart @@ -0,0 +1,83 @@ +part of openapi.api; + +class User { + + int id = null; + + String username = null; + + String firstName = null; + + String lastName = null; + + String email = null; + + String password = null; + + String phone = null; + /* User Status */ + int userStatus = null; + User(); + + @override + String toString() { + return 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus, ]'; + } + + User.fromJson(Map json) { + if (json == null) return; + id = json['id']; + username = json['username']; + firstName = json['firstName']; + lastName = json['lastName']; + email = json['email']; + password = json['password']; + phone = json['phone']; + userStatus = json['userStatus']; + } + + Map toJson() { + Map json = {}; + if (id != null) + json['id'] = id; + if (username != null) + json['username'] = username; + if (firstName != null) + json['firstName'] = firstName; + if (lastName != null) + json['lastName'] = lastName; + if (email != null) + json['email'] = email; + if (password != null) + json['password'] = password; + if (phone != null) + json['phone'] = phone; + if (userStatus != null) + json['userStatus'] = userStatus; + return json; + } + + static List listFromJson(List json) { + return json == null ? List() : json.map((value) => User.fromJson(value)).toList(); + } + + static Map mapFromJson(Map json) { + var map = Map(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) => map[key] = User.fromJson(value)); + } + return map; + } + + // maps a json object with a list of User-objects as value to a dart map + static Map> mapListFromJson(Map json) { + var map = Map>(); + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic value) { + map[key] = User.listFromJson(value); + }); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml b/samples/client/petstore/dart2/openapi/pubspec.yaml similarity index 62% rename from samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml rename to samples/client/petstore/dart2/openapi/pubspec.yaml index b63f835e89..be7bf663b8 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml +++ b/samples/client/petstore/dart2/openapi/pubspec.yaml @@ -1,7 +1,9 @@ name: openapi version: 1.0.0 description: OpenAPI API client +environment: + sdk: '>=2.0.0 <3.0.0' dependencies: - http: '>=0.11.1 <0.13.0' + http: '>=0.12.0 <0.13.0' dev_dependencies: test: ^1.3.0 diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/test/api_response_test.dart b/samples/client/petstore/dart2/openapi/test/api_response_test.dart similarity index 92% rename from samples/client/petstore/dart/flutter_petstore/swagger/test/api_response_test.dart rename to samples/client/petstore/dart2/openapi/test/api_response_test.dart index afd92edde0..6c2882a062 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/test/api_response_test.dart +++ b/samples/client/petstore/dart2/openapi/test/api_response_test.dart @@ -3,7 +3,7 @@ import 'package:test/test.dart'; // tests for ApiResponse void main() { - var instance = ApiResponse(); + var instance = new ApiResponse(); group('test ApiResponse', () { // int code (default value: null) diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/test/category_test.dart b/samples/client/petstore/dart2/openapi/test/category_test.dart similarity index 91% rename from samples/client/petstore/dart/flutter_petstore/swagger/test/category_test.dart rename to samples/client/petstore/dart2/openapi/test/category_test.dart index ed39fa7ed8..277bdfb709 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/test/category_test.dart +++ b/samples/client/petstore/dart2/openapi/test/category_test.dart @@ -3,7 +3,7 @@ import 'package:test/test.dart'; // tests for Category void main() { - var instance = Category(); + var instance = new Category(); group('test Category', () { // int id (default value: null) diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/test/order_test.dart b/samples/client/petstore/dart2/openapi/test/order_test.dart similarity index 96% rename from samples/client/petstore/dart/flutter_petstore/swagger/test/order_test.dart rename to samples/client/petstore/dart2/openapi/test/order_test.dart index 6102e1e5d0..0c3178ac69 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/test/order_test.dart +++ b/samples/client/petstore/dart2/openapi/test/order_test.dart @@ -3,7 +3,7 @@ import 'package:test/test.dart'; // tests for Order void main() { - var instance = Order(); + var instance = new Order(); group('test Order', () { // int id (default value: null) diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/test/pet_api_test.dart b/samples/client/petstore/dart2/openapi/test/pet_api_test.dart similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/test/pet_api_test.dart rename to samples/client/petstore/dart2/openapi/test/pet_api_test.dart diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/test/pet_test.dart b/samples/client/petstore/dart2/openapi/test/pet_test.dart similarity index 96% rename from samples/client/petstore/dart/flutter_petstore/swagger/test/pet_test.dart rename to samples/client/petstore/dart2/openapi/test/pet_test.dart index 83480bd785..acfb87a3fb 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/test/pet_test.dart +++ b/samples/client/petstore/dart2/openapi/test/pet_test.dart @@ -3,7 +3,7 @@ import 'package:test/test.dart'; // tests for Pet void main() { - var instance = Pet(); + var instance = new Pet(); group('test Pet', () { // int id (default value: null) diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/test/store_api_test.dart b/samples/client/petstore/dart2/openapi/test/store_api_test.dart similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/test/store_api_test.dart rename to samples/client/petstore/dart2/openapi/test/store_api_test.dart diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/test/tag_test.dart b/samples/client/petstore/dart2/openapi/test/tag_test.dart similarity index 92% rename from samples/client/petstore/dart/flutter_petstore/swagger/test/tag_test.dart rename to samples/client/petstore/dart2/openapi/test/tag_test.dart index 3333ea6d31..4b133ff675 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/test/tag_test.dart +++ b/samples/client/petstore/dart2/openapi/test/tag_test.dart @@ -3,7 +3,7 @@ import 'package:test/test.dart'; // tests for Tag void main() { - var instance = Tag(); + var instance = new Tag(); group('test Tag', () { // int id (default value: null) diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/test/user_api_test.dart b/samples/client/petstore/dart2/openapi/test/user_api_test.dart similarity index 100% rename from samples/client/petstore/dart/flutter_petstore/swagger/test/user_api_test.dart rename to samples/client/petstore/dart2/openapi/test/user_api_test.dart diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/test/user_test.dart b/samples/client/petstore/dart2/openapi/test/user_test.dart similarity index 97% rename from samples/client/petstore/dart/flutter_petstore/swagger/test/user_test.dart rename to samples/client/petstore/dart2/openapi/test/user_test.dart index 35e8eed375..c0e542757f 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/test/user_test.dart +++ b/samples/client/petstore/dart2/openapi/test/user_test.dart @@ -3,7 +3,7 @@ import 'package:test/test.dart'; // tests for User void main() { - var instance = User(); + var instance = new User(); group('test User', () { // int id (default value: null) diff --git a/samples/client/petstore/elm-0.18/.openapi-generator/VERSION b/samples/client/petstore/elm-0.18/.openapi-generator/VERSION index 479c313e87..c3a2c7076f 100644 --- a/samples/client/petstore/elm-0.18/.openapi-generator/VERSION +++ b/samples/client/petstore/elm-0.18/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm b/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm index bb1003f9a0..1e5d44b794 100644 --- a/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm +++ b/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm @@ -10,7 +10,7 @@ -} -module Data.ApiResponse exposing (ApiResponse, decoder, encode) +module Data.ApiResponse exposing (ApiResponse, decoder, encode, toString) import Dict exposing (Dict) import Json.Decode as Decode exposing (Decoder) @@ -21,9 +21,9 @@ import Json.Encode as Encode {-| Describes the result of uploading an image resource -} type alias ApiResponse = - { code : Maybe (Int) - , type_ : Maybe (String) - , message : Maybe (String) + { code : Maybe Int + , type_ : Maybe String + , message : Maybe String } @@ -35,14 +35,15 @@ decoder = |> optional "message" (Decode.nullable Decode.string) Nothing - encode : ApiResponse -> Encode.Value encode model = Encode.object [ ( "code", Maybe.withDefault Encode.null (Maybe.map Encode.int model.code) ) , ( "type", Maybe.withDefault Encode.null (Maybe.map Encode.string model.type_) ) , ( "message", Maybe.withDefault Encode.null (Maybe.map Encode.string model.message) ) - ] +toString : ApiResponse -> String +toString = + Encode.encode 0 << encode diff --git a/samples/client/petstore/elm-0.18/src/Data/Category.elm b/samples/client/petstore/elm-0.18/src/Data/Category.elm index 127436ffc0..f8e5a7fb31 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Category.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Category.elm @@ -10,7 +10,7 @@ -} -module Data.Category exposing (Category, decoder, encode) +module Data.Category exposing (Category, decoder, encode, toString) import Dict exposing (Dict) import Json.Decode as Decode exposing (Decoder) @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A category for a pet -} type alias Category = - { id : Maybe (Int) - , name : Maybe (String) + { id : Maybe Int + , name : Maybe String } @@ -33,13 +33,14 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing - encode : Category -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) - ] +toString : Category -> String +toString = + Encode.encode 0 << encode diff --git a/samples/client/petstore/elm-0.18/src/Data/Order_.elm b/samples/client/petstore/elm-0.18/src/Data/Order_.elm index e4b1474154..0d8e878109 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Order_.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Order_.elm @@ -10,7 +10,7 @@ -} -module Data.Order_ exposing (Order_, Status(..), decoder, encode) +module Data.Order_ exposing (Order_, Status(..), decoder, encode, toString) import DateTime exposing (DateTime) import Dict exposing (Dict) @@ -22,12 +22,12 @@ import Json.Encode as Encode {-| An order for a pets from the pet store -} type alias Order_ = - { id : Maybe (Int) - , petId : Maybe (Int) - , quantity : Maybe (Int) - , shipDate : Maybe (DateTime) - , status : Maybe (Status) - , complete : Maybe (Bool) + { id : Maybe Int + , petId : Maybe Int + , quantity : Maybe Int + , shipDate : Maybe DateTime + , status : Maybe Status + , complete : Maybe Bool } @@ -37,7 +37,6 @@ type Status | Delivered - decoder : Decoder Order_ decoder = decode Order_ @@ -49,7 +48,6 @@ decoder = |> optional "complete" (Decode.nullable Decode.bool) (Just False) - encode : Order_ -> Encode.Value encode model = Encode.object @@ -59,10 +57,13 @@ encode model = , ( "shipDate", Maybe.withDefault Encode.null (Maybe.map DateTime.encode model.shipDate) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) , ( "complete", Maybe.withDefault Encode.null (Maybe.map Encode.bool model.complete) ) - ] +toString : Order_ -> String +toString = + Encode.encode 0 << encode + statusDecoder : Decoder Status statusDecoder = @@ -84,7 +85,6 @@ statusDecoder = ) - encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -96,6 +96,3 @@ encodeStatus model = Delivered -> Encode.string "delivered" - - - diff --git a/samples/client/petstore/elm-0.18/src/Data/Pet.elm b/samples/client/petstore/elm-0.18/src/Data/Pet.elm index 7ab7b76a4f..50f39279e1 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Pet.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Pet.elm @@ -10,7 +10,7 @@ -} -module Data.Pet exposing (Pet, Status(..), decoder, encode) +module Data.Pet exposing (Pet, Status(..), decoder, encode, toString) import Data.Category as Category exposing (Category) import Data.Tag as Tag exposing (Tag) @@ -23,12 +23,12 @@ import Json.Encode as Encode {-| A pet for sale in the pet store -} type alias Pet = - { id : Maybe (Int) - , category : Maybe (Category) + { id : Maybe Int + , category : Maybe Category , name : String - , photoUrls : (List String) - , tags : Maybe ((List Tag)) - , status : Maybe (Status) + , photoUrls : List String + , tags : Maybe (List Tag) + , status : Maybe Status } @@ -38,7 +38,6 @@ type Status | Sold - decoder : Decoder Pet decoder = decode Pet @@ -50,7 +49,6 @@ decoder = |> optional "status" (Decode.nullable statusDecoder) Nothing - encode : Pet -> Encode.Value encode model = Encode.object @@ -60,10 +58,13 @@ encode model = , ( "photoUrls", (Encode.list << List.map Encode.string) model.photoUrls ) , ( "tags", Maybe.withDefault Encode.null (Maybe.map (Encode.list << List.map Tag.encode) model.tags) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) - ] +toString : Pet -> String +toString = + Encode.encode 0 << encode + statusDecoder : Decoder Status statusDecoder = @@ -85,7 +86,6 @@ statusDecoder = ) - encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -97,6 +97,3 @@ encodeStatus model = Sold -> Encode.string "sold" - - - diff --git a/samples/client/petstore/elm-0.18/src/Data/Tag.elm b/samples/client/petstore/elm-0.18/src/Data/Tag.elm index d1344af5de..81b9407409 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Tag.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Tag.elm @@ -10,7 +10,7 @@ -} -module Data.Tag exposing (Tag, decoder, encode) +module Data.Tag exposing (Tag, decoder, encode, toString) import Dict exposing (Dict) import Json.Decode as Decode exposing (Decoder) @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A tag for a pet -} type alias Tag = - { id : Maybe (Int) - , name : Maybe (String) + { id : Maybe Int + , name : Maybe String } @@ -33,13 +33,14 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing - encode : Tag -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) - ] +toString : Tag -> String +toString = + Encode.encode 0 << encode diff --git a/samples/client/petstore/elm-0.18/src/Data/User.elm b/samples/client/petstore/elm-0.18/src/Data/User.elm index 4b1870d9ca..5b27dc8e18 100644 --- a/samples/client/petstore/elm-0.18/src/Data/User.elm +++ b/samples/client/petstore/elm-0.18/src/Data/User.elm @@ -10,7 +10,7 @@ -} -module Data.User exposing (User, decoder, encode) +module Data.User exposing (User, decoder, encode, toString) import Dict exposing (Dict) import Json.Decode as Decode exposing (Decoder) @@ -21,14 +21,14 @@ import Json.Encode as Encode {-| A User who is purchasing from the pet store -} type alias User = - { id : Maybe (Int) - , username : Maybe (String) - , firstName : Maybe (String) - , lastName : Maybe (String) - , email : Maybe (String) - , password : Maybe (String) - , phone : Maybe (String) - , userStatus : Maybe (Int) + { id : Maybe Int + , username : Maybe String + , firstName : Maybe String + , lastName : Maybe String + , email : Maybe String + , password : Maybe String + , phone : Maybe String + , userStatus : Maybe Int } @@ -45,7 +45,6 @@ decoder = |> optional "userStatus" (Decode.nullable Decode.int) Nothing - encode : User -> Encode.Value encode model = Encode.object @@ -57,7 +56,9 @@ encode model = , ( "password", Maybe.withDefault Encode.null (Maybe.map Encode.string model.password) ) , ( "phone", Maybe.withDefault Encode.null (Maybe.map Encode.string model.phone) ) , ( "userStatus", Maybe.withDefault Encode.null (Maybe.map Encode.int model.userStatus) ) - ] +toString : User -> String +toString = + Encode.encode 0 << encode diff --git a/samples/client/petstore/elm-0.18/src/DateTime.elm b/samples/client/petstore/elm-0.18/src/DateTime.elm index 6a20f0482a..7e07312468 100644 --- a/samples/client/petstore/elm-0.18/src/DateTime.elm +++ b/samples/client/petstore/elm-0.18/src/DateTime.elm @@ -34,4 +34,4 @@ decodeIsoString str = toString : DateTime -> String toString = - toIsoString \ No newline at end of file + toIsoString diff --git a/samples/client/petstore/elm-0.18/src/Request/Pet.elm b/samples/client/petstore/elm-0.18/src/Request/Pet.elm index 5b1e3444d3..a1117a57d5 100644 --- a/samples/client/petstore/elm-0.18/src/Request/Pet.elm +++ b/samples/client/petstore/elm-0.18/src/Request/Pet.elm @@ -12,8 +12,8 @@ module Request.Pet exposing (addPet, deletePet, findPetsByStatus, findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile) -import Data.Pet as Pet exposing (Pet) import Data.ApiResponse as ApiResponse exposing (ApiResponse) +import Data.Pet as Pet exposing (Pet) import Dict import Http import Json.Decode as Decode @@ -40,7 +40,7 @@ addPet model = deletePet : Int -> Http.Request () deletePet petId = { method = "DELETE" - , url = basePath ++ "/pet/" ++ toString petId + , url = basePath ++ "/pet/" ++ toString petId , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -85,7 +85,7 @@ findPetsByTags = getPetById : Int -> Http.Request Pet getPetById petId = { method = "GET" - , url = basePath ++ "/pet/" ++ toString petId + , url = basePath ++ "/pet/" ++ toString petId , headers = [] , body = Http.emptyBody , expect = Http.expectJson Pet.decoder @@ -111,7 +111,7 @@ updatePet model = updatePetWithForm : Int -> Http.Request () updatePetWithForm petId = { method = "POST" - , url = basePath ++ "/pet/" ++ toString petId + , url = basePath ++ "/pet/" ++ toString petId , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -124,7 +124,7 @@ updatePetWithForm petId = uploadFile : Int -> Http.Request ApiResponse uploadFile petId = { method = "POST" - , url = basePath ++ "/pet/" ++ toString petId ++ "/uploadImage" + , url = basePath ++ "/pet/" ++ toString petId ++ "/uploadImage" , headers = [] , body = Http.emptyBody , expect = Http.expectJson ApiResponse.decoder diff --git a/samples/client/petstore/elm-0.18/src/Request/Store.elm b/samples/client/petstore/elm-0.18/src/Request/Store.elm index d8f70f4177..2f44d25c42 100644 --- a/samples/client/petstore/elm-0.18/src/Request/Store.elm +++ b/samples/client/petstore/elm-0.18/src/Request/Store.elm @@ -28,7 +28,7 @@ basePath = deleteOrder : String -> Http.Request () deleteOrder orderId = { method = "DELETE" - , url = basePath ++ "/store/order/" ++ orderId + , url = basePath ++ "/store/order/" ++ orderId , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -58,7 +58,7 @@ getInventory = getOrderById : Int -> Http.Request Order_ getOrderById orderId = { method = "GET" - , url = basePath ++ "/store/order/" ++ toString orderId + , url = basePath ++ "/store/order/" ++ toString orderId , headers = [] , body = Http.emptyBody , expect = Http.expectJson Order_.decoder diff --git a/samples/client/petstore/elm-0.18/src/Request/User.elm b/samples/client/petstore/elm-0.18/src/Request/User.elm index ce6b79ca63..a7d142cfc0 100644 --- a/samples/client/petstore/elm-0.18/src/Request/User.elm +++ b/samples/client/petstore/elm-0.18/src/Request/User.elm @@ -69,7 +69,7 @@ createUsersWithListInput model = deleteUser : String -> Http.Request () deleteUser username = { method = "DELETE" - , url = basePath ++ "/user/" ++ username + , url = basePath ++ "/user/" ++ username , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -82,7 +82,7 @@ deleteUser username = getUserByName : String -> Http.Request User getUserByName username = { method = "GET" - , url = basePath ++ "/user/" ++ username + , url = basePath ++ "/user/" ++ username , headers = [] , body = Http.emptyBody , expect = Http.expectJson User.decoder @@ -123,7 +123,7 @@ logoutUser = updateUser : String -> User -> Http.Request () updateUser username model = { method = "PUT" - , url = basePath ++ "/user/" ++ username + , url = basePath ++ "/user/" ++ username , headers = [] , body = Http.jsonBody <| User.encode model , expect = Http.expectStringResponse (\_ -> Ok ()) diff --git a/samples/client/petstore/elm/.openapi-generator/VERSION b/samples/client/petstore/elm/.openapi-generator/VERSION index 479c313e87..c3a2c7076f 100644 --- a/samples/client/petstore/elm/.openapi-generator/VERSION +++ b/samples/client/petstore/elm/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elm/src/Data/ApiResponse.elm b/samples/client/petstore/elm/src/Data/ApiResponse.elm index 3559c4f3fe..08199cab32 100644 --- a/samples/client/petstore/elm/src/Data/ApiResponse.elm +++ b/samples/client/petstore/elm/src/Data/ApiResponse.elm @@ -10,7 +10,7 @@ -} -module Data.ApiResponse exposing (ApiResponse, decoder, encode) +module Data.ApiResponse exposing (ApiResponse, decoder, encode, toString) import Dict exposing (Dict) import Json.Decode as Decode exposing (Decoder) @@ -21,9 +21,9 @@ import Json.Encode as Encode {-| Describes the result of uploading an image resource -} type alias ApiResponse = - { code : Maybe (Int) - , type_ : Maybe (String) - , message : Maybe (String) + { code : Maybe Int + , type_ : Maybe String + , message : Maybe String } @@ -35,14 +35,15 @@ decoder = |> optional "message" (Decode.nullable Decode.string) Nothing - encode : ApiResponse -> Encode.Value encode model = Encode.object [ ( "code", Maybe.withDefault Encode.null (Maybe.map Encode.int model.code) ) , ( "type", Maybe.withDefault Encode.null (Maybe.map Encode.string model.type_) ) , ( "message", Maybe.withDefault Encode.null (Maybe.map Encode.string model.message) ) - ] +toString : ApiResponse -> String +toString = + Encode.encode 0 << encode diff --git a/samples/client/petstore/elm/src/Data/Category.elm b/samples/client/petstore/elm/src/Data/Category.elm index 9a5803626d..cd1778b870 100644 --- a/samples/client/petstore/elm/src/Data/Category.elm +++ b/samples/client/petstore/elm/src/Data/Category.elm @@ -10,7 +10,7 @@ -} -module Data.Category exposing (Category, decoder, encode) +module Data.Category exposing (Category, decoder, encode, toString) import Dict exposing (Dict) import Json.Decode as Decode exposing (Decoder) @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A category for a pet -} type alias Category = - { id : Maybe (Int) - , name : Maybe (String) + { id : Maybe Int + , name : Maybe String } @@ -33,13 +33,14 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing - encode : Category -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) - ] +toString : Category -> String +toString = + Encode.encode 0 << encode diff --git a/samples/client/petstore/elm/src/Data/Order_.elm b/samples/client/petstore/elm/src/Data/Order_.elm index cd304947c5..aff082a6f6 100644 --- a/samples/client/petstore/elm/src/Data/Order_.elm +++ b/samples/client/petstore/elm/src/Data/Order_.elm @@ -10,7 +10,7 @@ -} -module Data.Order_ exposing (Order_, Status(..), decoder, encode) +module Data.Order_ exposing (Order_, Status(..), decoder, encode, toString) import DateTime exposing (DateTime) import Dict exposing (Dict) @@ -22,12 +22,12 @@ import Json.Encode as Encode {-| An order for a pets from the pet store -} type alias Order_ = - { id : Maybe (Int) - , petId : Maybe (Int) - , quantity : Maybe (Int) - , shipDate : Maybe (DateTime) - , status : Maybe (Status) - , complete : Maybe (Bool) + { id : Maybe Int + , petId : Maybe Int + , quantity : Maybe Int + , shipDate : Maybe DateTime + , status : Maybe Status + , complete : Maybe Bool } @@ -37,7 +37,6 @@ type Status | Delivered - decoder : Decoder Order_ decoder = Decode.succeed Order_ @@ -49,7 +48,6 @@ decoder = |> optional "complete" (Decode.nullable Decode.bool) (Just False) - encode : Order_ -> Encode.Value encode model = Encode.object @@ -59,10 +57,13 @@ encode model = , ( "shipDate", Maybe.withDefault Encode.null (Maybe.map DateTime.encode model.shipDate) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) , ( "complete", Maybe.withDefault Encode.null (Maybe.map Encode.bool model.complete) ) - ] +toString : Order_ -> String +toString = + Encode.encode 0 << encode + statusDecoder : Decoder Status statusDecoder = @@ -84,7 +85,6 @@ statusDecoder = ) - encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -96,6 +96,3 @@ encodeStatus model = Delivered -> Encode.string "delivered" - - - diff --git a/samples/client/petstore/elm/src/Data/Pet.elm b/samples/client/petstore/elm/src/Data/Pet.elm index e2518c95b0..f024b79c80 100644 --- a/samples/client/petstore/elm/src/Data/Pet.elm +++ b/samples/client/petstore/elm/src/Data/Pet.elm @@ -10,7 +10,7 @@ -} -module Data.Pet exposing (Pet, Status(..), decoder, encode) +module Data.Pet exposing (Pet, Status(..), decoder, encode, toString) import Data.Category as Category exposing (Category) import Data.Tag as Tag exposing (Tag) @@ -23,12 +23,12 @@ import Json.Encode as Encode {-| A pet for sale in the pet store -} type alias Pet = - { id : Maybe (Int) - , category : Maybe (Category) + { id : Maybe Int + , category : Maybe Category , name : String - , photoUrls : (List String) - , tags : Maybe ((List Tag)) - , status : Maybe (Status) + , photoUrls : List String + , tags : Maybe (List Tag) + , status : Maybe Status } @@ -38,7 +38,6 @@ type Status | Sold - decoder : Decoder Pet decoder = Decode.succeed Pet @@ -50,20 +49,22 @@ decoder = |> optional "status" (Decode.nullable statusDecoder) Nothing - encode : Pet -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "category", Maybe.withDefault Encode.null (Maybe.map Category.encode model.category) ) , ( "name", Encode.string model.name ) - , ( "photoUrls", (Encode.list Encode.string) model.photoUrls ) + , ( "photoUrls", Encode.list Encode.string model.photoUrls ) , ( "tags", Maybe.withDefault Encode.null (Maybe.map (Encode.list Tag.encode) model.tags) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) - ] +toString : Pet -> String +toString = + Encode.encode 0 << encode + statusDecoder : Decoder Status statusDecoder = @@ -85,7 +86,6 @@ statusDecoder = ) - encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -97,6 +97,3 @@ encodeStatus model = Sold -> Encode.string "sold" - - - diff --git a/samples/client/petstore/elm/src/Data/Tag.elm b/samples/client/petstore/elm/src/Data/Tag.elm index 16118b9b80..052a4197b2 100644 --- a/samples/client/petstore/elm/src/Data/Tag.elm +++ b/samples/client/petstore/elm/src/Data/Tag.elm @@ -10,7 +10,7 @@ -} -module Data.Tag exposing (Tag, decoder, encode) +module Data.Tag exposing (Tag, decoder, encode, toString) import Dict exposing (Dict) import Json.Decode as Decode exposing (Decoder) @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A tag for a pet -} type alias Tag = - { id : Maybe (Int) - , name : Maybe (String) + { id : Maybe Int + , name : Maybe String } @@ -33,13 +33,14 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing - encode : Tag -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) - ] +toString : Tag -> String +toString = + Encode.encode 0 << encode diff --git a/samples/client/petstore/elm/src/Data/User.elm b/samples/client/petstore/elm/src/Data/User.elm index 0b0cba12cc..c4b2e3db9c 100644 --- a/samples/client/petstore/elm/src/Data/User.elm +++ b/samples/client/petstore/elm/src/Data/User.elm @@ -10,7 +10,7 @@ -} -module Data.User exposing (User, decoder, encode) +module Data.User exposing (User, decoder, encode, toString) import Dict exposing (Dict) import Json.Decode as Decode exposing (Decoder) @@ -21,14 +21,14 @@ import Json.Encode as Encode {-| A User who is purchasing from the pet store -} type alias User = - { id : Maybe (Int) - , username : Maybe (String) - , firstName : Maybe (String) - , lastName : Maybe (String) - , email : Maybe (String) - , password : Maybe (String) - , phone : Maybe (String) - , userStatus : Maybe (Int) + { id : Maybe Int + , username : Maybe String + , firstName : Maybe String + , lastName : Maybe String + , email : Maybe String + , password : Maybe String + , phone : Maybe String + , userStatus : Maybe Int } @@ -45,7 +45,6 @@ decoder = |> optional "userStatus" (Decode.nullable Decode.int) Nothing - encode : User -> Encode.Value encode model = Encode.object @@ -57,7 +56,9 @@ encode model = , ( "password", Maybe.withDefault Encode.null (Maybe.map Encode.string model.password) ) , ( "phone", Maybe.withDefault Encode.null (Maybe.map Encode.string model.phone) ) , ( "userStatus", Maybe.withDefault Encode.null (Maybe.map Encode.int model.userStatus) ) - ] +toString : User -> String +toString = + Encode.encode 0 << encode diff --git a/samples/client/petstore/elm/src/DateTime.elm b/samples/client/petstore/elm/src/DateTime.elm index 7d4a5c642c..80b62fb7de 100644 --- a/samples/client/petstore/elm/src/DateTime.elm +++ b/samples/client/petstore/elm/src/DateTime.elm @@ -34,4 +34,4 @@ decodeIsoString str = toString : DateTime -> String toString = - Iso8601.fromTime \ No newline at end of file + Iso8601.fromTime diff --git a/samples/client/petstore/elm/src/Request/Pet.elm b/samples/client/petstore/elm/src/Request/Pet.elm index cd46555148..accf33f896 100644 --- a/samples/client/petstore/elm/src/Request/Pet.elm +++ b/samples/client/petstore/elm/src/Request/Pet.elm @@ -10,10 +10,10 @@ -} -module Request.Pet exposing (addPet, deletePet, findPetsByStatus, Status(..), findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile) +module Request.Pet exposing (Status(..), addPet, deletePet, findPetsByStatus, findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile) -import Data.Pet as Pet exposing (Pet) import Data.ApiResponse as ApiResponse exposing (ApiResponse) +import Data.Pet as Pet exposing (Pet) import Dict import Http import Json.Decode as Decode @@ -25,8 +25,9 @@ type Status | Pending | Sold -statusToString : Status -> String -statusToString value = + +stringifyStatus : Status -> String +stringifyStatus value = case value of Available -> "available" @@ -38,9 +39,6 @@ statusToString value = "sold" - - - basePath : String basePath = "http://petstore.swagger.io/v2" @@ -48,20 +46,17 @@ basePath = addPet : { onSend : Result Http.Error () -> msg - - , body : Pet - - } -> Cmd msg addPet params = Http.request { method = "POST" - , headers = [] - , url = Url.crossOrigin basePath - ["pet"] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "pet" ] + (List.filterMap identity []) , body = Http.jsonBody <| Pet.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -70,23 +65,21 @@ addPet params = deletePet : - { apiKey : Maybe (String) - } -> - { onSend : Result Http.Error () -> msg - - - - , petId : Int - + { apiKey : Maybe String } + -> + { onSend : Result Http.Error () -> msg + , petId : Int + } -> Cmd msg deletePet headers params = Http.request { method = "DELETE" - , headers = List.filterMap identity [Maybe.map (Http.header "api_key" ) headers.apiKey] - , url = Url.crossOrigin basePath - ["pet", String.fromInt params.petId] - [] + , headers = List.filterMap identity [ Maybe.map (Http.header "api_key" << identity) headers.apiKey ] + , url = + Url.crossOrigin basePath + [ "pet", String.fromInt params.petId ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -98,20 +91,17 @@ deletePet headers params = -} findPetsByStatus : { onSend : Result Http.Error (List Pet) -> msg - - - - , status : List Status } -> Cmd msg findPetsByStatus params = Http.request { method = "GET" - , headers = [] - , url = Url.crossOrigin basePath - ["pet", "findByStatus"] - (List.filterMap identity [Just (Url.string "status" <| (String.join "," << List.map statusToString) params.status)]) + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "pet", "findByStatus" ] + (List.filterMap identity [ (Just << Url.string "status" << String.join "," << List.map stringifyStatus) params.status ]) , body = Http.emptyBody , expect = Http.expectJson params.onSend (Decode.list Pet.decoder) , timeout = Just 30000 @@ -123,20 +113,17 @@ findPetsByStatus params = -} findPetsByTags : { onSend : Result Http.Error (List Pet) -> msg - - - - , tags : List String } -> Cmd msg findPetsByTags params = Http.request { method = "GET" - , headers = [] - , url = Url.crossOrigin basePath - ["pet", "findByTags"] - (List.filterMap identity [Just (Url.string "tags" <| (String.join ",") params.tags)]) + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "pet", "findByTags" ] + (List.filterMap identity [ (Just << Url.string "tags" << String.join "," << List.map identity) params.tags ]) , body = Http.emptyBody , expect = Http.expectJson params.onSend (Decode.list Pet.decoder) , timeout = Just 30000 @@ -148,20 +135,17 @@ findPetsByTags params = -} getPetById : { onSend : Result Http.Error Pet -> msg - - - , petId : Int - } -> Cmd msg getPetById params = Http.request { method = "GET" - , headers = [] - , url = Url.crossOrigin basePath - ["pet", String.fromInt params.petId] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "pet", String.fromInt params.petId ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend Pet.decoder , timeout = Just 30000 @@ -171,20 +155,17 @@ getPetById params = updatePet : { onSend : Result Http.Error () -> msg - - , body : Pet - - } -> Cmd msg updatePet params = Http.request { method = "PUT" - , headers = [] - , url = Url.crossOrigin basePath - ["pet"] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "pet" ] + (List.filterMap identity []) , body = Http.jsonBody <| Pet.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -194,20 +175,17 @@ updatePet params = updatePetWithForm : { onSend : Result Http.Error () -> msg - - - , petId : Int - } -> Cmd msg updatePetWithForm params = Http.request { method = "POST" - , headers = [] - , url = Url.crossOrigin basePath - ["pet", String.fromInt params.petId] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "pet", String.fromInt params.petId ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -217,20 +195,17 @@ updatePetWithForm params = uploadFile : { onSend : Result Http.Error ApiResponse -> msg - - - , petId : Int - } -> Cmd msg uploadFile params = Http.request { method = "POST" - , headers = [] - , url = Url.crossOrigin basePath - ["pet", String.fromInt params.petId, "uploadImage"] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "pet", String.fromInt params.petId, "uploadImage" ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend ApiResponse.decoder , timeout = Just 30000 diff --git a/samples/client/petstore/elm/src/Request/Store.elm b/samples/client/petstore/elm/src/Request/Store.elm index 7ac926fe41..3800147a77 100644 --- a/samples/client/petstore/elm/src/Request/Store.elm +++ b/samples/client/petstore/elm/src/Request/Store.elm @@ -19,8 +19,6 @@ import Json.Decode as Decode import Url.Builder as Url - - basePath : String basePath = "http://petstore.swagger.io/v2" @@ -30,20 +28,17 @@ basePath = -} deleteOrder : { onSend : Result Http.Error () -> msg - - - , orderId : String - } -> Cmd msg deleteOrder params = Http.request { method = "DELETE" - , headers = [] - , url = Url.crossOrigin basePath - ["store", "order", params.orderId] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "store", "order", identity params.orderId ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -55,20 +50,16 @@ deleteOrder params = -} getInventory : { onSend : Result Http.Error (Dict.Dict String Int) -> msg - - - - - } -> Cmd msg getInventory params = Http.request { method = "GET" - , headers = [] - , url = Url.crossOrigin basePath - ["store", "inventory"] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "store", "inventory" ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend (Decode.dict Decode.int) , timeout = Just 30000 @@ -80,20 +71,17 @@ getInventory params = -} getOrderById : { onSend : Result Http.Error Order_ -> msg - - - , orderId : Int - } -> Cmd msg getOrderById params = Http.request { method = "GET" - , headers = [] - , url = Url.crossOrigin basePath - ["store", "order", String.fromInt params.orderId] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "store", "order", String.fromInt params.orderId ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend Order_.decoder , timeout = Just 30000 @@ -103,20 +91,17 @@ getOrderById params = placeOrder : { onSend : Result Http.Error Order_ -> msg - - , body : Order_ - - } -> Cmd msg placeOrder params = Http.request { method = "POST" - , headers = [] - , url = Url.crossOrigin basePath - ["store", "order"] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "store", "order" ] + (List.filterMap identity []) , body = Http.jsonBody <| Order_.encode params.body , expect = Http.expectJson params.onSend Order_.decoder , timeout = Just 30000 diff --git a/samples/client/petstore/elm/src/Request/User.elm b/samples/client/petstore/elm/src/Request/User.elm index 6d6d21918a..74bbe8213c 100644 --- a/samples/client/petstore/elm/src/Request/User.elm +++ b/samples/client/petstore/elm/src/Request/User.elm @@ -19,8 +19,6 @@ import Json.Decode as Decode import Url.Builder as Url - - basePath : String basePath = "http://petstore.swagger.io/v2" @@ -30,20 +28,17 @@ basePath = -} createUser : { onSend : Result Http.Error () -> msg - - , body : User - - } -> Cmd msg createUser params = Http.request { method = "POST" - , headers = [] - , url = Url.crossOrigin basePath - ["user"] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "user" ] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -53,20 +48,17 @@ createUser params = createUsersWithArrayInput : { onSend : Result Http.Error () -> msg - - , body : User - - } -> Cmd msg createUsersWithArrayInput params = Http.request { method = "POST" - , headers = [] - , url = Url.crossOrigin basePath - ["user", "createWithArray"] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "user", "createWithArray" ] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -76,20 +68,17 @@ createUsersWithArrayInput params = createUsersWithListInput : { onSend : Result Http.Error () -> msg - - , body : User - - } -> Cmd msg createUsersWithListInput params = Http.request { method = "POST" - , headers = [] - , url = Url.crossOrigin basePath - ["user", "createWithList"] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "user", "createWithList" ] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -101,20 +90,17 @@ createUsersWithListInput params = -} deleteUser : { onSend : Result Http.Error () -> msg - - - , username : String - } -> Cmd msg deleteUser params = Http.request { method = "DELETE" - , headers = [] - , url = Url.crossOrigin basePath - ["user", params.username] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "user", identity params.username ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -124,20 +110,17 @@ deleteUser params = getUserByName : { onSend : Result Http.Error User -> msg - - - , username : String - } -> Cmd msg getUserByName params = Http.request { method = "GET" - , headers = [] - , url = Url.crossOrigin basePath - ["user", params.username] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "user", identity params.username ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend User.decoder , timeout = Just 30000 @@ -147,20 +130,18 @@ getUserByName params = loginUser : { onSend : Result Http.Error String -> msg - - - - - , username : String , password : String + , username : String + , password : String } -> Cmd msg loginUser params = Http.request { method = "GET" - , headers = [] - , url = Url.crossOrigin basePath - ["user", "login"] - (List.filterMap identity [Just (Url.string "username" params.username), Just (Url.string "password" params.password)]) + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "user", "login" ] + (List.filterMap identity [ (Just << Url.string "username" << identity) params.username, (Just << Url.string "password" << identity) params.password ]) , body = Http.emptyBody , expect = Http.expectJson params.onSend Decode.string , timeout = Just 30000 @@ -170,20 +151,16 @@ loginUser params = logoutUser : { onSend : Result Http.Error () -> msg - - - - - } -> Cmd msg logoutUser params = Http.request { method = "GET" - , headers = [] - , url = Url.crossOrigin basePath - ["user", "logout"] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "user", "logout" ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -195,20 +172,18 @@ logoutUser params = -} updateUser : { onSend : Result Http.Error () -> msg - - , body : User , username : String - } -> Cmd msg updateUser params = Http.request { method = "PUT" - , headers = [] - , url = Url.crossOrigin basePath - ["user", params.username] - [] + , headers = List.filterMap identity [] + , url = + Url.crossOrigin basePath + [ "user", identity params.username ] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 diff --git a/samples/client/petstore/go-experimental/auth_test.go b/samples/client/petstore/go-experimental/auth_test.go index 1bb5d81756..b788cc1199 100644 --- a/samples/client/petstore/go-experimental/auth_test.go +++ b/samples/client/petstore/go-experimental/auth_test.go @@ -37,8 +37,8 @@ func TestOAuth2(t *testing.T) { tokenSource := cfg.TokenSource(createContext(nil), &tok) auth := context.WithValue(context.Background(), sw.ContextOAuth2, tokenSource) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) @@ -72,8 +72,8 @@ func TestBasicAuth(t *testing.T) { Password: "f4k3p455", }) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(auth, newPet) @@ -102,8 +102,8 @@ func TestBasicAuth(t *testing.T) { func TestAccessToken(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAccessToken, "TESTFAKEACCESSTOKENISFAKE") - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(nil, newPet) @@ -132,8 +132,8 @@ func TestAccessToken(t *testing.T) { func TestAPIKeyNoPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123"}}) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) @@ -167,8 +167,8 @@ func TestAPIKeyNoPrefix(t *testing.T) { func TestAPIKeyWithPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123", Prefix: "Bearer"}}) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(nil, newPet) @@ -200,9 +200,8 @@ func TestAPIKeyWithPrefix(t *testing.T) { } func TestDefaultHeader(t *testing.T) { - - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) diff --git a/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go index 8d1b78ba00..8128bba97c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go @@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_fake.go index 731d5c00f4..db0a5d09f2 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_fake.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_fake.go @@ -176,7 +176,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -278,7 +277,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -376,7 +374,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -474,7 +471,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -700,7 +696,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go index fcae0074e6..b729b05ba4 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go @@ -110,7 +110,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_pet.go b/samples/client/petstore/go-experimental/go-petstore/api_pet.go index b3fd6a6e66..ba752fcff2 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_pet.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_pet.go @@ -243,6 +243,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -331,6 +332,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -433,6 +435,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -694,7 +697,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -800,7 +802,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_store.go b/samples/client/petstore/go-experimental/go-petstore/api_store.go index 27fa46576c..af866af40c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_store.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_store.go @@ -176,7 +176,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -271,6 +270,7 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -359,6 +359,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, * } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_user.go b/samples/client/petstore/go-experimental/go-petstore/api_user.go index 5eb1a3ced9..f4946e4752 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_user.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_user.go @@ -366,6 +366,7 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -455,6 +456,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md index 0b9deb0c58..2c22f8f1b3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## Call123TestSpecialTags > Client Call123TestSpecialTags(ctx, body) + To test special tags To test special tags and operation ID starting with number diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md index 9aaf2e63a9..1d85fdf9d3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md @@ -24,6 +24,7 @@ Method | HTTP request | Description ## CreateXmlItem > CreateXmlItem(ctx, xmlItem) + creates an XmlItem this route creates an XmlItem @@ -59,6 +60,7 @@ No authorization required > bool FakeOuterBooleanSerialize(ctx, optional) + Test serialization of outer boolean types ### Required Parameters @@ -101,6 +103,7 @@ No authorization required > OuterComposite FakeOuterCompositeSerialize(ctx, optional) + Test serialization of object with outer number type ### Required Parameters @@ -143,6 +146,7 @@ No authorization required > float32 FakeOuterNumberSerialize(ctx, optional) + Test serialization of outer number types ### Required Parameters @@ -185,6 +189,7 @@ No authorization required > string FakeOuterStringSerialize(ctx, optional) + Test serialization of outer string types ### Required Parameters @@ -227,6 +232,7 @@ No authorization required > TestBodyWithFileSchema(ctx, body) + For this test, the body for this request much reference a schema named `File`. ### Required Parameters @@ -260,6 +266,7 @@ No authorization required > TestBodyWithQueryParams(ctx, query, body) + ### Required Parameters @@ -290,6 +297,7 @@ No authorization required ## TestClientModel > Client TestClientModel(ctx, body) + To test \"client\" model To test \"client\" model @@ -323,6 +331,7 @@ No authorization required ## TestEndpointParameters > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -382,6 +391,7 @@ Name | Type | Description | Notes ## TestEnumParameters > TestEnumParameters(ctx, optional) + To test enum parameters To test enum parameters @@ -431,6 +441,7 @@ No authorization required ## TestGroupParameters > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) + Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -481,6 +492,7 @@ No authorization required ## TestInlineAdditionalProperties > TestInlineAdditionalProperties(ctx, param) + test inline additionalProperties ### Required Parameters @@ -512,6 +524,7 @@ No authorization required ## TestJsonFormData > TestJsonFormData(ctx, param, param2) + test json serialization of form data ### Required Parameters @@ -546,6 +559,7 @@ No authorization required > TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) + To test the collection format in query parameters ### Required Parameters diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md index b3cbcc2c06..224542b705 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## TestClassname > Client TestClassname(ctx, body) + To test class name in snake case To test class name in snake case diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md index 78f67041d3..b5502272ce 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | Pointer to **string** | | [optional] -**Foo** | Pointer to **string** | | [optional] +**Bar** | Pointer to **string** | | [optional] [readonly] +**Foo** | Pointer to **string** | | [optional] [readonly] ## Methods diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Name.md b/samples/client/petstore/go-experimental/go-petstore/docs/Name.md index 7cc6fd6a3a..6104c42beb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Name.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **int32** | | -**SnakeCase** | Pointer to **int32** | | [optional] +**SnakeCase** | Pointer to **int32** | | [optional] [readonly] **Property** | Pointer to **string** | | [optional] -**Var123Number** | Pointer to **int32** | | [optional] +**Var123Number** | Pointer to **int32** | | [optional] [readonly] ## Methods diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md index de48d4b676..6ee9afef75 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description ## AddPet > AddPet(ctx, body) + Add a new pet to the store ### Required Parameters @@ -50,6 +51,7 @@ Name | Type | Description | Notes ## DeletePet > DeletePet(ctx, petId, optional) + Deletes a pet ### Required Parameters @@ -92,6 +94,7 @@ Name | Type | Description | Notes ## FindPetsByStatus > []Pet FindPetsByStatus(ctx, status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -125,6 +128,7 @@ Name | Type | Description | Notes ## FindPetsByTags > []Pet FindPetsByTags(ctx, tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -158,6 +162,7 @@ Name | Type | Description | Notes ## GetPetById > Pet GetPetById(ctx, petId) + Find pet by ID Returns a single pet @@ -191,6 +196,7 @@ Name | Type | Description | Notes ## UpdatePet > UpdatePet(ctx, body) + Update an existing pet ### Required Parameters @@ -222,6 +228,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm > UpdatePetWithForm(ctx, petId, optional) + Updates a pet in the store with form data ### Required Parameters @@ -265,6 +272,7 @@ Name | Type | Description | Notes ## UploadFile > ApiResponse UploadFile(ctx, petId, optional) + uploads an image ### Required Parameters @@ -308,6 +316,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) + uploads an image (required) ### Required Parameters diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md b/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md index 552f0170bd..ce2ff23bc6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | Pointer to **string** | | [optional] +**Bar** | Pointer to **string** | | [optional] [readonly] **Baz** | Pointer to **string** | | [optional] ## Methods diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md index 083ed77759..531ab09ff6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description ## DeleteOrder > DeleteOrder(ctx, orderId) + Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -47,6 +48,7 @@ No authorization required ## GetInventory > map[string]int32 GetInventory(ctx, ) + Returns pet inventories by status Returns a map of status codes to quantities @@ -76,6 +78,7 @@ This endpoint does not need any parameter. ## GetOrderById > Order GetOrderById(ctx, orderId) + Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -109,6 +112,7 @@ No authorization required ## PlaceOrder > Order PlaceOrder(ctx, body) + Place an order for a pet ### Required Parameters diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md index 3201e1771d..d9f16bb5fb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description ## CreateUser > CreateUser(ctx, body) + Create user This can only be done by the logged in user. @@ -51,6 +52,7 @@ No authorization required ## CreateUsersWithArrayInput > CreateUsersWithArrayInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -82,6 +84,7 @@ No authorization required ## CreateUsersWithListInput > CreateUsersWithListInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -113,6 +116,7 @@ No authorization required ## DeleteUser > DeleteUser(ctx, username) + Delete user This can only be done by the logged in user. @@ -146,6 +150,7 @@ No authorization required ## GetUserByName > User GetUserByName(ctx, username) + Get user by user name ### Required Parameters @@ -177,6 +182,7 @@ No authorization required ## LoginUser > string LoginUser(ctx, username, password) + Logs user into the system ### Required Parameters @@ -209,6 +215,7 @@ No authorization required ## LogoutUser > LogoutUser(ctx, ) + Logs out current logged in user session ### Required Parameters @@ -236,6 +243,7 @@ No authorization required ## UpdateUser > UpdateUser(ctx, username, body) + Updated user This can only be done by the logged in user. diff --git a/samples/client/petstore/go-experimental/go-petstore/model_200_response.go b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go index cebe724d06..6aa7f9b6a7 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_200_response.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // Model200Response Model for testing model name starting with number type Model200Response struct { Name *int32 `json:"name,omitempty"` - Class *string `json:"class,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *Model200Response) GetName() int32 { if o == nil || o.Name == nil { var ret int32 @@ -28,7 +29,7 @@ func (o *Model200Response) GetName() int32 { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Model200Response) GetNameOk() (int32, bool) { if o == nil || o.Name == nil { @@ -52,7 +53,7 @@ func (o *Model200Response) SetName(v int32) { o.Name = &v } -// GetClass returns the Class field if non-nil, zero value otherwise. +// GetClass returns the Class field value if set, zero value otherwise. func (o *Model200Response) GetClass() string { if o == nil || o.Class == nil { var ret string @@ -61,7 +62,7 @@ func (o *Model200Response) GetClass() string { return *o.Class } -// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +// GetClassOk returns a tuple with the Class field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Model200Response) GetClassOk() (string, bool) { if o == nil || o.Class == nil { @@ -85,17 +86,26 @@ func (o *Model200Response) SetClass(v string) { o.Class = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Model200Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Class != nil { - toSerialize["class"] = o.Class - } - return json.Marshal(toSerialize) +type NullableModel200Response struct { + Value Model200Response + ExplicitNull bool } +func (v NullableModel200Response) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableModel200Response) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go index 586b84f029..c6fbcc703b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesAnyType struct for AdditionalPropertiesAnyType type AdditionalPropertiesAnyType struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesAnyType) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesAnyType) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesAnyType) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesAnyType) SetName(v string) { o.Name = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesAnyType) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) +type NullableAdditionalPropertiesAnyType struct { + Value AdditionalPropertiesAnyType + ExplicitNull bool } +func (v NullableAdditionalPropertiesAnyType) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAdditionalPropertiesAnyType) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go index 8cda0b7d08..b1bf7f3328 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesArray struct for AdditionalPropertiesArray type AdditionalPropertiesArray struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesArray) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesArray) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesArray) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesArray) SetName(v string) { o.Name = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesArray) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) +type NullableAdditionalPropertiesArray struct { + Value AdditionalPropertiesArray + ExplicitNull bool } +func (v NullableAdditionalPropertiesArray) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAdditionalPropertiesArray) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go index 0148cce9ab..c1aacbc1eb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesBoolean struct for AdditionalPropertiesBoolean type AdditionalPropertiesBoolean struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesBoolean) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesBoolean) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesBoolean) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesBoolean) SetName(v string) { o.Name = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesBoolean) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) +type NullableAdditionalPropertiesBoolean struct { + Value AdditionalPropertiesBoolean + ExplicitNull bool } +func (v NullableAdditionalPropertiesBoolean) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAdditionalPropertiesBoolean) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index 6d9025a896..3c1e8db624 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -8,36 +8,28 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesClass struct for AdditionalPropertiesClass type AdditionalPropertiesClass struct { MapString *map[string]string `json:"map_string,omitempty"` - MapNumber *map[string]float32 `json:"map_number,omitempty"` - MapInteger *map[string]int32 `json:"map_integer,omitempty"` - MapBoolean *map[string]bool `json:"map_boolean,omitempty"` - MapArrayInteger *map[string][]int32 `json:"map_array_integer,omitempty"` - MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` - MapMapString *map[string]map[string]string `json:"map_map_string,omitempty"` - MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` - Anytype1 *map[string]interface{} `json:"anytype_1,omitempty"` - Anytype2 *map[string]interface{} `json:"anytype_2,omitempty"` - Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"` - } -// GetMapString returns the MapString field if non-nil, zero value otherwise. +// GetMapString returns the MapString field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapString() map[string]string { if o == nil || o.MapString == nil { var ret map[string]string @@ -46,7 +38,7 @@ func (o *AdditionalPropertiesClass) GetMapString() map[string]string { return *o.MapString } -// GetMapStringOk returns a tuple with the MapString field if it's non-nil, zero value otherwise +// GetMapStringOk returns a tuple with the MapString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapStringOk() (map[string]string, bool) { if o == nil || o.MapString == nil { @@ -70,7 +62,7 @@ func (o *AdditionalPropertiesClass) SetMapString(v map[string]string) { o.MapString = &v } -// GetMapNumber returns the MapNumber field if non-nil, zero value otherwise. +// GetMapNumber returns the MapNumber field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32 { if o == nil || o.MapNumber == nil { var ret map[string]float32 @@ -79,7 +71,7 @@ func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32 { return *o.MapNumber } -// GetMapNumberOk returns a tuple with the MapNumber field if it's non-nil, zero value otherwise +// GetMapNumberOk returns a tuple with the MapNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapNumberOk() (map[string]float32, bool) { if o == nil || o.MapNumber == nil { @@ -103,7 +95,7 @@ func (o *AdditionalPropertiesClass) SetMapNumber(v map[string]float32) { o.MapNumber = &v } -// GetMapInteger returns the MapInteger field if non-nil, zero value otherwise. +// GetMapInteger returns the MapInteger field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32 { if o == nil || o.MapInteger == nil { var ret map[string]int32 @@ -112,7 +104,7 @@ func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32 { return *o.MapInteger } -// GetMapIntegerOk returns a tuple with the MapInteger field if it's non-nil, zero value otherwise +// GetMapIntegerOk returns a tuple with the MapInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapIntegerOk() (map[string]int32, bool) { if o == nil || o.MapInteger == nil { @@ -136,7 +128,7 @@ func (o *AdditionalPropertiesClass) SetMapInteger(v map[string]int32) { o.MapInteger = &v } -// GetMapBoolean returns the MapBoolean field if non-nil, zero value otherwise. +// GetMapBoolean returns the MapBoolean field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool { if o == nil || o.MapBoolean == nil { var ret map[string]bool @@ -145,7 +137,7 @@ func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool { return *o.MapBoolean } -// GetMapBooleanOk returns a tuple with the MapBoolean field if it's non-nil, zero value otherwise +// GetMapBooleanOk returns a tuple with the MapBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapBooleanOk() (map[string]bool, bool) { if o == nil || o.MapBoolean == nil { @@ -169,7 +161,7 @@ func (o *AdditionalPropertiesClass) SetMapBoolean(v map[string]bool) { o.MapBoolean = &v } -// GetMapArrayInteger returns the MapArrayInteger field if non-nil, zero value otherwise. +// GetMapArrayInteger returns the MapArrayInteger field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32 { if o == nil || o.MapArrayInteger == nil { var ret map[string][]int32 @@ -178,7 +170,7 @@ func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32 { return *o.MapArrayInteger } -// GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field if it's non-nil, zero value otherwise +// GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (map[string][]int32, bool) { if o == nil || o.MapArrayInteger == nil { @@ -202,7 +194,7 @@ func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32) { o.MapArrayInteger = &v } -// GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise. +// GetMapArrayAnytype returns the MapArrayAnytype field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{} { if o == nil || o.MapArrayAnytype == nil { var ret map[string][]map[string]interface{} @@ -211,7 +203,7 @@ func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string return *o.MapArrayAnytype } -// GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise +// GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool) { if o == nil || o.MapArrayAnytype == nil { @@ -235,7 +227,7 @@ func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string o.MapArrayAnytype = &v } -// GetMapMapString returns the MapMapString field if non-nil, zero value otherwise. +// GetMapMapString returns the MapMapString field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]string { if o == nil || o.MapMapString == nil { var ret map[string]map[string]string @@ -244,7 +236,7 @@ func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]stri return *o.MapMapString } -// GetMapMapStringOk returns a tuple with the MapMapString field if it's non-nil, zero value otherwise +// GetMapMapStringOk returns a tuple with the MapMapString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapMapStringOk() (map[string]map[string]string, bool) { if o == nil || o.MapMapString == nil { @@ -268,7 +260,7 @@ func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]stri o.MapMapString = &v } -// GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise. +// GetMapMapAnytype returns the MapMapAnytype field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{} { if o == nil || o.MapMapAnytype == nil { var ret map[string]map[string]map[string]interface{} @@ -277,7 +269,7 @@ func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map return *o.MapMapAnytype } -// GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise +// GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool) { if o == nil || o.MapMapAnytype == nil { @@ -301,7 +293,7 @@ func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map o.MapMapAnytype = &v } -// GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise. +// GetAnytype1 returns the Anytype1 field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { if o == nil || o.Anytype1 == nil { var ret map[string]interface{} @@ -310,7 +302,7 @@ func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { return *o.Anytype1 } -// GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise +// GetAnytype1Ok returns a tuple with the Anytype1 field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool) { if o == nil || o.Anytype1 == nil { @@ -334,7 +326,7 @@ func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{}) { o.Anytype1 = &v } -// GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise. +// GetAnytype2 returns the Anytype2 field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} { if o == nil || o.Anytype2 == nil { var ret map[string]interface{} @@ -343,7 +335,7 @@ func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} { return *o.Anytype2 } -// GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise +// GetAnytype2Ok returns a tuple with the Anytype2 field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool) { if o == nil || o.Anytype2 == nil { @@ -367,7 +359,7 @@ func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{}) { o.Anytype2 = &v } -// GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise. +// GetAnytype3 returns the Anytype3 field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} { if o == nil || o.Anytype3 == nil { var ret map[string]interface{} @@ -376,7 +368,7 @@ func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} { return *o.Anytype3 } -// GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise +// GetAnytype3Ok returns a tuple with the Anytype3 field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool) { if o == nil || o.Anytype3 == nil { @@ -400,44 +392,26 @@ func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{}) { o.Anytype3 = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.MapString != nil { - toSerialize["map_string"] = o.MapString - } - if o.MapNumber != nil { - toSerialize["map_number"] = o.MapNumber - } - if o.MapInteger != nil { - toSerialize["map_integer"] = o.MapInteger - } - if o.MapBoolean != nil { - toSerialize["map_boolean"] = o.MapBoolean - } - if o.MapArrayInteger != nil { - toSerialize["map_array_integer"] = o.MapArrayInteger - } - if o.MapArrayAnytype != nil { - toSerialize["map_array_anytype"] = o.MapArrayAnytype - } - if o.MapMapString != nil { - toSerialize["map_map_string"] = o.MapMapString - } - if o.MapMapAnytype != nil { - toSerialize["map_map_anytype"] = o.MapMapAnytype - } - if o.Anytype1 != nil { - toSerialize["anytype_1"] = o.Anytype1 - } - if o.Anytype2 != nil { - toSerialize["anytype_2"] = o.Anytype2 - } - if o.Anytype3 != nil { - toSerialize["anytype_3"] = o.Anytype3 - } - return json.Marshal(toSerialize) +type NullableAdditionalPropertiesClass struct { + Value AdditionalPropertiesClass + ExplicitNull bool } +func (v NullableAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAdditionalPropertiesClass) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go index c779aa6367..07c11d9cdc 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesInteger struct for AdditionalPropertiesInteger type AdditionalPropertiesInteger struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesInteger) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesInteger) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesInteger) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesInteger) SetName(v string) { o.Name = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesInteger) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) +type NullableAdditionalPropertiesInteger struct { + Value AdditionalPropertiesInteger + ExplicitNull bool } +func (v NullableAdditionalPropertiesInteger) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAdditionalPropertiesInteger) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go index c14902300c..59759fb409 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesNumber struct for AdditionalPropertiesNumber type AdditionalPropertiesNumber struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesNumber) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesNumber) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesNumber) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesNumber) SetName(v string) { o.Name = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesNumber) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) +type NullableAdditionalPropertiesNumber struct { + Value AdditionalPropertiesNumber + ExplicitNull bool } +func (v NullableAdditionalPropertiesNumber) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAdditionalPropertiesNumber) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go index 3fafb78aec..df2b0305a4 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesObject struct for AdditionalPropertiesObject type AdditionalPropertiesObject struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesObject) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesObject) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesObject) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesObject) SetName(v string) { o.Name = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesObject) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) +type NullableAdditionalPropertiesObject struct { + Value AdditionalPropertiesObject + ExplicitNull bool } +func (v NullableAdditionalPropertiesObject) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAdditionalPropertiesObject) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go index bc75e98add..47eb4dd0de 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesString struct for AdditionalPropertiesString type AdditionalPropertiesString struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesString) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesString) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesString) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesString) SetName(v string) { o.Name = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesString) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) +type NullableAdditionalPropertiesString struct { + Value AdditionalPropertiesString + ExplicitNull bool } +func (v NullableAdditionalPropertiesString) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAdditionalPropertiesString) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_animal.go b/samples/client/petstore/go-experimental/go-petstore/model_animal.go index 877476882e..dfae59606e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_animal.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_animal.go @@ -8,52 +8,34 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Animal struct for Animal type Animal struct { - ClassName *string `json:"className,omitempty"` - + ClassName string `json:"className"` Color *string `json:"color,omitempty"` - } -// GetClassName returns the ClassName field if non-nil, zero value otherwise. +// GetClassName returns the ClassName field value func (o *Animal) GetClassName() string { - if o == nil || o.ClassName == nil { + if o == nil { var ret string return ret } - return *o.ClassName + + return o.ClassName } -// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Animal) GetClassNameOk() (string, bool) { - if o == nil || o.ClassName == nil { - var ret string - return ret, false - } - return *o.ClassName, true -} - -// HasClassName returns a boolean if a field has been set. -func (o *Animal) HasClassName() bool { - if o != nil && o.ClassName != nil { - return true - } - - return false -} - -// SetClassName gets a reference to the given string and assigns it to the ClassName field. +// SetClassName sets field value func (o *Animal) SetClassName(v string) { - o.ClassName = &v + o.ClassName = v } -// GetColor returns the Color field if non-nil, zero value otherwise. +// GetColor returns the Color field value if set, zero value otherwise. func (o *Animal) GetColor() string { if o == nil || o.Color == nil { var ret string @@ -62,7 +44,7 @@ func (o *Animal) GetColor() string { return *o.Color } -// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// GetColorOk returns a tuple with the Color field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Animal) GetColorOk() (string, bool) { if o == nil || o.Color == nil { @@ -86,20 +68,26 @@ func (o *Animal) SetColor(v string) { o.Color = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Animal) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ClassName == nil { - return nil, errors.New("ClassName is required and not nullable, but was not set on Animal") - } - if o.ClassName != nil { - toSerialize["className"] = o.ClassName - } - if o.Color != nil { - toSerialize["color"] = o.Color - } - return json.Marshal(toSerialize) +type NullableAnimal struct { + Value Animal + ExplicitNull bool } +func (v NullableAnimal) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAnimal) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go index 358d4d4e56..e2d80e2207 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go @@ -8,20 +8,20 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ApiResponse struct for ApiResponse type ApiResponse struct { Code *int32 `json:"code,omitempty"` - Type *string `json:"type,omitempty"` - Message *string `json:"message,omitempty"` - } -// GetCode returns the Code field if non-nil, zero value otherwise. +// GetCode returns the Code field value if set, zero value otherwise. func (o *ApiResponse) GetCode() int32 { if o == nil || o.Code == nil { var ret int32 @@ -30,7 +30,7 @@ func (o *ApiResponse) GetCode() int32 { return *o.Code } -// GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +// GetCodeOk returns a tuple with the Code field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ApiResponse) GetCodeOk() (int32, bool) { if o == nil || o.Code == nil { @@ -54,7 +54,7 @@ func (o *ApiResponse) SetCode(v int32) { o.Code = &v } -// GetType returns the Type field if non-nil, zero value otherwise. +// GetType returns the Type field value if set, zero value otherwise. func (o *ApiResponse) GetType() string { if o == nil || o.Type == nil { var ret string @@ -63,7 +63,7 @@ func (o *ApiResponse) GetType() string { return *o.Type } -// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ApiResponse) GetTypeOk() (string, bool) { if o == nil || o.Type == nil { @@ -87,7 +87,7 @@ func (o *ApiResponse) SetType(v string) { o.Type = &v } -// GetMessage returns the Message field if non-nil, zero value otherwise. +// GetMessage returns the Message field value if set, zero value otherwise. func (o *ApiResponse) GetMessage() string { if o == nil || o.Message == nil { var ret string @@ -96,7 +96,7 @@ func (o *ApiResponse) GetMessage() string { return *o.Message } -// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +// GetMessageOk returns a tuple with the Message field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ApiResponse) GetMessageOk() (string, bool) { if o == nil || o.Message == nil { @@ -120,20 +120,26 @@ func (o *ApiResponse) SetMessage(v string) { o.Message = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o ApiResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Code != nil { - toSerialize["code"] = o.Code - } - if o.Type != nil { - toSerialize["type"] = o.Type - } - if o.Message != nil { - toSerialize["message"] = o.Message - } - return json.Marshal(toSerialize) +type NullableApiResponse struct { + Value ApiResponse + ExplicitNull bool } +func (v NullableApiResponse) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApiResponse) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go index de619c3fa0..cf5e59622f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly type ArrayOfArrayOfNumberOnly struct { ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"` - } -// GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise. +// GetArrayArrayNumber returns the ArrayArrayNumber field value if set, zero value otherwise. func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { if o == nil || o.ArrayArrayNumber == nil { var ret [][]float32 @@ -26,7 +28,7 @@ func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { return *o.ArrayArrayNumber } -// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise +// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) { if o == nil || o.ArrayArrayNumber == nil { @@ -50,14 +52,26 @@ func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) { o.ArrayArrayNumber = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ArrayArrayNumber != nil { - toSerialize["ArrayArrayNumber"] = o.ArrayArrayNumber - } - return json.Marshal(toSerialize) +type NullableArrayOfArrayOfNumberOnly struct { + Value ArrayOfArrayOfNumberOnly + ExplicitNull bool } +func (v NullableArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableArrayOfArrayOfNumberOnly) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go index 4efd5be060..7495577a4c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ArrayOfNumberOnly struct for ArrayOfNumberOnly type ArrayOfNumberOnly struct { ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"` - } -// GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. +// GetArrayNumber returns the ArrayNumber field value if set, zero value otherwise. func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { if o == nil || o.ArrayNumber == nil { var ret []float32 @@ -26,7 +28,7 @@ func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { return *o.ArrayNumber } -// GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise +// GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) { if o == nil || o.ArrayNumber == nil { @@ -50,14 +52,26 @@ func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) { o.ArrayNumber = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ArrayNumber != nil { - toSerialize["ArrayNumber"] = o.ArrayNumber - } - return json.Marshal(toSerialize) +type NullableArrayOfNumberOnly struct { + Value ArrayOfNumberOnly + ExplicitNull bool } +func (v NullableArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableArrayOfNumberOnly) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go index 2e1b18949d..01d310fd48 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go @@ -8,20 +8,20 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ArrayTest struct for ArrayTest type ArrayTest struct { ArrayOfString *[]string `json:"array_of_string,omitempty"` - ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"` - ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` - } -// GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise. +// GetArrayOfString returns the ArrayOfString field value if set, zero value otherwise. func (o *ArrayTest) GetArrayOfString() []string { if o == nil || o.ArrayOfString == nil { var ret []string @@ -30,7 +30,7 @@ func (o *ArrayTest) GetArrayOfString() []string { return *o.ArrayOfString } -// GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise +// GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) { if o == nil || o.ArrayOfString == nil { @@ -54,7 +54,7 @@ func (o *ArrayTest) SetArrayOfString(v []string) { o.ArrayOfString = &v } -// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise. +// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field value if set, zero value otherwise. func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { if o == nil || o.ArrayArrayOfInteger == nil { var ret [][]int64 @@ -63,7 +63,7 @@ func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { return *o.ArrayArrayOfInteger } -// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise +// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) { if o == nil || o.ArrayArrayOfInteger == nil { @@ -87,7 +87,7 @@ func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) { o.ArrayArrayOfInteger = &v } -// GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise. +// GetArrayArrayOfModel returns the ArrayArrayOfModel field value if set, zero value otherwise. func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { if o == nil || o.ArrayArrayOfModel == nil { var ret [][]ReadOnlyFirst @@ -96,7 +96,7 @@ func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { return *o.ArrayArrayOfModel } -// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise +// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) { if o == nil || o.ArrayArrayOfModel == nil { @@ -120,20 +120,26 @@ func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) { o.ArrayArrayOfModel = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o ArrayTest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ArrayOfString != nil { - toSerialize["array_of_string"] = o.ArrayOfString - } - if o.ArrayArrayOfInteger != nil { - toSerialize["array_array_of_integer"] = o.ArrayArrayOfInteger - } - if o.ArrayArrayOfModel != nil { - toSerialize["array_array_of_model"] = o.ArrayArrayOfModel - } - return json.Marshal(toSerialize) +type NullableArrayTest struct { + Value ArrayTest + ExplicitNull bool } +func (v NullableArrayTest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableArrayTest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go index 9cd486a70c..281f380508 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go @@ -8,27 +8,24 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // Capitalization struct for Capitalization type Capitalization struct { SmallCamel *string `json:"smallCamel,omitempty"` - CapitalCamel *string `json:"CapitalCamel,omitempty"` - SmallSnake *string `json:"small_Snake,omitempty"` - CapitalSnake *string `json:"Capital_Snake,omitempty"` - SCAETHFlowPoints *string `json:"SCA_ETH_Flow_Points,omitempty"` - // Name of the pet ATT_NAME *string `json:"ATT_NAME,omitempty"` - } -// GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. +// GetSmallCamel returns the SmallCamel field value if set, zero value otherwise. func (o *Capitalization) GetSmallCamel() string { if o == nil || o.SmallCamel == nil { var ret string @@ -37,7 +34,7 @@ func (o *Capitalization) GetSmallCamel() string { return *o.SmallCamel } -// GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise +// GetSmallCamelOk returns a tuple with the SmallCamel field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetSmallCamelOk() (string, bool) { if o == nil || o.SmallCamel == nil { @@ -61,7 +58,7 @@ func (o *Capitalization) SetSmallCamel(v string) { o.SmallCamel = &v } -// GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. +// GetCapitalCamel returns the CapitalCamel field value if set, zero value otherwise. func (o *Capitalization) GetCapitalCamel() string { if o == nil || o.CapitalCamel == nil { var ret string @@ -70,7 +67,7 @@ func (o *Capitalization) GetCapitalCamel() string { return *o.CapitalCamel } -// GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise +// GetCapitalCamelOk returns a tuple with the CapitalCamel field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetCapitalCamelOk() (string, bool) { if o == nil || o.CapitalCamel == nil { @@ -94,7 +91,7 @@ func (o *Capitalization) SetCapitalCamel(v string) { o.CapitalCamel = &v } -// GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. +// GetSmallSnake returns the SmallSnake field value if set, zero value otherwise. func (o *Capitalization) GetSmallSnake() string { if o == nil || o.SmallSnake == nil { var ret string @@ -103,7 +100,7 @@ func (o *Capitalization) GetSmallSnake() string { return *o.SmallSnake } -// GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise +// GetSmallSnakeOk returns a tuple with the SmallSnake field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetSmallSnakeOk() (string, bool) { if o == nil || o.SmallSnake == nil { @@ -127,7 +124,7 @@ func (o *Capitalization) SetSmallSnake(v string) { o.SmallSnake = &v } -// GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. +// GetCapitalSnake returns the CapitalSnake field value if set, zero value otherwise. func (o *Capitalization) GetCapitalSnake() string { if o == nil || o.CapitalSnake == nil { var ret string @@ -136,7 +133,7 @@ func (o *Capitalization) GetCapitalSnake() string { return *o.CapitalSnake } -// GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise +// GetCapitalSnakeOk returns a tuple with the CapitalSnake field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetCapitalSnakeOk() (string, bool) { if o == nil || o.CapitalSnake == nil { @@ -160,7 +157,7 @@ func (o *Capitalization) SetCapitalSnake(v string) { o.CapitalSnake = &v } -// GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise. +// GetSCAETHFlowPoints returns the SCAETHFlowPoints field value if set, zero value otherwise. func (o *Capitalization) GetSCAETHFlowPoints() string { if o == nil || o.SCAETHFlowPoints == nil { var ret string @@ -169,7 +166,7 @@ func (o *Capitalization) GetSCAETHFlowPoints() string { return *o.SCAETHFlowPoints } -// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise +// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool) { if o == nil || o.SCAETHFlowPoints == nil { @@ -193,7 +190,7 @@ func (o *Capitalization) SetSCAETHFlowPoints(v string) { o.SCAETHFlowPoints = &v } -// GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. +// GetATT_NAME returns the ATT_NAME field value if set, zero value otherwise. func (o *Capitalization) GetATT_NAME() string { if o == nil || o.ATT_NAME == nil { var ret string @@ -202,7 +199,7 @@ func (o *Capitalization) GetATT_NAME() string { return *o.ATT_NAME } -// GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise +// GetATT_NAMEOk returns a tuple with the ATT_NAME field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetATT_NAMEOk() (string, bool) { if o == nil || o.ATT_NAME == nil { @@ -226,29 +223,26 @@ func (o *Capitalization) SetATT_NAME(v string) { o.ATT_NAME = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Capitalization) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.SmallCamel != nil { - toSerialize["smallCamel"] = o.SmallCamel - } - if o.CapitalCamel != nil { - toSerialize["CapitalCamel"] = o.CapitalCamel - } - if o.SmallSnake != nil { - toSerialize["small_Snake"] = o.SmallSnake - } - if o.CapitalSnake != nil { - toSerialize["Capital_Snake"] = o.CapitalSnake - } - if o.SCAETHFlowPoints != nil { - toSerialize["SCA_ETH_Flow_Points"] = o.SCAETHFlowPoints - } - if o.ATT_NAME != nil { - toSerialize["ATT_NAME"] = o.ATT_NAME - } - return json.Marshal(toSerialize) +type NullableCapitalization struct { + Value Capitalization + ExplicitNull bool } +func (v NullableCapitalization) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableCapitalization) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_cat.go index 07dfafae8b..a4390348e3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_cat.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_cat.go @@ -8,54 +8,35 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Cat struct for Cat type Cat struct { - ClassName *string `json:"className,omitempty"` - + ClassName string `json:"className"` Color *string `json:"color,omitempty"` - Declawed *bool `json:"declawed,omitempty"` - } -// GetClassName returns the ClassName field if non-nil, zero value otherwise. +// GetClassName returns the ClassName field value func (o *Cat) GetClassName() string { - if o == nil || o.ClassName == nil { + if o == nil { var ret string return ret } - return *o.ClassName + + return o.ClassName } -// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Cat) GetClassNameOk() (string, bool) { - if o == nil || o.ClassName == nil { - var ret string - return ret, false - } - return *o.ClassName, true -} - -// HasClassName returns a boolean if a field has been set. -func (o *Cat) HasClassName() bool { - if o != nil && o.ClassName != nil { - return true - } - - return false -} - -// SetClassName gets a reference to the given string and assigns it to the ClassName field. +// SetClassName sets field value func (o *Cat) SetClassName(v string) { - o.ClassName = &v + o.ClassName = v } -// GetColor returns the Color field if non-nil, zero value otherwise. +// GetColor returns the Color field value if set, zero value otherwise. func (o *Cat) GetColor() string { if o == nil || o.Color == nil { var ret string @@ -64,7 +45,7 @@ func (o *Cat) GetColor() string { return *o.Color } -// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// GetColorOk returns a tuple with the Color field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Cat) GetColorOk() (string, bool) { if o == nil || o.Color == nil { @@ -88,7 +69,7 @@ func (o *Cat) SetColor(v string) { o.Color = &v } -// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. +// GetDeclawed returns the Declawed field value if set, zero value otherwise. func (o *Cat) GetDeclawed() bool { if o == nil || o.Declawed == nil { var ret bool @@ -97,7 +78,7 @@ func (o *Cat) GetDeclawed() bool { return *o.Declawed } -// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +// GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Cat) GetDeclawedOk() (bool, bool) { if o == nil || o.Declawed == nil { @@ -121,23 +102,26 @@ func (o *Cat) SetDeclawed(v bool) { o.Declawed = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Cat) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ClassName == nil { - return nil, errors.New("ClassName is required and not nullable, but was not set on Cat") - } - if o.ClassName != nil { - toSerialize["className"] = o.ClassName - } - if o.Color != nil { - toSerialize["color"] = o.Color - } - if o.Declawed != nil { - toSerialize["declawed"] = o.Declawed - } - return json.Marshal(toSerialize) +type NullableCat struct { + Value Cat + ExplicitNull bool } +func (v NullableCat) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableCat) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go index db53c7dbbd..5fe06820a2 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // CatAllOf struct for CatAllOf type CatAllOf struct { Declawed *bool `json:"declawed,omitempty"` - } -// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. +// GetDeclawed returns the Declawed field value if set, zero value otherwise. func (o *CatAllOf) GetDeclawed() bool { if o == nil || o.Declawed == nil { var ret bool @@ -26,7 +28,7 @@ func (o *CatAllOf) GetDeclawed() bool { return *o.Declawed } -// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +// GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *CatAllOf) GetDeclawedOk() (bool, bool) { if o == nil || o.Declawed == nil { @@ -50,14 +52,26 @@ func (o *CatAllOf) SetDeclawed(v bool) { o.Declawed = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o CatAllOf) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Declawed != nil { - toSerialize["declawed"] = o.Declawed - } - return json.Marshal(toSerialize) +type NullableCatAllOf struct { + Value CatAllOf + ExplicitNull bool } +func (v NullableCatAllOf) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableCatAllOf) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_category.go b/samples/client/petstore/go-experimental/go-petstore/model_category.go index eef9caf28f..1a4d80c25a 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_category.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_category.go @@ -8,19 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Category struct for Category type Category struct { Id *int64 `json:"id,omitempty"` - - Name *string `json:"name,omitempty"` - + Name string `json:"name"` } -// GetId returns the Id field if non-nil, zero value otherwise. +// GetId returns the Id field value if set, zero value otherwise. func (o *Category) GetId() int64 { if o == nil || o.Id == nil { var ret int64 @@ -29,7 +29,7 @@ func (o *Category) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Category) GetIdOk() (int64, bool) { if o == nil || o.Id == nil { @@ -53,53 +53,41 @@ func (o *Category) SetId(v int64) { o.Id = &v } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value func (o *Category) GetName() string { - if o == nil || o.Name == nil { + if o == nil { var ret string return ret } - return *o.Name + + return o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Category) GetNameOk() (string, bool) { - if o == nil || o.Name == nil { - var ret string - return ret, false - } - return *o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Category) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName sets field value func (o *Category) SetName(v string) { - o.Name = &v + o.Name = v } - -// MarshalJSON returns the JSON representation of the model. -func (o Category) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Name == nil { - return nil, errors.New("Name is required and not nullable, but was not set on Category") - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) +type NullableCategory struct { + Value Category + ExplicitNull bool } +func (v NullableCategory) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableCategory) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go index 8a83ac5698..cb217ea0b9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ClassModel Model for testing model with \"_class\" property type ClassModel struct { Class *string `json:"_class,omitempty"` - } -// GetClass returns the Class field if non-nil, zero value otherwise. +// GetClass returns the Class field value if set, zero value otherwise. func (o *ClassModel) GetClass() string { if o == nil || o.Class == nil { var ret string @@ -26,7 +28,7 @@ func (o *ClassModel) GetClass() string { return *o.Class } -// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +// GetClassOk returns a tuple with the Class field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ClassModel) GetClassOk() (string, bool) { if o == nil || o.Class == nil { @@ -50,14 +52,26 @@ func (o *ClassModel) SetClass(v string) { o.Class = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o ClassModel) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Class != nil { - toSerialize["_class"] = o.Class - } - return json.Marshal(toSerialize) +type NullableClassModel struct { + Value ClassModel + ExplicitNull bool } +func (v NullableClassModel) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableClassModel) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_client.go b/samples/client/petstore/go-experimental/go-petstore/model_client.go index abead359c7..1c2d82dbaa 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_client.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_client.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // Client struct for Client type Client struct { Client *string `json:"client,omitempty"` - } -// GetClient returns the Client field if non-nil, zero value otherwise. +// GetClient returns the Client field value if set, zero value otherwise. func (o *Client) GetClient() string { if o == nil || o.Client == nil { var ret string @@ -26,7 +28,7 @@ func (o *Client) GetClient() string { return *o.Client } -// GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise +// GetClientOk returns a tuple with the Client field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Client) GetClientOk() (string, bool) { if o == nil || o.Client == nil { @@ -50,14 +52,26 @@ func (o *Client) SetClient(v string) { o.Client = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Client) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Client != nil { - toSerialize["client"] = o.Client - } - return json.Marshal(toSerialize) +type NullableClient struct { + Value Client + ExplicitNull bool } +func (v NullableClient) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableClient) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/client/petstore/go-experimental/go-petstore/model_dog.go index 2c09989cca..1e12cf2030 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_dog.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_dog.go @@ -8,54 +8,35 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Dog struct for Dog type Dog struct { - ClassName *string `json:"className,omitempty"` - + ClassName string `json:"className"` Color *string `json:"color,omitempty"` - Breed *string `json:"breed,omitempty"` - } -// GetClassName returns the ClassName field if non-nil, zero value otherwise. +// GetClassName returns the ClassName field value func (o *Dog) GetClassName() string { - if o == nil || o.ClassName == nil { + if o == nil { var ret string return ret } - return *o.ClassName + + return o.ClassName } -// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Dog) GetClassNameOk() (string, bool) { - if o == nil || o.ClassName == nil { - var ret string - return ret, false - } - return *o.ClassName, true -} - -// HasClassName returns a boolean if a field has been set. -func (o *Dog) HasClassName() bool { - if o != nil && o.ClassName != nil { - return true - } - - return false -} - -// SetClassName gets a reference to the given string and assigns it to the ClassName field. +// SetClassName sets field value func (o *Dog) SetClassName(v string) { - o.ClassName = &v + o.ClassName = v } -// GetColor returns the Color field if non-nil, zero value otherwise. +// GetColor returns the Color field value if set, zero value otherwise. func (o *Dog) GetColor() string { if o == nil || o.Color == nil { var ret string @@ -64,7 +45,7 @@ func (o *Dog) GetColor() string { return *o.Color } -// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// GetColorOk returns a tuple with the Color field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Dog) GetColorOk() (string, bool) { if o == nil || o.Color == nil { @@ -88,7 +69,7 @@ func (o *Dog) SetColor(v string) { o.Color = &v } -// GetBreed returns the Breed field if non-nil, zero value otherwise. +// GetBreed returns the Breed field value if set, zero value otherwise. func (o *Dog) GetBreed() string { if o == nil || o.Breed == nil { var ret string @@ -97,7 +78,7 @@ func (o *Dog) GetBreed() string { return *o.Breed } -// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +// GetBreedOk returns a tuple with the Breed field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Dog) GetBreedOk() (string, bool) { if o == nil || o.Breed == nil { @@ -121,23 +102,26 @@ func (o *Dog) SetBreed(v string) { o.Breed = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Dog) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ClassName == nil { - return nil, errors.New("ClassName is required and not nullable, but was not set on Dog") - } - if o.ClassName != nil { - toSerialize["className"] = o.ClassName - } - if o.Color != nil { - toSerialize["color"] = o.Color - } - if o.Breed != nil { - toSerialize["breed"] = o.Breed - } - return json.Marshal(toSerialize) +type NullableDog struct { + Value Dog + ExplicitNull bool } +func (v NullableDog) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableDog) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go index abd645b6e7..0572953d46 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // DogAllOf struct for DogAllOf type DogAllOf struct { Breed *string `json:"breed,omitempty"` - } -// GetBreed returns the Breed field if non-nil, zero value otherwise. +// GetBreed returns the Breed field value if set, zero value otherwise. func (o *DogAllOf) GetBreed() string { if o == nil || o.Breed == nil { var ret string @@ -26,7 +28,7 @@ func (o *DogAllOf) GetBreed() string { return *o.Breed } -// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +// GetBreedOk returns a tuple with the Breed field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *DogAllOf) GetBreedOk() (string, bool) { if o == nil || o.Breed == nil { @@ -50,14 +52,26 @@ func (o *DogAllOf) SetBreed(v string) { o.Breed = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o DogAllOf) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Breed != nil { - toSerialize["breed"] = o.Breed - } - return json.Marshal(toSerialize) +type NullableDogAllOf struct { + Value DogAllOf + ExplicitNull bool } +func (v NullableDogAllOf) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableDogAllOf) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go index 453848096d..68b520550b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // EnumArrays struct for EnumArrays type EnumArrays struct { JustSymbol *string `json:"just_symbol,omitempty"` - ArrayEnum *[]string `json:"array_enum,omitempty"` - } -// GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. +// GetJustSymbol returns the JustSymbol field value if set, zero value otherwise. func (o *EnumArrays) GetJustSymbol() string { if o == nil || o.JustSymbol == nil { var ret string @@ -28,7 +29,7 @@ func (o *EnumArrays) GetJustSymbol() string { return *o.JustSymbol } -// GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise +// GetJustSymbolOk returns a tuple with the JustSymbol field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumArrays) GetJustSymbolOk() (string, bool) { if o == nil || o.JustSymbol == nil { @@ -52,7 +53,7 @@ func (o *EnumArrays) SetJustSymbol(v string) { o.JustSymbol = &v } -// GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. +// GetArrayEnum returns the ArrayEnum field value if set, zero value otherwise. func (o *EnumArrays) GetArrayEnum() []string { if o == nil || o.ArrayEnum == nil { var ret []string @@ -61,7 +62,7 @@ func (o *EnumArrays) GetArrayEnum() []string { return *o.ArrayEnum } -// GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise +// GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) { if o == nil || o.ArrayEnum == nil { @@ -85,17 +86,26 @@ func (o *EnumArrays) SetArrayEnum(v []string) { o.ArrayEnum = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o EnumArrays) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.JustSymbol != nil { - toSerialize["just_symbol"] = o.JustSymbol - } - if o.ArrayEnum != nil { - toSerialize["array_enum"] = o.ArrayEnum - } - return json.Marshal(toSerialize) +type NullableEnumArrays struct { + Value EnumArrays + ExplicitNull bool } +func (v NullableEnumArrays) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableEnumArrays) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go index 06f7d5535d..8864dc3869 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go @@ -8,6 +8,12 @@ */ package petstore + +import ( + "bytes" + "encoding/json" +) + // EnumClass the model 'EnumClass' type EnumClass string @@ -18,4 +24,30 @@ const ( XYZ EnumClass = "(xyz)" ) +type NullableEnumClass struct { + Value EnumClass + ExplicitNull bool +} + +func (v NullableEnumClass) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != "": + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableEnumClass) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + + diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go index 17a5fc44fd..8594082a56 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go @@ -8,25 +8,22 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // EnumTest struct for EnumTest type EnumTest struct { EnumString *string `json:"enum_string,omitempty"` - - EnumStringRequired *string `json:"enum_string_required,omitempty"` - + EnumStringRequired string `json:"enum_string_required"` EnumInteger *int32 `json:"enum_integer,omitempty"` - EnumNumber *float64 `json:"enum_number,omitempty"` - OuterEnum *OuterEnum `json:"outerEnum,omitempty"` - } -// GetEnumString returns the EnumString field if non-nil, zero value otherwise. +// GetEnumString returns the EnumString field value if set, zero value otherwise. func (o *EnumTest) GetEnumString() string { if o == nil || o.EnumString == nil { var ret string @@ -35,7 +32,7 @@ func (o *EnumTest) GetEnumString() string { return *o.EnumString } -// GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise +// GetEnumStringOk returns a tuple with the EnumString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumTest) GetEnumStringOk() (string, bool) { if o == nil || o.EnumString == nil { @@ -59,40 +56,22 @@ func (o *EnumTest) SetEnumString(v string) { o.EnumString = &v } -// GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise. +// GetEnumStringRequired returns the EnumStringRequired field value func (o *EnumTest) GetEnumStringRequired() string { - if o == nil || o.EnumStringRequired == nil { + if o == nil { var ret string return ret } - return *o.EnumStringRequired + + return o.EnumStringRequired } -// GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *EnumTest) GetEnumStringRequiredOk() (string, bool) { - if o == nil || o.EnumStringRequired == nil { - var ret string - return ret, false - } - return *o.EnumStringRequired, true -} - -// HasEnumStringRequired returns a boolean if a field has been set. -func (o *EnumTest) HasEnumStringRequired() bool { - if o != nil && o.EnumStringRequired != nil { - return true - } - - return false -} - -// SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field. +// SetEnumStringRequired sets field value func (o *EnumTest) SetEnumStringRequired(v string) { - o.EnumStringRequired = &v + o.EnumStringRequired = v } -// GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. +// GetEnumInteger returns the EnumInteger field value if set, zero value otherwise. func (o *EnumTest) GetEnumInteger() int32 { if o == nil || o.EnumInteger == nil { var ret int32 @@ -101,7 +80,7 @@ func (o *EnumTest) GetEnumInteger() int32 { return *o.EnumInteger } -// GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise +// GetEnumIntegerOk returns a tuple with the EnumInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumTest) GetEnumIntegerOk() (int32, bool) { if o == nil || o.EnumInteger == nil { @@ -125,7 +104,7 @@ func (o *EnumTest) SetEnumInteger(v int32) { o.EnumInteger = &v } -// GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. +// GetEnumNumber returns the EnumNumber field value if set, zero value otherwise. func (o *EnumTest) GetEnumNumber() float64 { if o == nil || o.EnumNumber == nil { var ret float64 @@ -134,7 +113,7 @@ func (o *EnumTest) GetEnumNumber() float64 { return *o.EnumNumber } -// GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise +// GetEnumNumberOk returns a tuple with the EnumNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumTest) GetEnumNumberOk() (float64, bool) { if o == nil || o.EnumNumber == nil { @@ -158,7 +137,7 @@ func (o *EnumTest) SetEnumNumber(v float64) { o.EnumNumber = &v } -// GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. +// GetOuterEnum returns the OuterEnum field value if set, zero value otherwise. func (o *EnumTest) GetOuterEnum() OuterEnum { if o == nil || o.OuterEnum == nil { var ret OuterEnum @@ -167,7 +146,7 @@ func (o *EnumTest) GetOuterEnum() OuterEnum { return *o.OuterEnum } -// GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise +// GetOuterEnumOk returns a tuple with the OuterEnum field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool) { if o == nil || o.OuterEnum == nil { @@ -191,29 +170,26 @@ func (o *EnumTest) SetOuterEnum(v OuterEnum) { o.OuterEnum = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o EnumTest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.EnumString != nil { - toSerialize["enum_string"] = o.EnumString - } - if o.EnumStringRequired == nil { - return nil, errors.New("EnumStringRequired is required and not nullable, but was not set on EnumTest") - } - if o.EnumStringRequired != nil { - toSerialize["enum_string_required"] = o.EnumStringRequired - } - if o.EnumInteger != nil { - toSerialize["enum_integer"] = o.EnumInteger - } - if o.EnumNumber != nil { - toSerialize["enum_number"] = o.EnumNumber - } - if o.OuterEnum != nil { - toSerialize["outerEnum"] = o.OuterEnum - } - return json.Marshal(toSerialize) +type NullableEnumTest struct { + Value EnumTest + ExplicitNull bool } +func (v NullableEnumTest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableEnumTest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file.go b/samples/client/petstore/go-experimental/go-petstore/model_file.go index 872952cc14..d35f12c088 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_file.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_file.go @@ -8,17 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // File Must be named `File` for test. type File struct { // Test capitalization SourceURI *string `json:"sourceURI,omitempty"` - } -// GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. +// GetSourceURI returns the SourceURI field value if set, zero value otherwise. func (o *File) GetSourceURI() string { if o == nil || o.SourceURI == nil { var ret string @@ -27,7 +29,7 @@ func (o *File) GetSourceURI() string { return *o.SourceURI } -// GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise +// GetSourceURIOk returns a tuple with the SourceURI field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *File) GetSourceURIOk() (string, bool) { if o == nil || o.SourceURI == nil { @@ -51,14 +53,26 @@ func (o *File) SetSourceURI(v string) { o.SourceURI = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o File) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.SourceURI != nil { - toSerialize["sourceURI"] = o.SourceURI - } - return json.Marshal(toSerialize) +type NullableFile struct { + Value File + ExplicitNull bool } +func (v NullableFile) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFile) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go index 3926d06b23..5c6a45436b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // FileSchemaTestClass struct for FileSchemaTestClass type FileSchemaTestClass struct { File *File `json:"file,omitempty"` - Files *[]File `json:"files,omitempty"` - } -// GetFile returns the File field if non-nil, zero value otherwise. +// GetFile returns the File field value if set, zero value otherwise. func (o *FileSchemaTestClass) GetFile() File { if o == nil || o.File == nil { var ret File @@ -28,7 +29,7 @@ func (o *FileSchemaTestClass) GetFile() File { return *o.File } -// GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +// GetFileOk returns a tuple with the File field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FileSchemaTestClass) GetFileOk() (File, bool) { if o == nil || o.File == nil { @@ -52,7 +53,7 @@ func (o *FileSchemaTestClass) SetFile(v File) { o.File = &v } -// GetFiles returns the Files field if non-nil, zero value otherwise. +// GetFiles returns the Files field value if set, zero value otherwise. func (o *FileSchemaTestClass) GetFiles() []File { if o == nil || o.Files == nil { var ret []File @@ -61,7 +62,7 @@ func (o *FileSchemaTestClass) GetFiles() []File { return *o.Files } -// GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise +// GetFilesOk returns a tuple with the Files field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) { if o == nil || o.Files == nil { @@ -85,17 +86,26 @@ func (o *FileSchemaTestClass) SetFiles(v []File) { o.Files = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.File != nil { - toSerialize["file"] = o.File - } - if o.Files != nil { - toSerialize["files"] = o.Files - } - return json.Marshal(toSerialize) +type NullableFileSchemaTestClass struct { + Value FileSchemaTestClass + ExplicitNull bool } +func (v NullableFileSchemaTestClass) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFileSchemaTestClass) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go index c6de468fbf..6676cf826f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go @@ -8,45 +8,33 @@ */ package petstore + import ( + "bytes" + "encoding/json" "os" "time" - "encoding/json" - "errors" ) + // FormatTest struct for FormatTest type FormatTest struct { Integer *int32 `json:"integer,omitempty"` - Int32 *int32 `json:"int32,omitempty"` - Int64 *int64 `json:"int64,omitempty"` - - Number *float32 `json:"number,omitempty"` - + Number float32 `json:"number"` Float *float32 `json:"float,omitempty"` - Double *float64 `json:"double,omitempty"` - String *string `json:"string,omitempty"` - - Byte *string `json:"byte,omitempty"` - + Byte string `json:"byte"` Binary **os.File `json:"binary,omitempty"` - - Date *string `json:"date,omitempty"` - + Date string `json:"date"` DateTime *time.Time `json:"dateTime,omitempty"` - Uuid *string `json:"uuid,omitempty"` - - Password *string `json:"password,omitempty"` - + Password string `json:"password"` BigDecimal *float64 `json:"BigDecimal,omitempty"` - } -// GetInteger returns the Integer field if non-nil, zero value otherwise. +// GetInteger returns the Integer field value if set, zero value otherwise. func (o *FormatTest) GetInteger() int32 { if o == nil || o.Integer == nil { var ret int32 @@ -55,7 +43,7 @@ func (o *FormatTest) GetInteger() int32 { return *o.Integer } -// GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise +// GetIntegerOk returns a tuple with the Integer field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetIntegerOk() (int32, bool) { if o == nil || o.Integer == nil { @@ -79,7 +67,7 @@ func (o *FormatTest) SetInteger(v int32) { o.Integer = &v } -// GetInt32 returns the Int32 field if non-nil, zero value otherwise. +// GetInt32 returns the Int32 field value if set, zero value otherwise. func (o *FormatTest) GetInt32() int32 { if o == nil || o.Int32 == nil { var ret int32 @@ -88,7 +76,7 @@ func (o *FormatTest) GetInt32() int32 { return *o.Int32 } -// GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise +// GetInt32Ok returns a tuple with the Int32 field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetInt32Ok() (int32, bool) { if o == nil || o.Int32 == nil { @@ -112,7 +100,7 @@ func (o *FormatTest) SetInt32(v int32) { o.Int32 = &v } -// GetInt64 returns the Int64 field if non-nil, zero value otherwise. +// GetInt64 returns the Int64 field value if set, zero value otherwise. func (o *FormatTest) GetInt64() int64 { if o == nil || o.Int64 == nil { var ret int64 @@ -121,7 +109,7 @@ func (o *FormatTest) GetInt64() int64 { return *o.Int64 } -// GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise +// GetInt64Ok returns a tuple with the Int64 field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetInt64Ok() (int64, bool) { if o == nil || o.Int64 == nil { @@ -145,40 +133,22 @@ func (o *FormatTest) SetInt64(v int64) { o.Int64 = &v } -// GetNumber returns the Number field if non-nil, zero value otherwise. +// GetNumber returns the Number field value func (o *FormatTest) GetNumber() float32 { - if o == nil || o.Number == nil { + if o == nil { var ret float32 return ret } - return *o.Number + + return o.Number } -// GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *FormatTest) GetNumberOk() (float32, bool) { - if o == nil || o.Number == nil { - var ret float32 - return ret, false - } - return *o.Number, true -} - -// HasNumber returns a boolean if a field has been set. -func (o *FormatTest) HasNumber() bool { - if o != nil && o.Number != nil { - return true - } - - return false -} - -// SetNumber gets a reference to the given float32 and assigns it to the Number field. +// SetNumber sets field value func (o *FormatTest) SetNumber(v float32) { - o.Number = &v + o.Number = v } -// GetFloat returns the Float field if non-nil, zero value otherwise. +// GetFloat returns the Float field value if set, zero value otherwise. func (o *FormatTest) GetFloat() float32 { if o == nil || o.Float == nil { var ret float32 @@ -187,7 +157,7 @@ func (o *FormatTest) GetFloat() float32 { return *o.Float } -// GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +// GetFloatOk returns a tuple with the Float field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetFloatOk() (float32, bool) { if o == nil || o.Float == nil { @@ -211,7 +181,7 @@ func (o *FormatTest) SetFloat(v float32) { o.Float = &v } -// GetDouble returns the Double field if non-nil, zero value otherwise. +// GetDouble returns the Double field value if set, zero value otherwise. func (o *FormatTest) GetDouble() float64 { if o == nil || o.Double == nil { var ret float64 @@ -220,7 +190,7 @@ func (o *FormatTest) GetDouble() float64 { return *o.Double } -// GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +// GetDoubleOk returns a tuple with the Double field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetDoubleOk() (float64, bool) { if o == nil || o.Double == nil { @@ -244,7 +214,7 @@ func (o *FormatTest) SetDouble(v float64) { o.Double = &v } -// GetString returns the String field if non-nil, zero value otherwise. +// GetString returns the String field value if set, zero value otherwise. func (o *FormatTest) GetString() string { if o == nil || o.String == nil { var ret string @@ -253,7 +223,7 @@ func (o *FormatTest) GetString() string { return *o.String } -// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +// GetStringOk returns a tuple with the String field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetStringOk() (string, bool) { if o == nil || o.String == nil { @@ -277,40 +247,22 @@ func (o *FormatTest) SetString(v string) { o.String = &v } -// GetByte returns the Byte field if non-nil, zero value otherwise. +// GetByte returns the Byte field value func (o *FormatTest) GetByte() string { - if o == nil || o.Byte == nil { + if o == nil { var ret string return ret } - return *o.Byte + + return o.Byte } -// GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *FormatTest) GetByteOk() (string, bool) { - if o == nil || o.Byte == nil { - var ret string - return ret, false - } - return *o.Byte, true -} - -// HasByte returns a boolean if a field has been set. -func (o *FormatTest) HasByte() bool { - if o != nil && o.Byte != nil { - return true - } - - return false -} - -// SetByte gets a reference to the given string and assigns it to the Byte field. +// SetByte sets field value func (o *FormatTest) SetByte(v string) { - o.Byte = &v + o.Byte = v } -// GetBinary returns the Binary field if non-nil, zero value otherwise. +// GetBinary returns the Binary field value if set, zero value otherwise. func (o *FormatTest) GetBinary() *os.File { if o == nil || o.Binary == nil { var ret *os.File @@ -319,7 +271,7 @@ func (o *FormatTest) GetBinary() *os.File { return *o.Binary } -// GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise +// GetBinaryOk returns a tuple with the Binary field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetBinaryOk() (*os.File, bool) { if o == nil || o.Binary == nil { @@ -343,40 +295,22 @@ func (o *FormatTest) SetBinary(v *os.File) { o.Binary = &v } -// GetDate returns the Date field if non-nil, zero value otherwise. +// GetDate returns the Date field value func (o *FormatTest) GetDate() string { - if o == nil || o.Date == nil { + if o == nil { var ret string return ret } - return *o.Date + + return o.Date } -// GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *FormatTest) GetDateOk() (string, bool) { - if o == nil || o.Date == nil { - var ret string - return ret, false - } - return *o.Date, true -} - -// HasDate returns a boolean if a field has been set. -func (o *FormatTest) HasDate() bool { - if o != nil && o.Date != nil { - return true - } - - return false -} - -// SetDate gets a reference to the given string and assigns it to the Date field. +// SetDate sets field value func (o *FormatTest) SetDate(v string) { - o.Date = &v + o.Date = v } -// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +// GetDateTime returns the DateTime field value if set, zero value otherwise. func (o *FormatTest) GetDateTime() time.Time { if o == nil || o.DateTime == nil { var ret time.Time @@ -385,7 +319,7 @@ func (o *FormatTest) GetDateTime() time.Time { return *o.DateTime } -// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetDateTimeOk() (time.Time, bool) { if o == nil || o.DateTime == nil { @@ -409,7 +343,7 @@ func (o *FormatTest) SetDateTime(v time.Time) { o.DateTime = &v } -// GetUuid returns the Uuid field if non-nil, zero value otherwise. +// GetUuid returns the Uuid field value if set, zero value otherwise. func (o *FormatTest) GetUuid() string { if o == nil || o.Uuid == nil { var ret string @@ -418,7 +352,7 @@ func (o *FormatTest) GetUuid() string { return *o.Uuid } -// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetUuidOk() (string, bool) { if o == nil || o.Uuid == nil { @@ -442,40 +376,22 @@ func (o *FormatTest) SetUuid(v string) { o.Uuid = &v } -// GetPassword returns the Password field if non-nil, zero value otherwise. +// GetPassword returns the Password field value func (o *FormatTest) GetPassword() string { - if o == nil || o.Password == nil { + if o == nil { var ret string return ret } - return *o.Password + + return o.Password } -// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *FormatTest) GetPasswordOk() (string, bool) { - if o == nil || o.Password == nil { - var ret string - return ret, false - } - return *o.Password, true -} - -// HasPassword returns a boolean if a field has been set. -func (o *FormatTest) HasPassword() bool { - if o != nil && o.Password != nil { - return true - } - - return false -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. +// SetPassword sets field value func (o *FormatTest) SetPassword(v string) { - o.Password = &v + o.Password = v } -// GetBigDecimal returns the BigDecimal field if non-nil, zero value otherwise. +// GetBigDecimal returns the BigDecimal field value if set, zero value otherwise. func (o *FormatTest) GetBigDecimal() float64 { if o == nil || o.BigDecimal == nil { var ret float64 @@ -484,7 +400,7 @@ func (o *FormatTest) GetBigDecimal() float64 { return *o.BigDecimal } -// GetBigDecimalOk returns a tuple with the BigDecimal field if it's non-nil, zero value otherwise +// GetBigDecimalOk returns a tuple with the BigDecimal field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetBigDecimalOk() (float64, bool) { if o == nil || o.BigDecimal == nil { @@ -508,65 +424,26 @@ func (o *FormatTest) SetBigDecimal(v float64) { o.BigDecimal = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o FormatTest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Integer != nil { - toSerialize["integer"] = o.Integer - } - if o.Int32 != nil { - toSerialize["int32"] = o.Int32 - } - if o.Int64 != nil { - toSerialize["int64"] = o.Int64 - } - if o.Number == nil { - return nil, errors.New("Number is required and not nullable, but was not set on FormatTest") - } - if o.Number != nil { - toSerialize["number"] = o.Number - } - if o.Float != nil { - toSerialize["float"] = o.Float - } - if o.Double != nil { - toSerialize["double"] = o.Double - } - if o.String != nil { - toSerialize["string"] = o.String - } - if o.Byte == nil { - return nil, errors.New("Byte is required and not nullable, but was not set on FormatTest") - } - if o.Byte != nil { - toSerialize["byte"] = o.Byte - } - if o.Binary != nil { - toSerialize["binary"] = o.Binary - } - if o.Date == nil { - return nil, errors.New("Date is required and not nullable, but was not set on FormatTest") - } - if o.Date != nil { - toSerialize["date"] = o.Date - } - if o.DateTime != nil { - toSerialize["dateTime"] = o.DateTime - } - if o.Uuid != nil { - toSerialize["uuid"] = o.Uuid - } - if o.Password == nil { - return nil, errors.New("Password is required and not nullable, but was not set on FormatTest") - } - if o.Password != nil { - toSerialize["password"] = o.Password - } - if o.BigDecimal != nil { - toSerialize["BigDecimal"] = o.BigDecimal - } - return json.Marshal(toSerialize) +type NullableFormatTest struct { + Value FormatTest + ExplicitNull bool } +func (v NullableFormatTest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFormatTest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go index a36344fdf8..4d6a4ade3b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // HasOnlyReadOnly struct for HasOnlyReadOnly type HasOnlyReadOnly struct { Bar *string `json:"bar,omitempty"` - Foo *string `json:"foo,omitempty"` - } -// GetBar returns the Bar field if non-nil, zero value otherwise. +// GetBar returns the Bar field value if set, zero value otherwise. func (o *HasOnlyReadOnly) GetBar() string { if o == nil || o.Bar == nil { var ret string @@ -28,7 +29,7 @@ func (o *HasOnlyReadOnly) GetBar() string { return *o.Bar } -// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// GetBarOk returns a tuple with the Bar field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *HasOnlyReadOnly) GetBarOk() (string, bool) { if o == nil || o.Bar == nil { @@ -52,7 +53,7 @@ func (o *HasOnlyReadOnly) SetBar(v string) { o.Bar = &v } -// GetFoo returns the Foo field if non-nil, zero value otherwise. +// GetFoo returns the Foo field value if set, zero value otherwise. func (o *HasOnlyReadOnly) GetFoo() string { if o == nil || o.Foo == nil { var ret string @@ -61,7 +62,7 @@ func (o *HasOnlyReadOnly) GetFoo() string { return *o.Foo } -// GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise +// GetFooOk returns a tuple with the Foo field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *HasOnlyReadOnly) GetFooOk() (string, bool) { if o == nil || o.Foo == nil { @@ -85,17 +86,26 @@ func (o *HasOnlyReadOnly) SetFoo(v string) { o.Foo = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o HasOnlyReadOnly) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Bar != nil { - toSerialize["bar"] = o.Bar - } - if o.Foo != nil { - toSerialize["foo"] = o.Foo - } - return json.Marshal(toSerialize) +type NullableHasOnlyReadOnly struct { + Value HasOnlyReadOnly + ExplicitNull bool } +func (v NullableHasOnlyReadOnly) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableHasOnlyReadOnly) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_list.go b/samples/client/petstore/go-experimental/go-petstore/model_list.go index 2d1e013e68..2e341b13fe 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_list.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_list.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // List struct for List type List struct { Var123List *string `json:"123-list,omitempty"` - } -// GetVar123List returns the Var123List field if non-nil, zero value otherwise. +// GetVar123List returns the Var123List field value if set, zero value otherwise. func (o *List) GetVar123List() string { if o == nil || o.Var123List == nil { var ret string @@ -26,7 +28,7 @@ func (o *List) GetVar123List() string { return *o.Var123List } -// GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise +// GetVar123ListOk returns a tuple with the Var123List field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *List) GetVar123ListOk() (string, bool) { if o == nil || o.Var123List == nil { @@ -50,14 +52,26 @@ func (o *List) SetVar123List(v string) { o.Var123List = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o List) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Var123List != nil { - toSerialize["123-list"] = o.Var123List - } - return json.Marshal(toSerialize) +type NullableList struct { + Value List + ExplicitNull bool } +func (v NullableList) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableList) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go index 1f5db78738..482e2dcaa5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go @@ -8,22 +8,21 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // MapTest struct for MapTest type MapTest struct { MapMapOfString *map[string]map[string]string `json:"map_map_of_string,omitempty"` - MapOfEnumString *map[string]string `json:"map_of_enum_string,omitempty"` - DirectMap *map[string]bool `json:"direct_map,omitempty"` - IndirectMap *map[string]bool `json:"indirect_map,omitempty"` - } -// GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise. +// GetMapMapOfString returns the MapMapOfString field value if set, zero value otherwise. func (o *MapTest) GetMapMapOfString() map[string]map[string]string { if o == nil || o.MapMapOfString == nil { var ret map[string]map[string]string @@ -32,7 +31,7 @@ func (o *MapTest) GetMapMapOfString() map[string]map[string]string { return *o.MapMapOfString } -// GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise +// GetMapMapOfStringOk returns a tuple with the MapMapOfString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool) { if o == nil || o.MapMapOfString == nil { @@ -56,7 +55,7 @@ func (o *MapTest) SetMapMapOfString(v map[string]map[string]string) { o.MapMapOfString = &v } -// GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise. +// GetMapOfEnumString returns the MapOfEnumString field value if set, zero value otherwise. func (o *MapTest) GetMapOfEnumString() map[string]string { if o == nil || o.MapOfEnumString == nil { var ret map[string]string @@ -65,7 +64,7 @@ func (o *MapTest) GetMapOfEnumString() map[string]string { return *o.MapOfEnumString } -// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise +// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool) { if o == nil || o.MapOfEnumString == nil { @@ -89,7 +88,7 @@ func (o *MapTest) SetMapOfEnumString(v map[string]string) { o.MapOfEnumString = &v } -// GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. +// GetDirectMap returns the DirectMap field value if set, zero value otherwise. func (o *MapTest) GetDirectMap() map[string]bool { if o == nil || o.DirectMap == nil { var ret map[string]bool @@ -98,7 +97,7 @@ func (o *MapTest) GetDirectMap() map[string]bool { return *o.DirectMap } -// GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise +// GetDirectMapOk returns a tuple with the DirectMap field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MapTest) GetDirectMapOk() (map[string]bool, bool) { if o == nil || o.DirectMap == nil { @@ -122,7 +121,7 @@ func (o *MapTest) SetDirectMap(v map[string]bool) { o.DirectMap = &v } -// GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. +// GetIndirectMap returns the IndirectMap field value if set, zero value otherwise. func (o *MapTest) GetIndirectMap() map[string]bool { if o == nil || o.IndirectMap == nil { var ret map[string]bool @@ -131,7 +130,7 @@ func (o *MapTest) GetIndirectMap() map[string]bool { return *o.IndirectMap } -// GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise +// GetIndirectMapOk returns a tuple with the IndirectMap field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool) { if o == nil || o.IndirectMap == nil { @@ -155,23 +154,26 @@ func (o *MapTest) SetIndirectMap(v map[string]bool) { o.IndirectMap = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o MapTest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.MapMapOfString != nil { - toSerialize["map_map_of_string"] = o.MapMapOfString - } - if o.MapOfEnumString != nil { - toSerialize["map_of_enum_string"] = o.MapOfEnumString - } - if o.DirectMap != nil { - toSerialize["direct_map"] = o.DirectMap - } - if o.IndirectMap != nil { - toSerialize["indirect_map"] = o.IndirectMap - } - return json.Marshal(toSerialize) +type NullableMapTest struct { + Value MapTest + ExplicitNull bool } +func (v NullableMapTest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableMapTest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go index 8f8d81b2c5..29a15dd4b9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -8,21 +8,21 @@ */ package petstore + import ( - "time" + "bytes" "encoding/json" + "time" ) + // MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass type MixedPropertiesAndAdditionalPropertiesClass struct { Uuid *string `json:"uuid,omitempty"` - DateTime *time.Time `json:"dateTime,omitempty"` - Map *map[string]Animal `json:"map,omitempty"` - } -// GetUuid returns the Uuid field if non-nil, zero value otherwise. +// GetUuid returns the Uuid field value if set, zero value otherwise. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { if o == nil || o.Uuid == nil { var ret string @@ -31,7 +31,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { return *o.Uuid } -// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool) { if o == nil || o.Uuid == nil { @@ -55,7 +55,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string) { o.Uuid = &v } -// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +// GetDateTime returns the DateTime field value if set, zero value otherwise. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time { if o == nil || o.DateTime == nil { var ret time.Time @@ -64,7 +64,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time { return *o.DateTime } -// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool) { if o == nil || o.DateTime == nil { @@ -88,7 +88,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time) { o.DateTime = &v } -// GetMap returns the Map field if non-nil, zero value otherwise. +// GetMap returns the Map field value if set, zero value otherwise. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal { if o == nil || o.Map == nil { var ret map[string]Animal @@ -97,7 +97,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal return *o.Map } -// GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise +// GetMapOk returns a tuple with the Map field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool) { if o == nil || o.Map == nil { @@ -121,20 +121,26 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal o.Map = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o MixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Uuid != nil { - toSerialize["uuid"] = o.Uuid - } - if o.DateTime != nil { - toSerialize["dateTime"] = o.DateTime - } - if o.Map != nil { - toSerialize["map"] = o.Map - } - return json.Marshal(toSerialize) +type NullableMixedPropertiesAndAdditionalPropertiesClass struct { + Value MixedPropertiesAndAdditionalPropertiesClass + ExplicitNull bool } +func (v NullableMixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableMixedPropertiesAndAdditionalPropertiesClass) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_name.go index ce720badba..15cb31cf79 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_name.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_name.go @@ -8,56 +8,36 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Name Model for testing model name same as property name type Name struct { - Name *int32 `json:"name,omitempty"` - + Name int32 `json:"name"` SnakeCase *int32 `json:"snake_case,omitempty"` - Property *string `json:"property,omitempty"` - Var123Number *int32 `json:"123Number,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value func (o *Name) GetName() int32 { - if o == nil || o.Name == nil { + if o == nil { var ret int32 return ret } - return *o.Name + + return o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Name) GetNameOk() (int32, bool) { - if o == nil || o.Name == nil { - var ret int32 - return ret, false - } - return *o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Name) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given int32 and assigns it to the Name field. +// SetName sets field value func (o *Name) SetName(v int32) { - o.Name = &v + o.Name = v } -// GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. +// GetSnakeCase returns the SnakeCase field value if set, zero value otherwise. func (o *Name) GetSnakeCase() int32 { if o == nil || o.SnakeCase == nil { var ret int32 @@ -66,7 +46,7 @@ func (o *Name) GetSnakeCase() int32 { return *o.SnakeCase } -// GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise +// GetSnakeCaseOk returns a tuple with the SnakeCase field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Name) GetSnakeCaseOk() (int32, bool) { if o == nil || o.SnakeCase == nil { @@ -90,7 +70,7 @@ func (o *Name) SetSnakeCase(v int32) { o.SnakeCase = &v } -// GetProperty returns the Property field if non-nil, zero value otherwise. +// GetProperty returns the Property field value if set, zero value otherwise. func (o *Name) GetProperty() string { if o == nil || o.Property == nil { var ret string @@ -99,7 +79,7 @@ func (o *Name) GetProperty() string { return *o.Property } -// GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise +// GetPropertyOk returns a tuple with the Property field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Name) GetPropertyOk() (string, bool) { if o == nil || o.Property == nil { @@ -123,7 +103,7 @@ func (o *Name) SetProperty(v string) { o.Property = &v } -// GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. +// GetVar123Number returns the Var123Number field value if set, zero value otherwise. func (o *Name) GetVar123Number() int32 { if o == nil || o.Var123Number == nil { var ret int32 @@ -132,7 +112,7 @@ func (o *Name) GetVar123Number() int32 { return *o.Var123Number } -// GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise +// GetVar123NumberOk returns a tuple with the Var123Number field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Name) GetVar123NumberOk() (int32, bool) { if o == nil || o.Var123Number == nil { @@ -156,26 +136,26 @@ func (o *Name) SetVar123Number(v int32) { o.Var123Number = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Name) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name == nil { - return nil, errors.New("Name is required and not nullable, but was not set on Name") - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.SnakeCase != nil { - toSerialize["snake_case"] = o.SnakeCase - } - if o.Property != nil { - toSerialize["property"] = o.Property - } - if o.Var123Number != nil { - toSerialize["123Number"] = o.Var123Number - } - return json.Marshal(toSerialize) +type NullableName struct { + Value Name + ExplicitNull bool } +func (v NullableName) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableName) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go index 0cc88037cd..a844fb8128 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // NumberOnly struct for NumberOnly type NumberOnly struct { JustNumber *float32 `json:"JustNumber,omitempty"` - } -// GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. +// GetJustNumber returns the JustNumber field value if set, zero value otherwise. func (o *NumberOnly) GetJustNumber() float32 { if o == nil || o.JustNumber == nil { var ret float32 @@ -26,7 +28,7 @@ func (o *NumberOnly) GetJustNumber() float32 { return *o.JustNumber } -// GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise +// GetJustNumberOk returns a tuple with the JustNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *NumberOnly) GetJustNumberOk() (float32, bool) { if o == nil || o.JustNumber == nil { @@ -50,14 +52,26 @@ func (o *NumberOnly) SetJustNumber(v float32) { o.JustNumber = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o NumberOnly) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.JustNumber != nil { - toSerialize["JustNumber"] = o.JustNumber - } - return json.Marshal(toSerialize) +type NullableNumberOnly struct { + Value NumberOnly + ExplicitNull bool } +func (v NullableNumberOnly) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableNumberOnly) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_order.go b/samples/client/petstore/go-experimental/go-petstore/model_order.go index c0aefd9048..d138fa95cb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_order.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_order.go @@ -8,28 +8,25 @@ */ package petstore + import ( - "time" + "bytes" "encoding/json" + "time" ) + // Order struct for Order type Order struct { Id *int64 `json:"id,omitempty"` - PetId *int64 `json:"petId,omitempty"` - Quantity *int32 `json:"quantity,omitempty"` - ShipDate *time.Time `json:"shipDate,omitempty"` - // Order Status Status *string `json:"status,omitempty"` - Complete *bool `json:"complete,omitempty"` - } -// GetId returns the Id field if non-nil, zero value otherwise. +// GetId returns the Id field value if set, zero value otherwise. func (o *Order) GetId() int64 { if o == nil || o.Id == nil { var ret int64 @@ -38,7 +35,7 @@ func (o *Order) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetIdOk() (int64, bool) { if o == nil || o.Id == nil { @@ -62,7 +59,7 @@ func (o *Order) SetId(v int64) { o.Id = &v } -// GetPetId returns the PetId field if non-nil, zero value otherwise. +// GetPetId returns the PetId field value if set, zero value otherwise. func (o *Order) GetPetId() int64 { if o == nil || o.PetId == nil { var ret int64 @@ -71,7 +68,7 @@ func (o *Order) GetPetId() int64 { return *o.PetId } -// GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise +// GetPetIdOk returns a tuple with the PetId field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetPetIdOk() (int64, bool) { if o == nil || o.PetId == nil { @@ -95,7 +92,7 @@ func (o *Order) SetPetId(v int64) { o.PetId = &v } -// GetQuantity returns the Quantity field if non-nil, zero value otherwise. +// GetQuantity returns the Quantity field value if set, zero value otherwise. func (o *Order) GetQuantity() int32 { if o == nil || o.Quantity == nil { var ret int32 @@ -104,7 +101,7 @@ func (o *Order) GetQuantity() int32 { return *o.Quantity } -// GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise +// GetQuantityOk returns a tuple with the Quantity field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetQuantityOk() (int32, bool) { if o == nil || o.Quantity == nil { @@ -128,7 +125,7 @@ func (o *Order) SetQuantity(v int32) { o.Quantity = &v } -// GetShipDate returns the ShipDate field if non-nil, zero value otherwise. +// GetShipDate returns the ShipDate field value if set, zero value otherwise. func (o *Order) GetShipDate() time.Time { if o == nil || o.ShipDate == nil { var ret time.Time @@ -137,7 +134,7 @@ func (o *Order) GetShipDate() time.Time { return *o.ShipDate } -// GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise +// GetShipDateOk returns a tuple with the ShipDate field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetShipDateOk() (time.Time, bool) { if o == nil || o.ShipDate == nil { @@ -161,7 +158,7 @@ func (o *Order) SetShipDate(v time.Time) { o.ShipDate = &v } -// GetStatus returns the Status field if non-nil, zero value otherwise. +// GetStatus returns the Status field value if set, zero value otherwise. func (o *Order) GetStatus() string { if o == nil || o.Status == nil { var ret string @@ -170,7 +167,7 @@ func (o *Order) GetStatus() string { return *o.Status } -// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// GetStatusOk returns a tuple with the Status field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetStatusOk() (string, bool) { if o == nil || o.Status == nil { @@ -194,7 +191,7 @@ func (o *Order) SetStatus(v string) { o.Status = &v } -// GetComplete returns the Complete field if non-nil, zero value otherwise. +// GetComplete returns the Complete field value if set, zero value otherwise. func (o *Order) GetComplete() bool { if o == nil || o.Complete == nil { var ret bool @@ -203,7 +200,7 @@ func (o *Order) GetComplete() bool { return *o.Complete } -// GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise +// GetCompleteOk returns a tuple with the Complete field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetCompleteOk() (bool, bool) { if o == nil || o.Complete == nil { @@ -227,29 +224,26 @@ func (o *Order) SetComplete(v bool) { o.Complete = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Order) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.PetId != nil { - toSerialize["petId"] = o.PetId - } - if o.Quantity != nil { - toSerialize["quantity"] = o.Quantity - } - if o.ShipDate != nil { - toSerialize["shipDate"] = o.ShipDate - } - if o.Status != nil { - toSerialize["status"] = o.Status - } - if o.Complete != nil { - toSerialize["complete"] = o.Complete - } - return json.Marshal(toSerialize) +type NullableOrder struct { + Value Order + ExplicitNull bool } +func (v NullableOrder) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableOrder) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go index 1fe5d41034..b22599eb67 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go @@ -8,20 +8,20 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // OuterComposite struct for OuterComposite type OuterComposite struct { MyNumber *float32 `json:"my_number,omitempty"` - MyString *string `json:"my_string,omitempty"` - MyBoolean *bool `json:"my_boolean,omitempty"` - } -// GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. +// GetMyNumber returns the MyNumber field value if set, zero value otherwise. func (o *OuterComposite) GetMyNumber() float32 { if o == nil || o.MyNumber == nil { var ret float32 @@ -30,7 +30,7 @@ func (o *OuterComposite) GetMyNumber() float32 { return *o.MyNumber } -// GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise +// GetMyNumberOk returns a tuple with the MyNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *OuterComposite) GetMyNumberOk() (float32, bool) { if o == nil || o.MyNumber == nil { @@ -54,7 +54,7 @@ func (o *OuterComposite) SetMyNumber(v float32) { o.MyNumber = &v } -// GetMyString returns the MyString field if non-nil, zero value otherwise. +// GetMyString returns the MyString field value if set, zero value otherwise. func (o *OuterComposite) GetMyString() string { if o == nil || o.MyString == nil { var ret string @@ -63,7 +63,7 @@ func (o *OuterComposite) GetMyString() string { return *o.MyString } -// GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise +// GetMyStringOk returns a tuple with the MyString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *OuterComposite) GetMyStringOk() (string, bool) { if o == nil || o.MyString == nil { @@ -87,7 +87,7 @@ func (o *OuterComposite) SetMyString(v string) { o.MyString = &v } -// GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. +// GetMyBoolean returns the MyBoolean field value if set, zero value otherwise. func (o *OuterComposite) GetMyBoolean() bool { if o == nil || o.MyBoolean == nil { var ret bool @@ -96,7 +96,7 @@ func (o *OuterComposite) GetMyBoolean() bool { return *o.MyBoolean } -// GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise +// GetMyBooleanOk returns a tuple with the MyBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *OuterComposite) GetMyBooleanOk() (bool, bool) { if o == nil || o.MyBoolean == nil { @@ -120,20 +120,26 @@ func (o *OuterComposite) SetMyBoolean(v bool) { o.MyBoolean = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o OuterComposite) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.MyNumber != nil { - toSerialize["my_number"] = o.MyNumber - } - if o.MyString != nil { - toSerialize["my_string"] = o.MyString - } - if o.MyBoolean != nil { - toSerialize["my_boolean"] = o.MyBoolean - } - return json.Marshal(toSerialize) +type NullableOuterComposite struct { + Value OuterComposite + ExplicitNull bool } +func (v NullableOuterComposite) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableOuterComposite) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go b/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go index f133b6fc89..b6385fcb56 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go @@ -8,6 +8,12 @@ */ package petstore + +import ( + "bytes" + "encoding/json" +) + // OuterEnum the model 'OuterEnum' type OuterEnum string @@ -18,4 +24,30 @@ const ( DELIVERED OuterEnum = "delivered" ) +type NullableOuterEnum struct { + Value OuterEnum + ExplicitNull bool +} + +func (v NullableOuterEnum) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != "": + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableOuterEnum) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + + diff --git a/samples/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/client/petstore/go-experimental/go-petstore/model_pet.go index 110a21e094..405a179218 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_pet.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_pet.go @@ -8,28 +8,24 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Pet struct for Pet type Pet struct { Id *int64 `json:"id,omitempty"` - Category *Category `json:"category,omitempty"` - - Name *string `json:"name,omitempty"` - - PhotoUrls *[]string `json:"photoUrls,omitempty"` - + Name string `json:"name"` + PhotoUrls []string `json:"photoUrls"` Tags *[]Tag `json:"tags,omitempty"` - // pet status in the store Status *string `json:"status,omitempty"` - } -// GetId returns the Id field if non-nil, zero value otherwise. +// GetId returns the Id field value if set, zero value otherwise. func (o *Pet) GetId() int64 { if o == nil || o.Id == nil { var ret int64 @@ -38,7 +34,7 @@ func (o *Pet) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Pet) GetIdOk() (int64, bool) { if o == nil || o.Id == nil { @@ -62,7 +58,7 @@ func (o *Pet) SetId(v int64) { o.Id = &v } -// GetCategory returns the Category field if non-nil, zero value otherwise. +// GetCategory returns the Category field value if set, zero value otherwise. func (o *Pet) GetCategory() Category { if o == nil || o.Category == nil { var ret Category @@ -71,7 +67,7 @@ func (o *Pet) GetCategory() Category { return *o.Category } -// GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +// GetCategoryOk returns a tuple with the Category field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Pet) GetCategoryOk() (Category, bool) { if o == nil || o.Category == nil { @@ -95,73 +91,37 @@ func (o *Pet) SetCategory(v Category) { o.Category = &v } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value func (o *Pet) GetName() string { - if o == nil || o.Name == nil { + if o == nil { var ret string return ret } - return *o.Name + + return o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Pet) GetNameOk() (string, bool) { - if o == nil || o.Name == nil { - var ret string - return ret, false - } - return *o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Pet) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName sets field value func (o *Pet) SetName(v string) { - o.Name = &v + o.Name = v } -// GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. +// GetPhotoUrls returns the PhotoUrls field value func (o *Pet) GetPhotoUrls() []string { - if o == nil || o.PhotoUrls == nil { + if o == nil { var ret []string return ret } - return *o.PhotoUrls + + return o.PhotoUrls } -// GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Pet) GetPhotoUrlsOk() ([]string, bool) { - if o == nil || o.PhotoUrls == nil { - var ret []string - return ret, false - } - return *o.PhotoUrls, true -} - -// HasPhotoUrls returns a boolean if a field has been set. -func (o *Pet) HasPhotoUrls() bool { - if o != nil && o.PhotoUrls != nil { - return true - } - - return false -} - -// SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field. +// SetPhotoUrls sets field value func (o *Pet) SetPhotoUrls(v []string) { - o.PhotoUrls = &v + o.PhotoUrls = v } -// GetTags returns the Tags field if non-nil, zero value otherwise. +// GetTags returns the Tags field value if set, zero value otherwise. func (o *Pet) GetTags() []Tag { if o == nil || o.Tags == nil { var ret []Tag @@ -170,7 +130,7 @@ func (o *Pet) GetTags() []Tag { return *o.Tags } -// GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +// GetTagsOk returns a tuple with the Tags field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Pet) GetTagsOk() ([]Tag, bool) { if o == nil || o.Tags == nil { @@ -194,7 +154,7 @@ func (o *Pet) SetTags(v []Tag) { o.Tags = &v } -// GetStatus returns the Status field if non-nil, zero value otherwise. +// GetStatus returns the Status field value if set, zero value otherwise. func (o *Pet) GetStatus() string { if o == nil || o.Status == nil { var ret string @@ -203,7 +163,7 @@ func (o *Pet) GetStatus() string { return *o.Status } -// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// GetStatusOk returns a tuple with the Status field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Pet) GetStatusOk() (string, bool) { if o == nil || o.Status == nil { @@ -227,35 +187,26 @@ func (o *Pet) SetStatus(v string) { o.Status = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Pet) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Category != nil { - toSerialize["category"] = o.Category - } - if o.Name == nil { - return nil, errors.New("Name is required and not nullable, but was not set on Pet") - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.PhotoUrls == nil { - return nil, errors.New("PhotoUrls is required and not nullable, but was not set on Pet") - } - if o.PhotoUrls != nil { - toSerialize["photoUrls"] = o.PhotoUrls - } - if o.Tags != nil { - toSerialize["tags"] = o.Tags - } - if o.Status != nil { - toSerialize["status"] = o.Status - } - return json.Marshal(toSerialize) +type NullablePet struct { + Value Pet + ExplicitNull bool } +func (v NullablePet) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullablePet) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go index 4ed8a25717..bdd9807ca8 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ReadOnlyFirst struct for ReadOnlyFirst type ReadOnlyFirst struct { Bar *string `json:"bar,omitempty"` - Baz *string `json:"baz,omitempty"` - } -// GetBar returns the Bar field if non-nil, zero value otherwise. +// GetBar returns the Bar field value if set, zero value otherwise. func (o *ReadOnlyFirst) GetBar() string { if o == nil || o.Bar == nil { var ret string @@ -28,7 +29,7 @@ func (o *ReadOnlyFirst) GetBar() string { return *o.Bar } -// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// GetBarOk returns a tuple with the Bar field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ReadOnlyFirst) GetBarOk() (string, bool) { if o == nil || o.Bar == nil { @@ -52,7 +53,7 @@ func (o *ReadOnlyFirst) SetBar(v string) { o.Bar = &v } -// GetBaz returns the Baz field if non-nil, zero value otherwise. +// GetBaz returns the Baz field value if set, zero value otherwise. func (o *ReadOnlyFirst) GetBaz() string { if o == nil || o.Baz == nil { var ret string @@ -61,7 +62,7 @@ func (o *ReadOnlyFirst) GetBaz() string { return *o.Baz } -// GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise +// GetBazOk returns a tuple with the Baz field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ReadOnlyFirst) GetBazOk() (string, bool) { if o == nil || o.Baz == nil { @@ -85,17 +86,26 @@ func (o *ReadOnlyFirst) SetBaz(v string) { o.Baz = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o ReadOnlyFirst) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Bar != nil { - toSerialize["bar"] = o.Bar - } - if o.Baz != nil { - toSerialize["baz"] = o.Baz - } - return json.Marshal(toSerialize) +type NullableReadOnlyFirst struct { + Value ReadOnlyFirst + ExplicitNull bool } +func (v NullableReadOnlyFirst) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableReadOnlyFirst) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_return.go b/samples/client/petstore/go-experimental/go-petstore/model_return.go index c694495fda..14821a5ca7 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_return.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_return.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // Return Model for testing reserved words type Return struct { Return *int32 `json:"return,omitempty"` - } -// GetReturn returns the Return field if non-nil, zero value otherwise. +// GetReturn returns the Return field value if set, zero value otherwise. func (o *Return) GetReturn() int32 { if o == nil || o.Return == nil { var ret int32 @@ -26,7 +28,7 @@ func (o *Return) GetReturn() int32 { return *o.Return } -// GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise +// GetReturnOk returns a tuple with the Return field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Return) GetReturnOk() (int32, bool) { if o == nil || o.Return == nil { @@ -50,14 +52,26 @@ func (o *Return) SetReturn(v int32) { o.Return = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Return) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Return != nil { - toSerialize["return"] = o.Return - } - return json.Marshal(toSerialize) +type NullableReturn struct { + Value Return + ExplicitNull bool } +func (v NullableReturn) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableReturn) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go index 5568361e1d..abafacb4e4 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // SpecialModelName struct for SpecialModelName type SpecialModelName struct { SpecialPropertyName *int64 `json:"$special[property.name],omitempty"` - } -// GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise. +// GetSpecialPropertyName returns the SpecialPropertyName field value if set, zero value otherwise. func (o *SpecialModelName) GetSpecialPropertyName() int64 { if o == nil || o.SpecialPropertyName == nil { var ret int64 @@ -26,7 +28,7 @@ func (o *SpecialModelName) GetSpecialPropertyName() int64 { return *o.SpecialPropertyName } -// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise +// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool) { if o == nil || o.SpecialPropertyName == nil { @@ -50,14 +52,26 @@ func (o *SpecialModelName) SetSpecialPropertyName(v int64) { o.SpecialPropertyName = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o SpecialModelName) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.SpecialPropertyName != nil { - toSerialize["$special[property.name]"] = o.SpecialPropertyName - } - return json.Marshal(toSerialize) +type NullableSpecialModelName struct { + Value SpecialModelName + ExplicitNull bool } +func (v NullableSpecialModelName) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableSpecialModelName) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/client/petstore/go-experimental/go-petstore/model_tag.go index 063283820e..a702f37f09 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_tag.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_tag.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // Tag struct for Tag type Tag struct { Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - } -// GetId returns the Id field if non-nil, zero value otherwise. +// GetId returns the Id field value if set, zero value otherwise. func (o *Tag) GetId() int64 { if o == nil || o.Id == nil { var ret int64 @@ -28,7 +29,7 @@ func (o *Tag) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Tag) GetIdOk() (int64, bool) { if o == nil || o.Id == nil { @@ -52,7 +53,7 @@ func (o *Tag) SetId(v int64) { o.Id = &v } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *Tag) GetName() string { if o == nil || o.Name == nil { var ret string @@ -61,7 +62,7 @@ func (o *Tag) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Tag) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -85,17 +86,26 @@ func (o *Tag) SetName(v string) { o.Name = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o Tag) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) +type NullableTag struct { + Value Tag + ExplicitNull bool } +func (v NullableTag) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableTag) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go index 7022b08254..173bd1c1b9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go @@ -8,224 +8,116 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // TypeHolderDefault struct for TypeHolderDefault type TypeHolderDefault struct { - StringItem *string `json:"string_item,omitempty"` - - NumberItem *float32 `json:"number_item,omitempty"` - - IntegerItem *int32 `json:"integer_item,omitempty"` - - BoolItem *bool `json:"bool_item,omitempty"` - - ArrayItem *[]int32 `json:"array_item,omitempty"` - + StringItem string `json:"string_item"` + NumberItem float32 `json:"number_item"` + IntegerItem int32 `json:"integer_item"` + BoolItem bool `json:"bool_item"` + ArrayItem []int32 `json:"array_item"` } -// GetStringItem returns the StringItem field if non-nil, zero value otherwise. +// GetStringItem returns the StringItem field value func (o *TypeHolderDefault) GetStringItem() string { - if o == nil || o.StringItem == nil { + if o == nil { var ret string return ret } - return *o.StringItem + + return o.StringItem } -// GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetStringItemOk() (string, bool) { - if o == nil || o.StringItem == nil { - var ret string - return ret, false - } - return *o.StringItem, true -} - -// HasStringItem returns a boolean if a field has been set. -func (o *TypeHolderDefault) HasStringItem() bool { - if o != nil && o.StringItem != nil { - return true - } - - return false -} - -// SetStringItem gets a reference to the given string and assigns it to the StringItem field. +// SetStringItem sets field value func (o *TypeHolderDefault) SetStringItem(v string) { - o.StringItem = &v + o.StringItem = v } -// GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. +// GetNumberItem returns the NumberItem field value func (o *TypeHolderDefault) GetNumberItem() float32 { - if o == nil || o.NumberItem == nil { + if o == nil { var ret float32 return ret } - return *o.NumberItem + + return o.NumberItem } -// GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetNumberItemOk() (float32, bool) { - if o == nil || o.NumberItem == nil { - var ret float32 - return ret, false - } - return *o.NumberItem, true -} - -// HasNumberItem returns a boolean if a field has been set. -func (o *TypeHolderDefault) HasNumberItem() bool { - if o != nil && o.NumberItem != nil { - return true - } - - return false -} - -// SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. +// SetNumberItem sets field value func (o *TypeHolderDefault) SetNumberItem(v float32) { - o.NumberItem = &v + o.NumberItem = v } -// GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. +// GetIntegerItem returns the IntegerItem field value func (o *TypeHolderDefault) GetIntegerItem() int32 { - if o == nil || o.IntegerItem == nil { + if o == nil { var ret int32 return ret } - return *o.IntegerItem + + return o.IntegerItem } -// GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetIntegerItemOk() (int32, bool) { - if o == nil || o.IntegerItem == nil { - var ret int32 - return ret, false - } - return *o.IntegerItem, true -} - -// HasIntegerItem returns a boolean if a field has been set. -func (o *TypeHolderDefault) HasIntegerItem() bool { - if o != nil && o.IntegerItem != nil { - return true - } - - return false -} - -// SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. +// SetIntegerItem sets field value func (o *TypeHolderDefault) SetIntegerItem(v int32) { - o.IntegerItem = &v + o.IntegerItem = v } -// GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. +// GetBoolItem returns the BoolItem field value func (o *TypeHolderDefault) GetBoolItem() bool { - if o == nil || o.BoolItem == nil { + if o == nil { var ret bool return ret } - return *o.BoolItem + + return o.BoolItem } -// GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetBoolItemOk() (bool, bool) { - if o == nil || o.BoolItem == nil { - var ret bool - return ret, false - } - return *o.BoolItem, true -} - -// HasBoolItem returns a boolean if a field has been set. -func (o *TypeHolderDefault) HasBoolItem() bool { - if o != nil && o.BoolItem != nil { - return true - } - - return false -} - -// SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. +// SetBoolItem sets field value func (o *TypeHolderDefault) SetBoolItem(v bool) { - o.BoolItem = &v + o.BoolItem = v } -// GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. +// GetArrayItem returns the ArrayItem field value func (o *TypeHolderDefault) GetArrayItem() []int32 { - if o == nil || o.ArrayItem == nil { + if o == nil { var ret []int32 return ret } - return *o.ArrayItem + + return o.ArrayItem } -// GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool) { - if o == nil || o.ArrayItem == nil { - var ret []int32 - return ret, false - } - return *o.ArrayItem, true -} - -// HasArrayItem returns a boolean if a field has been set. -func (o *TypeHolderDefault) HasArrayItem() bool { - if o != nil && o.ArrayItem != nil { - return true - } - - return false -} - -// SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. +// SetArrayItem sets field value func (o *TypeHolderDefault) SetArrayItem(v []int32) { - o.ArrayItem = &v + o.ArrayItem = v } - -// MarshalJSON returns the JSON representation of the model. -func (o TypeHolderDefault) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.StringItem == nil { - return nil, errors.New("StringItem is required and not nullable, but was not set on TypeHolderDefault") - } - if o.StringItem != nil { - toSerialize["string_item"] = o.StringItem - } - if o.NumberItem == nil { - return nil, errors.New("NumberItem is required and not nullable, but was not set on TypeHolderDefault") - } - if o.NumberItem != nil { - toSerialize["number_item"] = o.NumberItem - } - if o.IntegerItem == nil { - return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderDefault") - } - if o.IntegerItem != nil { - toSerialize["integer_item"] = o.IntegerItem - } - if o.BoolItem == nil { - return nil, errors.New("BoolItem is required and not nullable, but was not set on TypeHolderDefault") - } - if o.BoolItem != nil { - toSerialize["bool_item"] = o.BoolItem - } - if o.ArrayItem == nil { - return nil, errors.New("ArrayItem is required and not nullable, but was not set on TypeHolderDefault") - } - if o.ArrayItem != nil { - toSerialize["array_item"] = o.ArrayItem - } - return json.Marshal(toSerialize) +type NullableTypeHolderDefault struct { + Value TypeHolderDefault + ExplicitNull bool } +func (v NullableTypeHolderDefault) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableTypeHolderDefault) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go index e51025fcb7..6cd9a0867c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go @@ -8,265 +8,132 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // TypeHolderExample struct for TypeHolderExample type TypeHolderExample struct { - StringItem *string `json:"string_item,omitempty"` - - NumberItem *float32 `json:"number_item,omitempty"` - - FloatItem *float32 `json:"float_item,omitempty"` - - IntegerItem *int32 `json:"integer_item,omitempty"` - - BoolItem *bool `json:"bool_item,omitempty"` - - ArrayItem *[]int32 `json:"array_item,omitempty"` - + StringItem string `json:"string_item"` + NumberItem float32 `json:"number_item"` + FloatItem float32 `json:"float_item"` + IntegerItem int32 `json:"integer_item"` + BoolItem bool `json:"bool_item"` + ArrayItem []int32 `json:"array_item"` } -// GetStringItem returns the StringItem field if non-nil, zero value otherwise. +// GetStringItem returns the StringItem field value func (o *TypeHolderExample) GetStringItem() string { - if o == nil || o.StringItem == nil { + if o == nil { var ret string return ret } - return *o.StringItem + + return o.StringItem } -// GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetStringItemOk() (string, bool) { - if o == nil || o.StringItem == nil { - var ret string - return ret, false - } - return *o.StringItem, true -} - -// HasStringItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasStringItem() bool { - if o != nil && o.StringItem != nil { - return true - } - - return false -} - -// SetStringItem gets a reference to the given string and assigns it to the StringItem field. +// SetStringItem sets field value func (o *TypeHolderExample) SetStringItem(v string) { - o.StringItem = &v + o.StringItem = v } -// GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. +// GetNumberItem returns the NumberItem field value func (o *TypeHolderExample) GetNumberItem() float32 { - if o == nil || o.NumberItem == nil { + if o == nil { var ret float32 return ret } - return *o.NumberItem + + return o.NumberItem } -// GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetNumberItemOk() (float32, bool) { - if o == nil || o.NumberItem == nil { - var ret float32 - return ret, false - } - return *o.NumberItem, true -} - -// HasNumberItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasNumberItem() bool { - if o != nil && o.NumberItem != nil { - return true - } - - return false -} - -// SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. +// SetNumberItem sets field value func (o *TypeHolderExample) SetNumberItem(v float32) { - o.NumberItem = &v + o.NumberItem = v } -// GetFloatItem returns the FloatItem field if non-nil, zero value otherwise. +// GetFloatItem returns the FloatItem field value func (o *TypeHolderExample) GetFloatItem() float32 { - if o == nil || o.FloatItem == nil { + if o == nil { var ret float32 return ret } - return *o.FloatItem + + return o.FloatItem } -// GetFloatItemOk returns a tuple with the FloatItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetFloatItemOk() (float32, bool) { - if o == nil || o.FloatItem == nil { - var ret float32 - return ret, false - } - return *o.FloatItem, true -} - -// HasFloatItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasFloatItem() bool { - if o != nil && o.FloatItem != nil { - return true - } - - return false -} - -// SetFloatItem gets a reference to the given float32 and assigns it to the FloatItem field. +// SetFloatItem sets field value func (o *TypeHolderExample) SetFloatItem(v float32) { - o.FloatItem = &v + o.FloatItem = v } -// GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. +// GetIntegerItem returns the IntegerItem field value func (o *TypeHolderExample) GetIntegerItem() int32 { - if o == nil || o.IntegerItem == nil { + if o == nil { var ret int32 return ret } - return *o.IntegerItem + + return o.IntegerItem } -// GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetIntegerItemOk() (int32, bool) { - if o == nil || o.IntegerItem == nil { - var ret int32 - return ret, false - } - return *o.IntegerItem, true -} - -// HasIntegerItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasIntegerItem() bool { - if o != nil && o.IntegerItem != nil { - return true - } - - return false -} - -// SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. +// SetIntegerItem sets field value func (o *TypeHolderExample) SetIntegerItem(v int32) { - o.IntegerItem = &v + o.IntegerItem = v } -// GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. +// GetBoolItem returns the BoolItem field value func (o *TypeHolderExample) GetBoolItem() bool { - if o == nil || o.BoolItem == nil { + if o == nil { var ret bool return ret } - return *o.BoolItem + + return o.BoolItem } -// GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetBoolItemOk() (bool, bool) { - if o == nil || o.BoolItem == nil { - var ret bool - return ret, false - } - return *o.BoolItem, true -} - -// HasBoolItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasBoolItem() bool { - if o != nil && o.BoolItem != nil { - return true - } - - return false -} - -// SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. +// SetBoolItem sets field value func (o *TypeHolderExample) SetBoolItem(v bool) { - o.BoolItem = &v + o.BoolItem = v } -// GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. +// GetArrayItem returns the ArrayItem field value func (o *TypeHolderExample) GetArrayItem() []int32 { - if o == nil || o.ArrayItem == nil { + if o == nil { var ret []int32 return ret } - return *o.ArrayItem + + return o.ArrayItem } -// GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool) { - if o == nil || o.ArrayItem == nil { - var ret []int32 - return ret, false - } - return *o.ArrayItem, true -} - -// HasArrayItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasArrayItem() bool { - if o != nil && o.ArrayItem != nil { - return true - } - - return false -} - -// SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. +// SetArrayItem sets field value func (o *TypeHolderExample) SetArrayItem(v []int32) { - o.ArrayItem = &v + o.ArrayItem = v } - -// MarshalJSON returns the JSON representation of the model. -func (o TypeHolderExample) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.StringItem == nil { - return nil, errors.New("StringItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.StringItem != nil { - toSerialize["string_item"] = o.StringItem - } - if o.NumberItem == nil { - return nil, errors.New("NumberItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.NumberItem != nil { - toSerialize["number_item"] = o.NumberItem - } - if o.FloatItem == nil { - return nil, errors.New("FloatItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.FloatItem != nil { - toSerialize["float_item"] = o.FloatItem - } - if o.IntegerItem == nil { - return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.IntegerItem != nil { - toSerialize["integer_item"] = o.IntegerItem - } - if o.BoolItem == nil { - return nil, errors.New("BoolItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.BoolItem != nil { - toSerialize["bool_item"] = o.BoolItem - } - if o.ArrayItem == nil { - return nil, errors.New("ArrayItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.ArrayItem != nil { - toSerialize["array_item"] = o.ArrayItem - } - return json.Marshal(toSerialize) +type NullableTypeHolderExample struct { + Value TypeHolderExample + ExplicitNull bool } +func (v NullableTypeHolderExample) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableTypeHolderExample) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_user.go b/samples/client/petstore/go-experimental/go-petstore/model_user.go index 174a791aa7..4411c28479 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_user.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_user.go @@ -8,31 +8,26 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // User struct for User type User struct { Id *int64 `json:"id,omitempty"` - Username *string `json:"username,omitempty"` - FirstName *string `json:"firstName,omitempty"` - LastName *string `json:"lastName,omitempty"` - Email *string `json:"email,omitempty"` - Password *string `json:"password,omitempty"` - Phone *string `json:"phone,omitempty"` - // User Status UserStatus *int32 `json:"userStatus,omitempty"` - } -// GetId returns the Id field if non-nil, zero value otherwise. +// GetId returns the Id field value if set, zero value otherwise. func (o *User) GetId() int64 { if o == nil || o.Id == nil { var ret int64 @@ -41,7 +36,7 @@ func (o *User) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetIdOk() (int64, bool) { if o == nil || o.Id == nil { @@ -65,7 +60,7 @@ func (o *User) SetId(v int64) { o.Id = &v } -// GetUsername returns the Username field if non-nil, zero value otherwise. +// GetUsername returns the Username field value if set, zero value otherwise. func (o *User) GetUsername() string { if o == nil || o.Username == nil { var ret string @@ -74,7 +69,7 @@ func (o *User) GetUsername() string { return *o.Username } -// GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +// GetUsernameOk returns a tuple with the Username field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetUsernameOk() (string, bool) { if o == nil || o.Username == nil { @@ -98,7 +93,7 @@ func (o *User) SetUsername(v string) { o.Username = &v } -// GetFirstName returns the FirstName field if non-nil, zero value otherwise. +// GetFirstName returns the FirstName field value if set, zero value otherwise. func (o *User) GetFirstName() string { if o == nil || o.FirstName == nil { var ret string @@ -107,7 +102,7 @@ func (o *User) GetFirstName() string { return *o.FirstName } -// GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +// GetFirstNameOk returns a tuple with the FirstName field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetFirstNameOk() (string, bool) { if o == nil || o.FirstName == nil { @@ -131,7 +126,7 @@ func (o *User) SetFirstName(v string) { o.FirstName = &v } -// GetLastName returns the LastName field if non-nil, zero value otherwise. +// GetLastName returns the LastName field value if set, zero value otherwise. func (o *User) GetLastName() string { if o == nil || o.LastName == nil { var ret string @@ -140,7 +135,7 @@ func (o *User) GetLastName() string { return *o.LastName } -// GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +// GetLastNameOk returns a tuple with the LastName field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetLastNameOk() (string, bool) { if o == nil || o.LastName == nil { @@ -164,7 +159,7 @@ func (o *User) SetLastName(v string) { o.LastName = &v } -// GetEmail returns the Email field if non-nil, zero value otherwise. +// GetEmail returns the Email field value if set, zero value otherwise. func (o *User) GetEmail() string { if o == nil || o.Email == nil { var ret string @@ -173,7 +168,7 @@ func (o *User) GetEmail() string { return *o.Email } -// GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +// GetEmailOk returns a tuple with the Email field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetEmailOk() (string, bool) { if o == nil || o.Email == nil { @@ -197,7 +192,7 @@ func (o *User) SetEmail(v string) { o.Email = &v } -// GetPassword returns the Password field if non-nil, zero value otherwise. +// GetPassword returns the Password field value if set, zero value otherwise. func (o *User) GetPassword() string { if o == nil || o.Password == nil { var ret string @@ -206,7 +201,7 @@ func (o *User) GetPassword() string { return *o.Password } -// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +// GetPasswordOk returns a tuple with the Password field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetPasswordOk() (string, bool) { if o == nil || o.Password == nil { @@ -230,7 +225,7 @@ func (o *User) SetPassword(v string) { o.Password = &v } -// GetPhone returns the Phone field if non-nil, zero value otherwise. +// GetPhone returns the Phone field value if set, zero value otherwise. func (o *User) GetPhone() string { if o == nil || o.Phone == nil { var ret string @@ -239,7 +234,7 @@ func (o *User) GetPhone() string { return *o.Phone } -// GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +// GetPhoneOk returns a tuple with the Phone field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetPhoneOk() (string, bool) { if o == nil || o.Phone == nil { @@ -263,7 +258,7 @@ func (o *User) SetPhone(v string) { o.Phone = &v } -// GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. +// GetUserStatus returns the UserStatus field value if set, zero value otherwise. func (o *User) GetUserStatus() int32 { if o == nil || o.UserStatus == nil { var ret int32 @@ -272,7 +267,7 @@ func (o *User) GetUserStatus() int32 { return *o.UserStatus } -// GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise +// GetUserStatusOk returns a tuple with the UserStatus field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetUserStatusOk() (int32, bool) { if o == nil || o.UserStatus == nil { @@ -296,35 +291,26 @@ func (o *User) SetUserStatus(v int32) { o.UserStatus = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o User) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Username != nil { - toSerialize["username"] = o.Username - } - if o.FirstName != nil { - toSerialize["firstName"] = o.FirstName - } - if o.LastName != nil { - toSerialize["lastName"] = o.LastName - } - if o.Email != nil { - toSerialize["email"] = o.Email - } - if o.Password != nil { - toSerialize["password"] = o.Password - } - if o.Phone != nil { - toSerialize["phone"] = o.Phone - } - if o.UserStatus != nil { - toSerialize["userStatus"] = o.UserStatus - } - return json.Marshal(toSerialize) +type NullableUser struct { + Value User + ExplicitNull bool } +func (v NullableUser) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go index e1b9efa8e0..ddf16b8424 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go @@ -8,72 +8,46 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // XmlItem struct for XmlItem type XmlItem struct { AttributeString *string `json:"attribute_string,omitempty"` - AttributeNumber *float32 `json:"attribute_number,omitempty"` - AttributeInteger *int32 `json:"attribute_integer,omitempty"` - AttributeBoolean *bool `json:"attribute_boolean,omitempty"` - WrappedArray *[]int32 `json:"wrapped_array,omitempty"` - NameString *string `json:"name_string,omitempty"` - NameNumber *float32 `json:"name_number,omitempty"` - NameInteger *int32 `json:"name_integer,omitempty"` - NameBoolean *bool `json:"name_boolean,omitempty"` - NameArray *[]int32 `json:"name_array,omitempty"` - NameWrappedArray *[]int32 `json:"name_wrapped_array,omitempty"` - PrefixString *string `json:"prefix_string,omitempty"` - PrefixNumber *float32 `json:"prefix_number,omitempty"` - PrefixInteger *int32 `json:"prefix_integer,omitempty"` - PrefixBoolean *bool `json:"prefix_boolean,omitempty"` - PrefixArray *[]int32 `json:"prefix_array,omitempty"` - PrefixWrappedArray *[]int32 `json:"prefix_wrapped_array,omitempty"` - NamespaceString *string `json:"namespace_string,omitempty"` - NamespaceNumber *float32 `json:"namespace_number,omitempty"` - NamespaceInteger *int32 `json:"namespace_integer,omitempty"` - NamespaceBoolean *bool `json:"namespace_boolean,omitempty"` - NamespaceArray *[]int32 `json:"namespace_array,omitempty"` - NamespaceWrappedArray *[]int32 `json:"namespace_wrapped_array,omitempty"` - PrefixNsString *string `json:"prefix_ns_string,omitempty"` - PrefixNsNumber *float32 `json:"prefix_ns_number,omitempty"` - PrefixNsInteger *int32 `json:"prefix_ns_integer,omitempty"` - PrefixNsBoolean *bool `json:"prefix_ns_boolean,omitempty"` - PrefixNsArray *[]int32 `json:"prefix_ns_array,omitempty"` - PrefixNsWrappedArray *[]int32 `json:"prefix_ns_wrapped_array,omitempty"` - } -// GetAttributeString returns the AttributeString field if non-nil, zero value otherwise. +// GetAttributeString returns the AttributeString field value if set, zero value otherwise. func (o *XmlItem) GetAttributeString() string { if o == nil || o.AttributeString == nil { var ret string @@ -82,7 +56,7 @@ func (o *XmlItem) GetAttributeString() string { return *o.AttributeString } -// GetAttributeStringOk returns a tuple with the AttributeString field if it's non-nil, zero value otherwise +// GetAttributeStringOk returns a tuple with the AttributeString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetAttributeStringOk() (string, bool) { if o == nil || o.AttributeString == nil { @@ -106,7 +80,7 @@ func (o *XmlItem) SetAttributeString(v string) { o.AttributeString = &v } -// GetAttributeNumber returns the AttributeNumber field if non-nil, zero value otherwise. +// GetAttributeNumber returns the AttributeNumber field value if set, zero value otherwise. func (o *XmlItem) GetAttributeNumber() float32 { if o == nil || o.AttributeNumber == nil { var ret float32 @@ -115,7 +89,7 @@ func (o *XmlItem) GetAttributeNumber() float32 { return *o.AttributeNumber } -// GetAttributeNumberOk returns a tuple with the AttributeNumber field if it's non-nil, zero value otherwise +// GetAttributeNumberOk returns a tuple with the AttributeNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetAttributeNumberOk() (float32, bool) { if o == nil || o.AttributeNumber == nil { @@ -139,7 +113,7 @@ func (o *XmlItem) SetAttributeNumber(v float32) { o.AttributeNumber = &v } -// GetAttributeInteger returns the AttributeInteger field if non-nil, zero value otherwise. +// GetAttributeInteger returns the AttributeInteger field value if set, zero value otherwise. func (o *XmlItem) GetAttributeInteger() int32 { if o == nil || o.AttributeInteger == nil { var ret int32 @@ -148,7 +122,7 @@ func (o *XmlItem) GetAttributeInteger() int32 { return *o.AttributeInteger } -// GetAttributeIntegerOk returns a tuple with the AttributeInteger field if it's non-nil, zero value otherwise +// GetAttributeIntegerOk returns a tuple with the AttributeInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetAttributeIntegerOk() (int32, bool) { if o == nil || o.AttributeInteger == nil { @@ -172,7 +146,7 @@ func (o *XmlItem) SetAttributeInteger(v int32) { o.AttributeInteger = &v } -// GetAttributeBoolean returns the AttributeBoolean field if non-nil, zero value otherwise. +// GetAttributeBoolean returns the AttributeBoolean field value if set, zero value otherwise. func (o *XmlItem) GetAttributeBoolean() bool { if o == nil || o.AttributeBoolean == nil { var ret bool @@ -181,7 +155,7 @@ func (o *XmlItem) GetAttributeBoolean() bool { return *o.AttributeBoolean } -// GetAttributeBooleanOk returns a tuple with the AttributeBoolean field if it's non-nil, zero value otherwise +// GetAttributeBooleanOk returns a tuple with the AttributeBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetAttributeBooleanOk() (bool, bool) { if o == nil || o.AttributeBoolean == nil { @@ -205,7 +179,7 @@ func (o *XmlItem) SetAttributeBoolean(v bool) { o.AttributeBoolean = &v } -// GetWrappedArray returns the WrappedArray field if non-nil, zero value otherwise. +// GetWrappedArray returns the WrappedArray field value if set, zero value otherwise. func (o *XmlItem) GetWrappedArray() []int32 { if o == nil || o.WrappedArray == nil { var ret []int32 @@ -214,7 +188,7 @@ func (o *XmlItem) GetWrappedArray() []int32 { return *o.WrappedArray } -// GetWrappedArrayOk returns a tuple with the WrappedArray field if it's non-nil, zero value otherwise +// GetWrappedArrayOk returns a tuple with the WrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool) { if o == nil || o.WrappedArray == nil { @@ -238,7 +212,7 @@ func (o *XmlItem) SetWrappedArray(v []int32) { o.WrappedArray = &v } -// GetNameString returns the NameString field if non-nil, zero value otherwise. +// GetNameString returns the NameString field value if set, zero value otherwise. func (o *XmlItem) GetNameString() string { if o == nil || o.NameString == nil { var ret string @@ -247,7 +221,7 @@ func (o *XmlItem) GetNameString() string { return *o.NameString } -// GetNameStringOk returns a tuple with the NameString field if it's non-nil, zero value otherwise +// GetNameStringOk returns a tuple with the NameString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameStringOk() (string, bool) { if o == nil || o.NameString == nil { @@ -271,7 +245,7 @@ func (o *XmlItem) SetNameString(v string) { o.NameString = &v } -// GetNameNumber returns the NameNumber field if non-nil, zero value otherwise. +// GetNameNumber returns the NameNumber field value if set, zero value otherwise. func (o *XmlItem) GetNameNumber() float32 { if o == nil || o.NameNumber == nil { var ret float32 @@ -280,7 +254,7 @@ func (o *XmlItem) GetNameNumber() float32 { return *o.NameNumber } -// GetNameNumberOk returns a tuple with the NameNumber field if it's non-nil, zero value otherwise +// GetNameNumberOk returns a tuple with the NameNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameNumberOk() (float32, bool) { if o == nil || o.NameNumber == nil { @@ -304,7 +278,7 @@ func (o *XmlItem) SetNameNumber(v float32) { o.NameNumber = &v } -// GetNameInteger returns the NameInteger field if non-nil, zero value otherwise. +// GetNameInteger returns the NameInteger field value if set, zero value otherwise. func (o *XmlItem) GetNameInteger() int32 { if o == nil || o.NameInteger == nil { var ret int32 @@ -313,7 +287,7 @@ func (o *XmlItem) GetNameInteger() int32 { return *o.NameInteger } -// GetNameIntegerOk returns a tuple with the NameInteger field if it's non-nil, zero value otherwise +// GetNameIntegerOk returns a tuple with the NameInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameIntegerOk() (int32, bool) { if o == nil || o.NameInteger == nil { @@ -337,7 +311,7 @@ func (o *XmlItem) SetNameInteger(v int32) { o.NameInteger = &v } -// GetNameBoolean returns the NameBoolean field if non-nil, zero value otherwise. +// GetNameBoolean returns the NameBoolean field value if set, zero value otherwise. func (o *XmlItem) GetNameBoolean() bool { if o == nil || o.NameBoolean == nil { var ret bool @@ -346,7 +320,7 @@ func (o *XmlItem) GetNameBoolean() bool { return *o.NameBoolean } -// GetNameBooleanOk returns a tuple with the NameBoolean field if it's non-nil, zero value otherwise +// GetNameBooleanOk returns a tuple with the NameBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameBooleanOk() (bool, bool) { if o == nil || o.NameBoolean == nil { @@ -370,7 +344,7 @@ func (o *XmlItem) SetNameBoolean(v bool) { o.NameBoolean = &v } -// GetNameArray returns the NameArray field if non-nil, zero value otherwise. +// GetNameArray returns the NameArray field value if set, zero value otherwise. func (o *XmlItem) GetNameArray() []int32 { if o == nil || o.NameArray == nil { var ret []int32 @@ -379,7 +353,7 @@ func (o *XmlItem) GetNameArray() []int32 { return *o.NameArray } -// GetNameArrayOk returns a tuple with the NameArray field if it's non-nil, zero value otherwise +// GetNameArrayOk returns a tuple with the NameArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameArrayOk() ([]int32, bool) { if o == nil || o.NameArray == nil { @@ -403,7 +377,7 @@ func (o *XmlItem) SetNameArray(v []int32) { o.NameArray = &v } -// GetNameWrappedArray returns the NameWrappedArray field if non-nil, zero value otherwise. +// GetNameWrappedArray returns the NameWrappedArray field value if set, zero value otherwise. func (o *XmlItem) GetNameWrappedArray() []int32 { if o == nil || o.NameWrappedArray == nil { var ret []int32 @@ -412,7 +386,7 @@ func (o *XmlItem) GetNameWrappedArray() []int32 { return *o.NameWrappedArray } -// GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field if it's non-nil, zero value otherwise +// GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool) { if o == nil || o.NameWrappedArray == nil { @@ -436,7 +410,7 @@ func (o *XmlItem) SetNameWrappedArray(v []int32) { o.NameWrappedArray = &v } -// GetPrefixString returns the PrefixString field if non-nil, zero value otherwise. +// GetPrefixString returns the PrefixString field value if set, zero value otherwise. func (o *XmlItem) GetPrefixString() string { if o == nil || o.PrefixString == nil { var ret string @@ -445,7 +419,7 @@ func (o *XmlItem) GetPrefixString() string { return *o.PrefixString } -// GetPrefixStringOk returns a tuple with the PrefixString field if it's non-nil, zero value otherwise +// GetPrefixStringOk returns a tuple with the PrefixString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixStringOk() (string, bool) { if o == nil || o.PrefixString == nil { @@ -469,7 +443,7 @@ func (o *XmlItem) SetPrefixString(v string) { o.PrefixString = &v } -// GetPrefixNumber returns the PrefixNumber field if non-nil, zero value otherwise. +// GetPrefixNumber returns the PrefixNumber field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNumber() float32 { if o == nil || o.PrefixNumber == nil { var ret float32 @@ -478,7 +452,7 @@ func (o *XmlItem) GetPrefixNumber() float32 { return *o.PrefixNumber } -// GetPrefixNumberOk returns a tuple with the PrefixNumber field if it's non-nil, zero value otherwise +// GetPrefixNumberOk returns a tuple with the PrefixNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNumberOk() (float32, bool) { if o == nil || o.PrefixNumber == nil { @@ -502,7 +476,7 @@ func (o *XmlItem) SetPrefixNumber(v float32) { o.PrefixNumber = &v } -// GetPrefixInteger returns the PrefixInteger field if non-nil, zero value otherwise. +// GetPrefixInteger returns the PrefixInteger field value if set, zero value otherwise. func (o *XmlItem) GetPrefixInteger() int32 { if o == nil || o.PrefixInteger == nil { var ret int32 @@ -511,7 +485,7 @@ func (o *XmlItem) GetPrefixInteger() int32 { return *o.PrefixInteger } -// GetPrefixIntegerOk returns a tuple with the PrefixInteger field if it's non-nil, zero value otherwise +// GetPrefixIntegerOk returns a tuple with the PrefixInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixIntegerOk() (int32, bool) { if o == nil || o.PrefixInteger == nil { @@ -535,7 +509,7 @@ func (o *XmlItem) SetPrefixInteger(v int32) { o.PrefixInteger = &v } -// GetPrefixBoolean returns the PrefixBoolean field if non-nil, zero value otherwise. +// GetPrefixBoolean returns the PrefixBoolean field value if set, zero value otherwise. func (o *XmlItem) GetPrefixBoolean() bool { if o == nil || o.PrefixBoolean == nil { var ret bool @@ -544,7 +518,7 @@ func (o *XmlItem) GetPrefixBoolean() bool { return *o.PrefixBoolean } -// GetPrefixBooleanOk returns a tuple with the PrefixBoolean field if it's non-nil, zero value otherwise +// GetPrefixBooleanOk returns a tuple with the PrefixBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixBooleanOk() (bool, bool) { if o == nil || o.PrefixBoolean == nil { @@ -568,7 +542,7 @@ func (o *XmlItem) SetPrefixBoolean(v bool) { o.PrefixBoolean = &v } -// GetPrefixArray returns the PrefixArray field if non-nil, zero value otherwise. +// GetPrefixArray returns the PrefixArray field value if set, zero value otherwise. func (o *XmlItem) GetPrefixArray() []int32 { if o == nil || o.PrefixArray == nil { var ret []int32 @@ -577,7 +551,7 @@ func (o *XmlItem) GetPrefixArray() []int32 { return *o.PrefixArray } -// GetPrefixArrayOk returns a tuple with the PrefixArray field if it's non-nil, zero value otherwise +// GetPrefixArrayOk returns a tuple with the PrefixArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool) { if o == nil || o.PrefixArray == nil { @@ -601,7 +575,7 @@ func (o *XmlItem) SetPrefixArray(v []int32) { o.PrefixArray = &v } -// GetPrefixWrappedArray returns the PrefixWrappedArray field if non-nil, zero value otherwise. +// GetPrefixWrappedArray returns the PrefixWrappedArray field value if set, zero value otherwise. func (o *XmlItem) GetPrefixWrappedArray() []int32 { if o == nil || o.PrefixWrappedArray == nil { var ret []int32 @@ -610,7 +584,7 @@ func (o *XmlItem) GetPrefixWrappedArray() []int32 { return *o.PrefixWrappedArray } -// GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field if it's non-nil, zero value otherwise +// GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool) { if o == nil || o.PrefixWrappedArray == nil { @@ -634,7 +608,7 @@ func (o *XmlItem) SetPrefixWrappedArray(v []int32) { o.PrefixWrappedArray = &v } -// GetNamespaceString returns the NamespaceString field if non-nil, zero value otherwise. +// GetNamespaceString returns the NamespaceString field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceString() string { if o == nil || o.NamespaceString == nil { var ret string @@ -643,7 +617,7 @@ func (o *XmlItem) GetNamespaceString() string { return *o.NamespaceString } -// GetNamespaceStringOk returns a tuple with the NamespaceString field if it's non-nil, zero value otherwise +// GetNamespaceStringOk returns a tuple with the NamespaceString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceStringOk() (string, bool) { if o == nil || o.NamespaceString == nil { @@ -667,7 +641,7 @@ func (o *XmlItem) SetNamespaceString(v string) { o.NamespaceString = &v } -// GetNamespaceNumber returns the NamespaceNumber field if non-nil, zero value otherwise. +// GetNamespaceNumber returns the NamespaceNumber field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceNumber() float32 { if o == nil || o.NamespaceNumber == nil { var ret float32 @@ -676,7 +650,7 @@ func (o *XmlItem) GetNamespaceNumber() float32 { return *o.NamespaceNumber } -// GetNamespaceNumberOk returns a tuple with the NamespaceNumber field if it's non-nil, zero value otherwise +// GetNamespaceNumberOk returns a tuple with the NamespaceNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceNumberOk() (float32, bool) { if o == nil || o.NamespaceNumber == nil { @@ -700,7 +674,7 @@ func (o *XmlItem) SetNamespaceNumber(v float32) { o.NamespaceNumber = &v } -// GetNamespaceInteger returns the NamespaceInteger field if non-nil, zero value otherwise. +// GetNamespaceInteger returns the NamespaceInteger field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceInteger() int32 { if o == nil || o.NamespaceInteger == nil { var ret int32 @@ -709,7 +683,7 @@ func (o *XmlItem) GetNamespaceInteger() int32 { return *o.NamespaceInteger } -// GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field if it's non-nil, zero value otherwise +// GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool) { if o == nil || o.NamespaceInteger == nil { @@ -733,7 +707,7 @@ func (o *XmlItem) SetNamespaceInteger(v int32) { o.NamespaceInteger = &v } -// GetNamespaceBoolean returns the NamespaceBoolean field if non-nil, zero value otherwise. +// GetNamespaceBoolean returns the NamespaceBoolean field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceBoolean() bool { if o == nil || o.NamespaceBoolean == nil { var ret bool @@ -742,7 +716,7 @@ func (o *XmlItem) GetNamespaceBoolean() bool { return *o.NamespaceBoolean } -// GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field if it's non-nil, zero value otherwise +// GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool) { if o == nil || o.NamespaceBoolean == nil { @@ -766,7 +740,7 @@ func (o *XmlItem) SetNamespaceBoolean(v bool) { o.NamespaceBoolean = &v } -// GetNamespaceArray returns the NamespaceArray field if non-nil, zero value otherwise. +// GetNamespaceArray returns the NamespaceArray field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceArray() []int32 { if o == nil || o.NamespaceArray == nil { var ret []int32 @@ -775,7 +749,7 @@ func (o *XmlItem) GetNamespaceArray() []int32 { return *o.NamespaceArray } -// GetNamespaceArrayOk returns a tuple with the NamespaceArray field if it's non-nil, zero value otherwise +// GetNamespaceArrayOk returns a tuple with the NamespaceArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool) { if o == nil || o.NamespaceArray == nil { @@ -799,7 +773,7 @@ func (o *XmlItem) SetNamespaceArray(v []int32) { o.NamespaceArray = &v } -// GetNamespaceWrappedArray returns the NamespaceWrappedArray field if non-nil, zero value otherwise. +// GetNamespaceWrappedArray returns the NamespaceWrappedArray field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceWrappedArray() []int32 { if o == nil || o.NamespaceWrappedArray == nil { var ret []int32 @@ -808,7 +782,7 @@ func (o *XmlItem) GetNamespaceWrappedArray() []int32 { return *o.NamespaceWrappedArray } -// GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field if it's non-nil, zero value otherwise +// GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool) { if o == nil || o.NamespaceWrappedArray == nil { @@ -832,7 +806,7 @@ func (o *XmlItem) SetNamespaceWrappedArray(v []int32) { o.NamespaceWrappedArray = &v } -// GetPrefixNsString returns the PrefixNsString field if non-nil, zero value otherwise. +// GetPrefixNsString returns the PrefixNsString field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsString() string { if o == nil || o.PrefixNsString == nil { var ret string @@ -841,7 +815,7 @@ func (o *XmlItem) GetPrefixNsString() string { return *o.PrefixNsString } -// GetPrefixNsStringOk returns a tuple with the PrefixNsString field if it's non-nil, zero value otherwise +// GetPrefixNsStringOk returns a tuple with the PrefixNsString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsStringOk() (string, bool) { if o == nil || o.PrefixNsString == nil { @@ -865,7 +839,7 @@ func (o *XmlItem) SetPrefixNsString(v string) { o.PrefixNsString = &v } -// GetPrefixNsNumber returns the PrefixNsNumber field if non-nil, zero value otherwise. +// GetPrefixNsNumber returns the PrefixNsNumber field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsNumber() float32 { if o == nil || o.PrefixNsNumber == nil { var ret float32 @@ -874,7 +848,7 @@ func (o *XmlItem) GetPrefixNsNumber() float32 { return *o.PrefixNsNumber } -// GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field if it's non-nil, zero value otherwise +// GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool) { if o == nil || o.PrefixNsNumber == nil { @@ -898,7 +872,7 @@ func (o *XmlItem) SetPrefixNsNumber(v float32) { o.PrefixNsNumber = &v } -// GetPrefixNsInteger returns the PrefixNsInteger field if non-nil, zero value otherwise. +// GetPrefixNsInteger returns the PrefixNsInteger field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsInteger() int32 { if o == nil || o.PrefixNsInteger == nil { var ret int32 @@ -907,7 +881,7 @@ func (o *XmlItem) GetPrefixNsInteger() int32 { return *o.PrefixNsInteger } -// GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field if it's non-nil, zero value otherwise +// GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool) { if o == nil || o.PrefixNsInteger == nil { @@ -931,7 +905,7 @@ func (o *XmlItem) SetPrefixNsInteger(v int32) { o.PrefixNsInteger = &v } -// GetPrefixNsBoolean returns the PrefixNsBoolean field if non-nil, zero value otherwise. +// GetPrefixNsBoolean returns the PrefixNsBoolean field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsBoolean() bool { if o == nil || o.PrefixNsBoolean == nil { var ret bool @@ -940,7 +914,7 @@ func (o *XmlItem) GetPrefixNsBoolean() bool { return *o.PrefixNsBoolean } -// GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field if it's non-nil, zero value otherwise +// GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool) { if o == nil || o.PrefixNsBoolean == nil { @@ -964,7 +938,7 @@ func (o *XmlItem) SetPrefixNsBoolean(v bool) { o.PrefixNsBoolean = &v } -// GetPrefixNsArray returns the PrefixNsArray field if non-nil, zero value otherwise. +// GetPrefixNsArray returns the PrefixNsArray field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsArray() []int32 { if o == nil || o.PrefixNsArray == nil { var ret []int32 @@ -973,7 +947,7 @@ func (o *XmlItem) GetPrefixNsArray() []int32 { return *o.PrefixNsArray } -// GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field if it's non-nil, zero value otherwise +// GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool) { if o == nil || o.PrefixNsArray == nil { @@ -997,7 +971,7 @@ func (o *XmlItem) SetPrefixNsArray(v []int32) { o.PrefixNsArray = &v } -// GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field if non-nil, zero value otherwise. +// GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsWrappedArray() []int32 { if o == nil || o.PrefixNsWrappedArray == nil { var ret []int32 @@ -1006,7 +980,7 @@ func (o *XmlItem) GetPrefixNsWrappedArray() []int32 { return *o.PrefixNsWrappedArray } -// GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field if it's non-nil, zero value otherwise +// GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) { if o == nil || o.PrefixNsWrappedArray == nil { @@ -1030,98 +1004,26 @@ func (o *XmlItem) SetPrefixNsWrappedArray(v []int32) { o.PrefixNsWrappedArray = &v } - -// MarshalJSON returns the JSON representation of the model. -func (o XmlItem) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AttributeString != nil { - toSerialize["attribute_string"] = o.AttributeString - } - if o.AttributeNumber != nil { - toSerialize["attribute_number"] = o.AttributeNumber - } - if o.AttributeInteger != nil { - toSerialize["attribute_integer"] = o.AttributeInteger - } - if o.AttributeBoolean != nil { - toSerialize["attribute_boolean"] = o.AttributeBoolean - } - if o.WrappedArray != nil { - toSerialize["wrapped_array"] = o.WrappedArray - } - if o.NameString != nil { - toSerialize["name_string"] = o.NameString - } - if o.NameNumber != nil { - toSerialize["name_number"] = o.NameNumber - } - if o.NameInteger != nil { - toSerialize["name_integer"] = o.NameInteger - } - if o.NameBoolean != nil { - toSerialize["name_boolean"] = o.NameBoolean - } - if o.NameArray != nil { - toSerialize["name_array"] = o.NameArray - } - if o.NameWrappedArray != nil { - toSerialize["name_wrapped_array"] = o.NameWrappedArray - } - if o.PrefixString != nil { - toSerialize["prefix_string"] = o.PrefixString - } - if o.PrefixNumber != nil { - toSerialize["prefix_number"] = o.PrefixNumber - } - if o.PrefixInteger != nil { - toSerialize["prefix_integer"] = o.PrefixInteger - } - if o.PrefixBoolean != nil { - toSerialize["prefix_boolean"] = o.PrefixBoolean - } - if o.PrefixArray != nil { - toSerialize["prefix_array"] = o.PrefixArray - } - if o.PrefixWrappedArray != nil { - toSerialize["prefix_wrapped_array"] = o.PrefixWrappedArray - } - if o.NamespaceString != nil { - toSerialize["namespace_string"] = o.NamespaceString - } - if o.NamespaceNumber != nil { - toSerialize["namespace_number"] = o.NamespaceNumber - } - if o.NamespaceInteger != nil { - toSerialize["namespace_integer"] = o.NamespaceInteger - } - if o.NamespaceBoolean != nil { - toSerialize["namespace_boolean"] = o.NamespaceBoolean - } - if o.NamespaceArray != nil { - toSerialize["namespace_array"] = o.NamespaceArray - } - if o.NamespaceWrappedArray != nil { - toSerialize["namespace_wrapped_array"] = o.NamespaceWrappedArray - } - if o.PrefixNsString != nil { - toSerialize["prefix_ns_string"] = o.PrefixNsString - } - if o.PrefixNsNumber != nil { - toSerialize["prefix_ns_number"] = o.PrefixNsNumber - } - if o.PrefixNsInteger != nil { - toSerialize["prefix_ns_integer"] = o.PrefixNsInteger - } - if o.PrefixNsBoolean != nil { - toSerialize["prefix_ns_boolean"] = o.PrefixNsBoolean - } - if o.PrefixNsArray != nil { - toSerialize["prefix_ns_array"] = o.PrefixNsArray - } - if o.PrefixNsWrappedArray != nil { - toSerialize["prefix_ns_wrapped_array"] = o.PrefixNsWrappedArray - } - return json.Marshal(toSerialize) +type NullableXmlItem struct { + Value XmlItem + ExplicitNull bool } +func (v NullableXmlItem) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableXmlItem) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/utils.go b/samples/client/petstore/go-experimental/go-petstore/utils.go index 8d2130be3f..3a3303b244 100644 --- a/samples/client/petstore/go-experimental/go-petstore/utils.go +++ b/samples/client/petstore/go-experimental/go-petstore/utils.go @@ -9,7 +9,14 @@ package petstore -import "time" +import ( + "bytes" + "encoding/json" + "errors" + "time" +) + +var ErrInvalidNullable = errors.New("nullable cannot have non-zero Value and ExplicitNull simultaneously") // PtrBool is a helper routine that returns a pointer to given integer value. func PtrBool(v bool) *bool { return &v } @@ -23,9 +30,6 @@ func PtrInt32(v int32) *int32 { return &v } // PtrInt64 is a helper routine that returns a pointer to given integer value. func PtrInt64(v int64) *int64 { return &v } -// PtrFloat is a helper routine that returns a pointer to given float value. -func PtrFloat(v float32) *float32 { return &v } - // PtrFloat32 is a helper routine that returns a pointer to given float value. func PtrFloat32(v float32) *float32 { return &v } @@ -36,4 +40,205 @@ func PtrFloat64(v float64) *float64 { return &v } func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } \ No newline at end of file +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + Value bool + ExplicitNull bool +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt struct { + Value int + ExplicitNull bool +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt32 struct { + Value int32 + ExplicitNull bool +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt64 struct { + Value int64 + ExplicitNull bool +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableFloat32 struct { + Value float32 + ExplicitNull bool +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0.0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableFloat64 struct { + Value float64 + ExplicitNull bool +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0.0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableString struct { + Value string + ExplicitNull bool +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != "": + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableTime struct { + Value time.Time + ExplicitNull bool +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && !v.Value.IsZero(): + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return v.Value.MarshalJSON() + } +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} \ No newline at end of file diff --git a/samples/client/petstore/go-experimental/pet_api_test.go b/samples/client/petstore/go-experimental/pet_api_test.go index c1e8006bb0..847aa517af 100644 --- a/samples/client/petstore/go-experimental/pet_api_test.go +++ b/samples/client/petstore/go-experimental/pet_api_test.go @@ -28,8 +28,8 @@ func TestMain(m *testing.M) { } func TestAddPet(t *testing.T) { - newPet := (sw.Pet{Id: sw.PtrInt64(12830), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12830), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) @@ -286,7 +286,7 @@ func isPetCorrect(t *testing.T, id int64, name string, status string) { t.Fatalf("Error while getting pet by id: %v", err) } else { assert.Equal(*resp.Id, int64(id), "Pet id should be equal") - assert.Equal(*resp.Name, name, fmt.Sprintf("Pet name should be %s", name)) + assert.Equal(resp.Name, name, fmt.Sprintf("Pet name should be %s", name)) assert.Equal(*resp.Status, status, fmt.Sprintf("Pet status should be %s", status)) //t.Log(resp) diff --git a/samples/client/petstore/go-experimental/user_api_test.go b/samples/client/petstore/go-experimental/user_api_test.go index 07b82ebb97..8826087020 100644 --- a/samples/client/petstore/go-experimental/user_api_test.go +++ b/samples/client/petstore/go-experimental/user_api_test.go @@ -14,7 +14,7 @@ func TestCreateUser(t *testing.T) { Id: sw.PtrInt64(1000), FirstName: sw.PtrString("gopher"), LastName: sw.PtrString("lang"), - Username: sw.PtrString("gopher"), + Username: sw.PtrString("gopher"), Password: sw.PtrString("lang"), Email: sw.PtrString("lang@test.com"), Phone: sw.PtrString("5101112222"), diff --git a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go index 8402309be6..a18998d721 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go @@ -97,7 +97,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_fake.go index c08e9e995e..5a634ae806 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake.go @@ -177,7 +177,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -279,7 +278,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -377,7 +375,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -475,7 +472,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -701,7 +697,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go index 9db5a88cd3..590326d223 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go @@ -109,7 +109,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go index 940991f0b6..07d9ab7765 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go @@ -693,7 +693,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -799,7 +798,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_store.go b/samples/client/petstore/go/go-petstore-withXml/api_store.go index f633003003..00ec8cb99c 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_store.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_store.go @@ -175,7 +175,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md index 0b9deb0c58..2c22f8f1b3 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## Call123TestSpecialTags > Client Call123TestSpecialTags(ctx, body) + To test special tags To test special tags and operation ID starting with number diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md index 9aaf2e63a9..1d85fdf9d3 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md @@ -24,6 +24,7 @@ Method | HTTP request | Description ## CreateXmlItem > CreateXmlItem(ctx, xmlItem) + creates an XmlItem this route creates an XmlItem @@ -59,6 +60,7 @@ No authorization required > bool FakeOuterBooleanSerialize(ctx, optional) + Test serialization of outer boolean types ### Required Parameters @@ -101,6 +103,7 @@ No authorization required > OuterComposite FakeOuterCompositeSerialize(ctx, optional) + Test serialization of object with outer number type ### Required Parameters @@ -143,6 +146,7 @@ No authorization required > float32 FakeOuterNumberSerialize(ctx, optional) + Test serialization of outer number types ### Required Parameters @@ -185,6 +189,7 @@ No authorization required > string FakeOuterStringSerialize(ctx, optional) + Test serialization of outer string types ### Required Parameters @@ -227,6 +232,7 @@ No authorization required > TestBodyWithFileSchema(ctx, body) + For this test, the body for this request much reference a schema named `File`. ### Required Parameters @@ -260,6 +266,7 @@ No authorization required > TestBodyWithQueryParams(ctx, query, body) + ### Required Parameters @@ -290,6 +297,7 @@ No authorization required ## TestClientModel > Client TestClientModel(ctx, body) + To test \"client\" model To test \"client\" model @@ -323,6 +331,7 @@ No authorization required ## TestEndpointParameters > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -382,6 +391,7 @@ Name | Type | Description | Notes ## TestEnumParameters > TestEnumParameters(ctx, optional) + To test enum parameters To test enum parameters @@ -431,6 +441,7 @@ No authorization required ## TestGroupParameters > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) + Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -481,6 +492,7 @@ No authorization required ## TestInlineAdditionalProperties > TestInlineAdditionalProperties(ctx, param) + test inline additionalProperties ### Required Parameters @@ -512,6 +524,7 @@ No authorization required ## TestJsonFormData > TestJsonFormData(ctx, param, param2) + test json serialization of form data ### Required Parameters @@ -546,6 +559,7 @@ No authorization required > TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) + To test the collection format in query parameters ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md index b3cbcc2c06..224542b705 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## TestClassname > Client TestClassname(ctx, body) + To test class name in snake case To test class name in snake case diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md index 9e2f495735..3b6ff48ab9 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Name.md b/samples/client/petstore/go/go-petstore-withXml/docs/Name.md index 453e54d985..3e91109a16 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Name.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **int32** | | -**SnakeCase** | **int32** | | [optional] +**SnakeCase** | **int32** | | [optional] [readonly] **Property** | **string** | | [optional] -**Var123Number** | **int32** | | [optional] +**Var123Number** | **int32** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md index de48d4b676..6ee9afef75 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description ## AddPet > AddPet(ctx, body) + Add a new pet to the store ### Required Parameters @@ -50,6 +51,7 @@ Name | Type | Description | Notes ## DeletePet > DeletePet(ctx, petId, optional) + Deletes a pet ### Required Parameters @@ -92,6 +94,7 @@ Name | Type | Description | Notes ## FindPetsByStatus > []Pet FindPetsByStatus(ctx, status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -125,6 +128,7 @@ Name | Type | Description | Notes ## FindPetsByTags > []Pet FindPetsByTags(ctx, tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -158,6 +162,7 @@ Name | Type | Description | Notes ## GetPetById > Pet GetPetById(ctx, petId) + Find pet by ID Returns a single pet @@ -191,6 +196,7 @@ Name | Type | Description | Notes ## UpdatePet > UpdatePet(ctx, body) + Update an existing pet ### Required Parameters @@ -222,6 +228,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm > UpdatePetWithForm(ctx, petId, optional) + Updates a pet in the store with form data ### Required Parameters @@ -265,6 +272,7 @@ Name | Type | Description | Notes ## UploadFile > ApiResponse UploadFile(ctx, petId, optional) + uploads an image ### Required Parameters @@ -308,6 +316,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) + uploads an image (required) ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md b/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md index 3fee799f29..a86828404e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md index 083ed77759..531ab09ff6 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description ## DeleteOrder > DeleteOrder(ctx, orderId) + Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -47,6 +48,7 @@ No authorization required ## GetInventory > map[string]int32 GetInventory(ctx, ) + Returns pet inventories by status Returns a map of status codes to quantities @@ -76,6 +78,7 @@ This endpoint does not need any parameter. ## GetOrderById > Order GetOrderById(ctx, orderId) + Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -109,6 +112,7 @@ No authorization required ## PlaceOrder > Order PlaceOrder(ctx, body) + Place an order for a pet ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md index 3201e1771d..d9f16bb5fb 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description ## CreateUser > CreateUser(ctx, body) + Create user This can only be done by the logged in user. @@ -51,6 +52,7 @@ No authorization required ## CreateUsersWithArrayInput > CreateUsersWithArrayInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -82,6 +84,7 @@ No authorization required ## CreateUsersWithListInput > CreateUsersWithListInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -113,6 +116,7 @@ No authorization required ## DeleteUser > DeleteUser(ctx, username) + Delete user This can only be done by the logged in user. @@ -146,6 +150,7 @@ No authorization required ## GetUserByName > User GetUserByName(ctx, username) + Get user by user name ### Required Parameters @@ -177,6 +182,7 @@ No authorization required ## LoginUser > string LoginUser(ctx, username, password) + Logs user into the system ### Required Parameters @@ -209,6 +215,7 @@ No authorization required ## LogoutUser > LogoutUser(ctx, ) + Logs out current logged in user session ### Required Parameters @@ -236,6 +243,7 @@ No authorization required ## UpdateUser > UpdateUser(ctx, username, body) + Updated user This can only be done by the logged in user. diff --git a/samples/client/petstore/go/go-petstore-withXml/go.mod b/samples/client/petstore/go/go-petstore-withXml/go.mod index 199809ed70..c7c2a426e7 100644 --- a/samples/client/petstore/go/go-petstore-withXml/go.mod +++ b/samples/client/petstore/go/go-petstore-withXml/go.mod @@ -1,6 +1,8 @@ module github.com/GIT_USER_ID/GIT_REPO_ID +go 1.13 + require ( - github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 + golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a ) diff --git a/samples/client/petstore/go/go-petstore-withXml/go.sum b/samples/client/petstore/go/go-petstore-withXml/go.sum index e3c16fef3a..97b347238f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/go.sum +++ b/samples/client/petstore/go/go-petstore-withXml/go.sum @@ -1,11 +1,15 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/samples/client/petstore/go/go-petstore/api_another_fake.go b/samples/client/petstore/go/go-petstore/api_another_fake.go index 8d1b78ba00..8128bba97c 100644 --- a/samples/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore/api_another_fake.go @@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go index 731d5c00f4..db0a5d09f2 100644 --- a/samples/client/petstore/go/go-petstore/api_fake.go +++ b/samples/client/petstore/go/go-petstore/api_fake.go @@ -176,7 +176,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -278,7 +277,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -376,7 +374,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -474,7 +471,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -700,7 +696,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go index be67cb585e..1ff9eccc0f 100644 --- a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go +++ b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go @@ -108,7 +108,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go index 77dccc2768..2eac738d41 100644 --- a/samples/client/petstore/go/go-petstore/api_pet.go +++ b/samples/client/petstore/go/go-petstore/api_pet.go @@ -692,7 +692,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -798,7 +797,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore/api_store.go b/samples/client/petstore/go/go-petstore/api_store.go index e17fc1816e..5048628566 100644 --- a/samples/client/petstore/go/go-petstore/api_store.go +++ b/samples/client/petstore/go/go-petstore/api_store.go @@ -174,7 +174,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md index 0b9deb0c58..2c22f8f1b3 100644 --- a/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## Call123TestSpecialTags > Client Call123TestSpecialTags(ctx, body) + To test special tags To test special tags and operation ID starting with number diff --git a/samples/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/client/petstore/go/go-petstore/docs/FakeApi.md index 9aaf2e63a9..1d85fdf9d3 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeApi.md @@ -24,6 +24,7 @@ Method | HTTP request | Description ## CreateXmlItem > CreateXmlItem(ctx, xmlItem) + creates an XmlItem this route creates an XmlItem @@ -59,6 +60,7 @@ No authorization required > bool FakeOuterBooleanSerialize(ctx, optional) + Test serialization of outer boolean types ### Required Parameters @@ -101,6 +103,7 @@ No authorization required > OuterComposite FakeOuterCompositeSerialize(ctx, optional) + Test serialization of object with outer number type ### Required Parameters @@ -143,6 +146,7 @@ No authorization required > float32 FakeOuterNumberSerialize(ctx, optional) + Test serialization of outer number types ### Required Parameters @@ -185,6 +189,7 @@ No authorization required > string FakeOuterStringSerialize(ctx, optional) + Test serialization of outer string types ### Required Parameters @@ -227,6 +232,7 @@ No authorization required > TestBodyWithFileSchema(ctx, body) + For this test, the body for this request much reference a schema named `File`. ### Required Parameters @@ -260,6 +266,7 @@ No authorization required > TestBodyWithQueryParams(ctx, query, body) + ### Required Parameters @@ -290,6 +297,7 @@ No authorization required ## TestClientModel > Client TestClientModel(ctx, body) + To test \"client\" model To test \"client\" model @@ -323,6 +331,7 @@ No authorization required ## TestEndpointParameters > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -382,6 +391,7 @@ Name | Type | Description | Notes ## TestEnumParameters > TestEnumParameters(ctx, optional) + To test enum parameters To test enum parameters @@ -431,6 +441,7 @@ No authorization required ## TestGroupParameters > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) + Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -481,6 +492,7 @@ No authorization required ## TestInlineAdditionalProperties > TestInlineAdditionalProperties(ctx, param) + test inline additionalProperties ### Required Parameters @@ -512,6 +524,7 @@ No authorization required ## TestJsonFormData > TestJsonFormData(ctx, param, param2) + test json serialization of form data ### Required Parameters @@ -546,6 +559,7 @@ No authorization required > TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) + To test the collection format in query parameters ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md index b3cbcc2c06..224542b705 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## TestClassname > Client TestClassname(ctx, body) + To test class name in snake case To test class name in snake case diff --git a/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md b/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md index 9e2f495735..3b6ff48ab9 100644 --- a/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Name.md b/samples/client/petstore/go/go-petstore/docs/Name.md index 453e54d985..3e91109a16 100644 --- a/samples/client/petstore/go/go-petstore/docs/Name.md +++ b/samples/client/petstore/go/go-petstore/docs/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **int32** | | -**SnakeCase** | **int32** | | [optional] +**SnakeCase** | **int32** | | [optional] [readonly] **Property** | **string** | | [optional] -**Var123Number** | **int32** | | [optional] +**Var123Number** | **int32** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/PetApi.md b/samples/client/petstore/go/go-petstore/docs/PetApi.md index de48d4b676..6ee9afef75 100644 --- a/samples/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore/docs/PetApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description ## AddPet > AddPet(ctx, body) + Add a new pet to the store ### Required Parameters @@ -50,6 +51,7 @@ Name | Type | Description | Notes ## DeletePet > DeletePet(ctx, petId, optional) + Deletes a pet ### Required Parameters @@ -92,6 +94,7 @@ Name | Type | Description | Notes ## FindPetsByStatus > []Pet FindPetsByStatus(ctx, status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -125,6 +128,7 @@ Name | Type | Description | Notes ## FindPetsByTags > []Pet FindPetsByTags(ctx, tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -158,6 +162,7 @@ Name | Type | Description | Notes ## GetPetById > Pet GetPetById(ctx, petId) + Find pet by ID Returns a single pet @@ -191,6 +196,7 @@ Name | Type | Description | Notes ## UpdatePet > UpdatePet(ctx, body) + Update an existing pet ### Required Parameters @@ -222,6 +228,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm > UpdatePetWithForm(ctx, petId, optional) + Updates a pet in the store with form data ### Required Parameters @@ -265,6 +272,7 @@ Name | Type | Description | Notes ## UploadFile > ApiResponse UploadFile(ctx, petId, optional) + uploads an image ### Required Parameters @@ -308,6 +316,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) + uploads an image (required) ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md b/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md index 3fee799f29..a86828404e 100644 --- a/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/client/petstore/go/go-petstore/docs/StoreApi.md index 083ed77759..531ab09ff6 100644 --- a/samples/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/client/petstore/go/go-petstore/docs/StoreApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description ## DeleteOrder > DeleteOrder(ctx, orderId) + Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -47,6 +48,7 @@ No authorization required ## GetInventory > map[string]int32 GetInventory(ctx, ) + Returns pet inventories by status Returns a map of status codes to quantities @@ -76,6 +78,7 @@ This endpoint does not need any parameter. ## GetOrderById > Order GetOrderById(ctx, orderId) + Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -109,6 +112,7 @@ No authorization required ## PlaceOrder > Order PlaceOrder(ctx, body) + Place an order for a pet ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore/docs/UserApi.md b/samples/client/petstore/go/go-petstore/docs/UserApi.md index 3201e1771d..d9f16bb5fb 100644 --- a/samples/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore/docs/UserApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description ## CreateUser > CreateUser(ctx, body) + Create user This can only be done by the logged in user. @@ -51,6 +52,7 @@ No authorization required ## CreateUsersWithArrayInput > CreateUsersWithArrayInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -82,6 +84,7 @@ No authorization required ## CreateUsersWithListInput > CreateUsersWithListInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -113,6 +116,7 @@ No authorization required ## DeleteUser > DeleteUser(ctx, username) + Delete user This can only be done by the logged in user. @@ -146,6 +150,7 @@ No authorization required ## GetUserByName > User GetUserByName(ctx, username) + Get user by user name ### Required Parameters @@ -177,6 +182,7 @@ No authorization required ## LoginUser > string LoginUser(ctx, username, password) + Logs user into the system ### Required Parameters @@ -209,6 +215,7 @@ No authorization required ## LogoutUser > LogoutUser(ctx, ) + Logs out current logged in user session ### Required Parameters @@ -236,6 +243,7 @@ No authorization required ## UpdateUser > UpdateUser(ctx, username, body) + Updated user This can only be done by the logged in user. diff --git a/samples/client/petstore/go/go-petstore/go.mod b/samples/client/petstore/go/go-petstore/go.mod index 199809ed70..c7c2a426e7 100644 --- a/samples/client/petstore/go/go-petstore/go.mod +++ b/samples/client/petstore/go/go-petstore/go.mod @@ -1,6 +1,8 @@ module github.com/GIT_USER_ID/GIT_REPO_ID +go 1.13 + require ( - github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 + golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a ) diff --git a/samples/client/petstore/go/go-petstore/go.sum b/samples/client/petstore/go/go-petstore/go.sum index e3c16fef3a..97b347238f 100644 --- a/samples/client/petstore/go/go-petstore/go.sum +++ b/samples/client/petstore/go/go-petstore/go.sum @@ -1,11 +1,15 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Core.html b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Core.html index f433b3bbe6..f31337afca 100644 --- a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Core.html +++ b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Core.html @@ -1 +1 @@ -OpenAPIPetstore.Core

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Safe HaskellNone
LanguageHaskell2010

OpenAPIPetstore.Core

Description

 
Synopsis

OpenAPIPetstoreConfig

data OpenAPIPetstoreConfig Source #

 

Constructors

OpenAPIPetstoreConfig 

Fields

newConfig :: IO OpenAPIPetstoreConfig Source #

constructs a default OpenAPIPetstoreConfig

configHost:

http://petstore.swagger.io:80/v2

configUserAgent:

"openapi-petstore/0.1.0.0"

addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig Source #

updates config use AuthMethod on matching requests

withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig Source #

updates the config to use stdout logging

withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig Source #

updates the config to use stderr logging

withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig Source #

updates the config to disable logging

OpenAPIPetstoreRequest

data OpenAPIPetstoreRequest req contentType res accept Source #

Represents a request.

Type Variables:

  • req - request operation
  • contentType - MimeType associated with request body
  • res - response model
  • accept - MimeType associated with response body

Constructors

OpenAPIPetstoreRequest 

Fields

Instances
Show (OpenAPIPetstoreRequest req contentType res accept) Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

showsPrec :: Int -> OpenAPIPetstoreRequest req contentType res accept -> ShowS #

show :: OpenAPIPetstoreRequest req contentType res accept -> String #

showList :: [OpenAPIPetstoreRequest req contentType res accept] -> ShowS #

rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Method Source #

rMethod Lens

rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [ByteString] Source #

rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params Source #

rParams Lens

rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [TypeRep] Source #

rParams Lens

HasBodyParam

class HasBodyParam req param where Source #

Designates the body parameter of a request

Minimal complete definition

Nothing

Methods

setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept Source #

Instances
HasBodyParam UpdateUser User Source #

Body Param "body" - Updated user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes UpdateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest UpdateUser contentType res accept -> User -> OpenAPIPetstoreRequest UpdateUser contentType res accept Source #

HasBodyParam CreateUsersWithListInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

HasBodyParam CreateUsersWithArrayInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

HasBodyParam CreateUser User Source #

Body Param "body" - Created user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes CreateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest CreateUser contentType res accept -> User -> OpenAPIPetstoreRequest CreateUser contentType res accept Source #

HasBodyParam PlaceOrder Order Source #

Body Param "body" - order placed for purchasing the pet

Instance details

Defined in OpenAPIPetstore.API.Store

Methods

setBodyParam :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => OpenAPIPetstoreRequest PlaceOrder contentType res accept -> Order -> OpenAPIPetstoreRequest PlaceOrder contentType res accept Source #

HasBodyParam UpdatePet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes UpdatePet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest UpdatePet contentType res accept -> Pet -> OpenAPIPetstoreRequest UpdatePet contentType res accept Source #

HasBodyParam AddPet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes AddPet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest AddPet contentType res accept -> Pet -> OpenAPIPetstoreRequest AddPet contentType res accept Source #

HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Methods

setBodyParam :: (Consumes TestClassname contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest TestClassname contentType res accept -> Client -> OpenAPIPetstoreRequest TestClassname contentType res accept Source #

HasBodyParam TestInlineAdditionalProperties ParamMapMapStringText Source #

Body Param "param" - request body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes TestClientModel contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest TestClientModel contentType res accept -> Client -> OpenAPIPetstoreRequest TestClientModel contentType res accept Source #

HasBodyParam TestBodyWithQueryParams User Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestBodyWithFileSchema FileSchemaTestClass Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterStringSerialize BodyText Source #

Body Param "body" - Input string as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterNumberSerialize BodyDouble Source #

Body Param "body" - Input number as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterCompositeSerialize OuterComposite Source #

Body Param "body" - Input composite as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterBooleanSerialize BodyBool Source #

Body Param "body" - Input boolean as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam CreateXmlItem XmlItem Source #

Body Param XmlItem - XmlItem Body

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) => OpenAPIPetstoreRequest CreateXmlItem contentType res accept -> XmlItem -> OpenAPIPetstoreRequest CreateXmlItem contentType res accept Source #

HasBodyParam Op123testSpecialTags Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Methods

setBodyParam :: (Consumes Op123testSpecialTags contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest Op123testSpecialTags contentType res accept -> Client -> OpenAPIPetstoreRequest Op123testSpecialTags contentType res accept Source #

HasOptionalParam

class HasOptionalParam req param where Source #

Designates the optional parameters of a request

Minimal complete definition

applyOptionalParam | (-&-)

Methods

applyOptionalParam :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept Source #

Apply an optional parameter to a request

(-&-) :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept infixl 2 Source #

infix operator / alias for addOptionalParam

Instances
HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UploadFile File2 Source #

Optional Param "file" - file to upload

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

HasOptionalParam UploadFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UpdatePetWithForm StatusText Source #

Optional Param "status" - Updated status of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam DeletePet ApiKey Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

HasOptionalParam TestGroupParameters StringGroup Source #

Optional Param "string_group" - String in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestGroupParameters Int64Group Source #

Optional Param "int64_group" - Integer in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestGroupParameters BooleanGroup Source #

Optional Param "boolean_group" - Boolean in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryStringArray Source #

Optional Param "enum_query_string_array" - Query parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryString Source #

Optional Param "enum_query_string" - Query parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryInteger Source #

Optional Param "enum_query_integer" - Query parameter enum test (double)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryDouble Source #

Optional Param "enum_query_double" - Query parameter enum test (double)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumHeaderStringArray Source #

Optional Param "enum_header_string_array" - Header parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumHeaderString Source #

Optional Param "enum_header_string" - Header parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumFormStringArray Source #

Optional Param "enum_form_string_array" - Form parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumFormString Source #

Optional Param "enum_form_string" - Form parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Password Source #

Optional Param "password" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamString Source #

Optional Param "string" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamInteger Source #

Optional Param "integer" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamFloat Source #

Optional Param "float" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamDateTime Source #

Optional Param "dateTime" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamDate Source #

Optional Param "date" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamBinary Source #

Optional Param "binary" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Int64 Source #

Optional Param "int64" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Int32 Source #

Optional Param "int32" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Callback Source #

Optional Param "callback" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

data Params Source #

Request Params

Constructors

Params 

Fields

Instances
Show Params Source # 
Instance details

Defined in OpenAPIPetstore.Core

OpenAPIPetstoreRequest Utils

_mkRequest Source #

Arguments

:: Method

Method

-> [ByteString]

Endpoint

-> OpenAPIPetstoreRequest req contentType res accept

req: Request Type, res: Response Type

setHeader :: OpenAPIPetstoreRequest req contentType res accept -> [Header] -> OpenAPIPetstoreRequest req contentType res accept Source #

removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [HeaderName] -> OpenAPIPetstoreRequest req contentType res accept Source #

_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept Source #

_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept Source #

setQuery :: OpenAPIPetstoreRequest req contentType res accept -> [QueryItem] -> OpenAPIPetstoreRequest req contentType res accept Source #

addForm :: OpenAPIPetstoreRequest req contentType res accept -> Form -> OpenAPIPetstoreRequest req contentType res accept Source #

_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> Part -> OpenAPIPetstoreRequest req contentType res accept Source #

_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept Source #

_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept Source #

_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept Source #

Params Utils

toPath :: ToHttpApiData a => a -> ByteString Source #

toHeader :: ToHttpApiData a => (HeaderName, a) -> [Header] Source #

toForm :: ToHttpApiData v => (ByteString, v) -> Form Source #

toQuery :: ToHttpApiData a => (ByteString, Maybe a) -> [QueryItem] Source #

OpenAPI CollectionFormat Utils

data CollectionFormat Source #

Determines the format of the array if type array is used.

Constructors

CommaSeparated

CSV format for multiple parameters.

SpaceSeparated

Also called SSV

TabSeparated

Also called TSV

PipeSeparated

`value1|value2|value2`

MultiParamArray

Using multiple GET parameters, e.g. `foo=bar&foo=baz`. This is valid only for parameters in "query" (Query) or "formData" (Form)

toHeaderColl :: ToHttpApiData a => CollectionFormat -> (HeaderName, [a]) -> [Header] Source #

toFormColl :: ToHttpApiData v => CollectionFormat -> (ByteString, [v]) -> Form Source #

toQueryColl :: ToHttpApiData a => CollectionFormat -> (ByteString, Maybe [a]) -> Query Source #

_toColl :: Traversable f => CollectionFormat -> (f a -> [(b, ByteString)]) -> f [a] -> [(b, ByteString)] Source #

_toCollA :: (Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t ByteString)]) -> f (t [a]) -> [(b, t ByteString)] Source #

_toCollA' :: (Monoid c, Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)] Source #

AuthMethods

class Typeable a => AuthMethod a where Source #

Provides a method to apply auth methods to requests

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> a -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

Instances
AuthMethod AnyAuthMethod Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AnyAuthMethod -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthOAuthPetstoreAuth Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthOAuthPetstoreAuth -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthBasicHttpBasicTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthBasicHttpBasicTest -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthApiKeyApiKeyQuery Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthApiKeyApiKeyQuery -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthApiKeyApiKey Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthApiKeyApiKey -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

data AnyAuthMethod Source #

An existential wrapper for any AuthMethod

Constructors

AuthMethod a => AnyAuthMethod a 
Instances
AuthMethod AnyAuthMethod Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AnyAuthMethod -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

_applyAuthMethods :: OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreConfig -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

apply all matching AuthMethods in config to request

Utils

_omitNulls :: [(Text, Value)] -> Value Source #

Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON)

_toFormItem :: (ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) Source #

Encodes fields using WH.toQueryParam

_emptyToNothing :: Maybe String -> Maybe String Source #

Collapse (Just "") to Nothing

_memptyToNothing :: (Monoid a, Eq a) => Maybe a -> Maybe a Source #

Collapse (Just mempty) to Nothing

DateTime Formatting

newtype DateTime Source #

Constructors

DateTime 

Fields

Instances
Eq DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Data DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DateTime -> c DateTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DateTime #

toConstr :: DateTime -> Constr #

dataTypeOf :: DateTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DateTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DateTime) #

gmapT :: (forall b. Data b => b -> b) -> DateTime -> DateTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DateTime -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DateTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> DateTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DateTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

Ord DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Show DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: DateTime -> () #

FormatTime DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

ParseTime DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToJSON DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: DateTime -> Value

toEncoding :: DateTime -> Encoding

toJSONList :: [DateTime] -> Value

toEncodingList :: [DateTime] -> Encoding

FromJSON DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser DateTime

parseJSONList :: Value -> Parser [DateTime]

FromHttpApiData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readDateTime :: (ParseTime t, Monad m, Alternative m) => String -> m t Source #

_parseISO8601

_showDateTime :: (t ~ UTCTime, FormatTime t) => t -> String Source #

TI.formatISO8601Millis

_parseISO8601 :: (ParseTime t, Monad m, Alternative m) => String -> m t Source #

parse an ISO8601 date-time string

Date Formatting

newtype Date Source #

Constructors

Date 

Fields

Instances
Enum Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

succ :: Date -> Date #

pred :: Date -> Date #

toEnum :: Int -> Date #

fromEnum :: Date -> Int #

enumFrom :: Date -> [Date] #

enumFromThen :: Date -> Date -> [Date] #

enumFromTo :: Date -> Date -> [Date] #

enumFromThenTo :: Date -> Date -> Date -> [Date] #

Eq Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

(==) :: Date -> Date -> Bool #

(/=) :: Date -> Date -> Bool #

Data Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Date -> c Date #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Date #

toConstr :: Date -> Constr #

dataTypeOf :: Date -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Date) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date) #

gmapT :: (forall b. Data b => b -> b) -> Date -> Date #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r #

gmapQ :: (forall d. Data d => d -> u) -> Date -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Date -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Date -> m Date #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Date -> m Date #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Date -> m Date #

Ord Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

compare :: Date -> Date -> Ordering #

(<) :: Date -> Date -> Bool #

(<=) :: Date -> Date -> Bool #

(>) :: Date -> Date -> Bool #

(>=) :: Date -> Date -> Bool #

max :: Date -> Date -> Date #

min :: Date -> Date -> Date #

Show Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

showsPrec :: Int -> Date -> ShowS #

show :: Date -> String #

showList :: [Date] -> ShowS #

Ix Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

range :: (Date, Date) -> [Date] #

index :: (Date, Date) -> Date -> Int #

unsafeIndex :: (Date, Date) -> Date -> Int

inRange :: (Date, Date) -> Date -> Bool #

rangeSize :: (Date, Date) -> Int #

unsafeRangeSize :: (Date, Date) -> Int

NFData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: Date -> () #

FormatTime Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

ParseTime Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

buildTime :: TimeLocale -> [(Char, String)] -> Maybe Date #

ToJSON Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: Date -> Value

toEncoding :: Date -> Encoding

toJSONList :: [Date] -> Value

toEncodingList :: [Date] -> Encoding

FromJSON Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser Date

parseJSONList :: Value -> Parser [Date]

FromHttpApiData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readDate :: (ParseTime t, Monad m) => String -> m t Source #

TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"

_showDate :: FormatTime t => t -> String Source #

TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"

Byte/Binary Formatting

newtype ByteArray Source #

base64 encoded characters

Constructors

ByteArray 
Instances
Eq ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Data ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteArray -> c ByteArray #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteArray #

toConstr :: ByteArray -> Constr #

dataTypeOf :: ByteArray -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteArray) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteArray) #

gmapT :: (forall b. Data b => b -> b) -> ByteArray -> ByteArray #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteArray -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteArray -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

Ord ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Show ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: ByteArray -> () #

ToJSON ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: ByteArray -> Value

toEncoding :: ByteArray -> Encoding

toJSONList :: [ByteArray] -> Value

toEncodingList :: [ByteArray] -> Encoding

FromJSON ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser ByteArray

parseJSONList :: Value -> Parser [ByteArray]

FromHttpApiData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readByteArray :: Monad m => Text -> m ByteArray Source #

read base64 encoded characters

_showByteArray :: ByteArray -> Text Source #

show base64 encoded characters

newtype Binary Source #

any sequence of octets

Constructors

Binary 

Fields

Instances
Eq Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

(==) :: Binary -> Binary -> Bool #

(/=) :: Binary -> Binary -> Bool #

Data Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Binary -> c Binary #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Binary #

toConstr :: Binary -> Constr #

dataTypeOf :: Binary -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Binary) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Binary) #

gmapT :: (forall b. Data b => b -> b) -> Binary -> Binary #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Binary -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Binary -> r #

gmapQ :: (forall d. Data d => d -> u) -> Binary -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Binary -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

Ord Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Show Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: Binary -> () #

ToJSON Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: Binary -> Value

toEncoding :: Binary -> Encoding

toJSONList :: [Binary] -> Value

toEncodingList :: [Binary] -> Encoding

FromJSON Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser Binary

parseJSONList :: Value -> Parser [Binary]

FromHttpApiData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Lens Type Aliases

type Lens_' s a = Lens_ s s a a Source #

type Lens_ s t a b = forall (f :: * -> *). Functor f => (a -> f b) -> s -> f t Source #

\ No newline at end of file +OpenAPIPetstore.Core

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Safe HaskellNone
LanguageHaskell2010

OpenAPIPetstore.Core

Description

 
Synopsis

OpenAPIPetstoreConfig

data OpenAPIPetstoreConfig Source #

 

Constructors

OpenAPIPetstoreConfig 

Fields

newConfig :: IO OpenAPIPetstoreConfig Source #

constructs a default OpenAPIPetstoreConfig

configHost:

http://petstore.swagger.io:80/v2

configUserAgent:

"openapi-petstore/0.1.0.0"

addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig Source #

updates config use AuthMethod on matching requests

withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig Source #

updates the config to use stdout logging

withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig Source #

updates the config to use stderr logging

withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig Source #

updates the config to disable logging

OpenAPIPetstoreRequest

data OpenAPIPetstoreRequest req contentType res accept Source #

Represents a request.

Type Variables:

  • req - request operation
  • contentType - MimeType associated with request body
  • res - response model
  • accept - MimeType associated with response body

Constructors

OpenAPIPetstoreRequest 

Fields

Instances
Show (OpenAPIPetstoreRequest req contentType res accept) Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

showsPrec :: Int -> OpenAPIPetstoreRequest req contentType res accept -> ShowS #

show :: OpenAPIPetstoreRequest req contentType res accept -> String #

showList :: [OpenAPIPetstoreRequest req contentType res accept] -> ShowS #

rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Method Source #

rMethod Lens

rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [ByteString] Source #

rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params Source #

rParams Lens

rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [TypeRep] Source #

rParams Lens

HasBodyParam

class HasBodyParam req param where Source #

Designates the body parameter of a request

Minimal complete definition

Nothing

Methods

setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept Source #

Instances
HasBodyParam UpdateUser User Source #

Body Param "body" - Updated user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes UpdateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest UpdateUser contentType res accept -> User -> OpenAPIPetstoreRequest UpdateUser contentType res accept Source #

HasBodyParam CreateUsersWithListInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

HasBodyParam CreateUsersWithArrayInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

HasBodyParam CreateUser User Source #

Body Param "body" - Created user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes CreateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest CreateUser contentType res accept -> User -> OpenAPIPetstoreRequest CreateUser contentType res accept Source #

HasBodyParam PlaceOrder Order Source #

Body Param "body" - order placed for purchasing the pet

Instance details

Defined in OpenAPIPetstore.API.Store

Methods

setBodyParam :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => OpenAPIPetstoreRequest PlaceOrder contentType res accept -> Order -> OpenAPIPetstoreRequest PlaceOrder contentType res accept Source #

HasBodyParam UpdatePet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes UpdatePet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest UpdatePet contentType res accept -> Pet -> OpenAPIPetstoreRequest UpdatePet contentType res accept Source #

HasBodyParam AddPet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes AddPet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest AddPet contentType res accept -> Pet -> OpenAPIPetstoreRequest AddPet contentType res accept Source #

HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Methods

setBodyParam :: (Consumes TestClassname contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest TestClassname contentType res accept -> Client -> OpenAPIPetstoreRequest TestClassname contentType res accept Source #

HasBodyParam TestInlineAdditionalProperties ParamMapMapStringText Source #

Body Param "param" - request body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes TestClientModel contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest TestClientModel contentType res accept -> Client -> OpenAPIPetstoreRequest TestClientModel contentType res accept Source #

HasBodyParam TestBodyWithQueryParams User Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestBodyWithFileSchema FileSchemaTestClass Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterStringSerialize BodyText Source #

Body Param "body" - Input string as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterNumberSerialize BodyDouble Source #

Body Param "body" - Input number as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterCompositeSerialize OuterComposite Source #

Body Param "body" - Input composite as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterBooleanSerialize BodyBool Source #

Body Param "body" - Input boolean as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam CreateXmlItem XmlItem Source #

Body Param XmlItem - XmlItem Body

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) => OpenAPIPetstoreRequest CreateXmlItem contentType res accept -> XmlItem -> OpenAPIPetstoreRequest CreateXmlItem contentType res accept Source #

HasBodyParam Op123testSpecialTags Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Methods

setBodyParam :: (Consumes Op123testSpecialTags contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest Op123testSpecialTags contentType res accept -> Client -> OpenAPIPetstoreRequest Op123testSpecialTags contentType res accept Source #

HasOptionalParam

class HasOptionalParam req param where Source #

Designates the optional parameters of a request

Minimal complete definition

applyOptionalParam | (-&-)

Methods

applyOptionalParam :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept Source #

Apply an optional parameter to a request

(-&-) :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept infixl 2 Source #

infix operator / alias for addOptionalParam

Instances
HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UploadFile File2 Source #

Optional Param "file" - file to upload

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

HasOptionalParam UploadFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UpdatePetWithForm StatusText Source #

Optional Param "status" - Updated status of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam DeletePet ApiKey Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

HasOptionalParam TestGroupParameters StringGroup Source #

Optional Param "string_group" - String in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestGroupParameters Int64Group Source #

Optional Param "int64_group" - Integer in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestGroupParameters BooleanGroup Source #

Optional Param "boolean_group" - Boolean in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryStringArray Source #

Optional Param "enum_query_string_array" - Query parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryString Source #

Optional Param "enum_query_string" - Query parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryInteger Source #

Optional Param "enum_query_integer" - Query parameter enum test (double)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryDouble Source #

Optional Param "enum_query_double" - Query parameter enum test (double)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumHeaderStringArray Source #

Optional Param "enum_header_string_array" - Header parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumHeaderString Source #

Optional Param "enum_header_string" - Header parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumFormStringArray Source #

Optional Param "enum_form_string_array" - Form parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumFormString Source #

Optional Param "enum_form_string" - Form parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Password Source #

Optional Param "password" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamString Source #

Optional Param "string" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamInteger Source #

Optional Param "integer" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamFloat Source #

Optional Param "float" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamDateTime Source #

Optional Param "dateTime" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamDate Source #

Optional Param "date" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamBinary Source #

Optional Param "binary" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Int64 Source #

Optional Param "int64" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Int32 Source #

Optional Param "int32" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Callback Source #

Optional Param "callback" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

data Params Source #

Request Params

Constructors

Params 

Fields

Instances
Show Params Source # 
Instance details

Defined in OpenAPIPetstore.Core

OpenAPIPetstoreRequest Utils

_mkRequest Source #

Arguments

:: Method

Method

-> [ByteString]

Endpoint

-> OpenAPIPetstoreRequest req contentType res accept

req: Request Type, res: Response Type

setHeader :: OpenAPIPetstoreRequest req contentType res accept -> [Header] -> OpenAPIPetstoreRequest req contentType res accept Source #

removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [HeaderName] -> OpenAPIPetstoreRequest req contentType res accept Source #

_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept Source #

_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept Source #

setQuery :: OpenAPIPetstoreRequest req contentType res accept -> [QueryItem] -> OpenAPIPetstoreRequest req contentType res accept Source #

addForm :: OpenAPIPetstoreRequest req contentType res accept -> Form -> OpenAPIPetstoreRequest req contentType res accept Source #

_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> Part -> OpenAPIPetstoreRequest req contentType res accept Source #

_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept Source #

_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept Source #

_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept Source #

Params Utils

toPath :: ToHttpApiData a => a -> ByteString Source #

toHeader :: ToHttpApiData a => (HeaderName, a) -> [Header] Source #

toForm :: ToHttpApiData v => (ByteString, v) -> Form Source #

toQuery :: ToHttpApiData a => (ByteString, Maybe a) -> [QueryItem] Source #

OpenAPI CollectionFormat Utils

data CollectionFormat Source #

Determines the format of the array if type array is used.

Constructors

CommaSeparated

CSV format for multiple parameters.

SpaceSeparated

Also called SSV

TabSeparated

Also called TSV

PipeSeparated

`value1|value2|value2`

MultiParamArray

Using multiple GET parameters, e.g. `foo=bar&foo=baz`. This is valid only for parameters in "query" (Query) or "formData" (Form)

toHeaderColl :: ToHttpApiData a => CollectionFormat -> (HeaderName, [a]) -> [Header] Source #

toFormColl :: ToHttpApiData v => CollectionFormat -> (ByteString, [v]) -> Form Source #

toQueryColl :: ToHttpApiData a => CollectionFormat -> (ByteString, Maybe [a]) -> Query Source #

_toColl :: Traversable f => CollectionFormat -> (f a -> [(b, ByteString)]) -> f [a] -> [(b, ByteString)] Source #

_toCollA :: (Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t ByteString)]) -> f (t [a]) -> [(b, t ByteString)] Source #

_toCollA' :: (Monoid c, Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)] Source #

AuthMethods

class Typeable a => AuthMethod a where Source #

Provides a method to apply auth methods to requests

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> a -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

Instances
AuthMethod AnyAuthMethod Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AnyAuthMethod -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthOAuthPetstoreAuth Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthOAuthPetstoreAuth -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthBasicHttpBasicTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthBasicHttpBasicTest -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthApiKeyApiKeyQuery Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthApiKeyApiKeyQuery -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthApiKeyApiKey Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthApiKeyApiKey -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

data AnyAuthMethod Source #

An existential wrapper for any AuthMethod

Constructors

AuthMethod a => AnyAuthMethod a 
Instances
AuthMethod AnyAuthMethod Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AnyAuthMethod -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

_applyAuthMethods :: OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreConfig -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

apply all matching AuthMethods in config to request

Utils

_omitNulls :: [(Text, Value)] -> Value Source #

Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON)

_toFormItem :: (ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) Source #

Encodes fields using WH.toQueryParam

_emptyToNothing :: Maybe String -> Maybe String Source #

Collapse (Just "") to Nothing

_memptyToNothing :: (Monoid a, Eq a) => Maybe a -> Maybe a Source #

Collapse (Just mempty) to Nothing

DateTime Formatting

newtype DateTime Source #

Constructors

DateTime 

Fields

Instances
Eq DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Data DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DateTime -> c DateTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DateTime #

toConstr :: DateTime -> Constr #

dataTypeOf :: DateTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DateTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DateTime) #

gmapT :: (forall b. Data b => b -> b) -> DateTime -> DateTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DateTime -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DateTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> DateTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DateTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

Ord DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Show DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: DateTime -> () #

FormatTime DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

ParseTime DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToJSON DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: DateTime -> Value

toEncoding :: DateTime -> Encoding

toJSONList :: [DateTime] -> Value

toEncodingList :: [DateTime] -> Encoding

FromJSON DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser DateTime

parseJSONList :: Value -> Parser [DateTime]

FromHttpApiData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readDateTime :: (ParseTime t, Monad m, Alternative m) => String -> m t Source #

_parseISO8601

_showDateTime :: (t ~ UTCTime, FormatTime t) => t -> String Source #

TI.formatISO8601Millis

_parseISO8601 :: (ParseTime t, Monad m, Alternative m) => String -> m t Source #

parse an ISO8601 date-time string

Date Formatting

newtype Date Source #

Constructors

Date 

Fields

Instances
Enum Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

succ :: Date -> Date #

pred :: Date -> Date #

toEnum :: Int -> Date #

fromEnum :: Date -> Int #

enumFrom :: Date -> [Date] #

enumFromThen :: Date -> Date -> [Date] #

enumFromTo :: Date -> Date -> [Date] #

enumFromThenTo :: Date -> Date -> Date -> [Date] #

Eq Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

(==) :: Date -> Date -> Bool #

(/=) :: Date -> Date -> Bool #

Data Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Date -> c Date #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Date #

toConstr :: Date -> Constr #

dataTypeOf :: Date -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Date) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date) #

gmapT :: (forall b. Data b => b -> b) -> Date -> Date #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r #

gmapQ :: (forall d. Data d => d -> u) -> Date -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Date -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Date -> m Date #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Date -> m Date #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Date -> m Date #

Ord Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

compare :: Date -> Date -> Ordering #

(<) :: Date -> Date -> Bool #

(<=) :: Date -> Date -> Bool #

(>) :: Date -> Date -> Bool #

(>=) :: Date -> Date -> Bool #

max :: Date -> Date -> Date #

min :: Date -> Date -> Date #

Show Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

showsPrec :: Int -> Date -> ShowS #

show :: Date -> String #

showList :: [Date] -> ShowS #

Ix Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

range :: (Date, Date) -> [Date] #

index :: (Date, Date) -> Date -> Int #

unsafeIndex :: (Date, Date) -> Date -> Int

inRange :: (Date, Date) -> Date -> Bool #

rangeSize :: (Date, Date) -> Int #

unsafeRangeSize :: (Date, Date) -> Int

NFData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: Date -> () #

FormatTime Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

ParseTime Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

buildTime :: TimeLocale -> [(Char, String)] -> Maybe Date #

ToJSON Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: Date -> Value

toEncoding :: Date -> Encoding

toJSONList :: [Date] -> Value

toEncodingList :: [Date] -> Encoding

FromJSON Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser Date

parseJSONList :: Value -> Parser [Date]

FromHttpApiData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readDate :: (ParseTime t, Monad m) => String -> m t Source #

TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"

_showDate :: FormatTime t => t -> String Source #

TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"

Byte/Binary Formatting

newtype ByteArray Source #

base64 encoded characters

Constructors

ByteArray 
Instances
Eq ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Data ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteArray -> c ByteArray #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteArray #

toConstr :: ByteArray -> Constr #

dataTypeOf :: ByteArray -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteArray) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteArray) #

gmapT :: (forall b. Data b => b -> b) -> ByteArray -> ByteArray #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteArray -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteArray -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

Ord ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Show ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: ByteArray -> () #

ToJSON ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: ByteArray -> Value

toEncoding :: ByteArray -> Encoding

toJSONList :: [ByteArray] -> Value

toEncodingList :: [ByteArray] -> Encoding

FromJSON ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser ByteArray

parseJSONList :: Value -> Parser [ByteArray]

FromHttpApiData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readByteArray :: Monad m => Text -> m ByteArray Source #

read base64 encoded characters

_showByteArray :: ByteArray -> Text Source #

show base64 encoded characters

newtype Binary Source #

any sequence of octets

Constructors

Binary 

Fields

Instances
Eq Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

(==) :: Binary -> Binary -> Bool #

(/=) :: Binary -> Binary -> Bool #

Data Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Binary -> c Binary #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Binary #

toConstr :: Binary -> Constr #

dataTypeOf :: Binary -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Binary) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Binary) #

gmapT :: (forall b. Data b => b -> b) -> Binary -> Binary #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Binary -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Binary -> r #

gmapQ :: (forall d. Data d => d -> u) -> Binary -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Binary -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

Ord Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Show Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: Binary -> () #

ToJSON Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: Binary -> Value

toEncoding :: Binary -> Encoding

toJSONList :: [Binary] -> Value

toEncodingList :: [Binary] -> Encoding

FromJSON Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser Binary

parseJSONList :: Value -> Parser [Binary]

FromHttpApiData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Lens Type Aliases

type Lens_' s a = Lens_ s s a a Source #

type Lens_ s t a b = forall (f :: * -> *). Functor f => (a -> f b) -> s -> f t Source #

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-MimeTypes.html b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-MimeTypes.html index 96c8e2b024..df3039cda8 100644 --- a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-MimeTypes.html +++ b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-MimeTypes.html @@ -1 +1 @@ -OpenAPIPetstore.MimeTypes

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Safe HaskellNone
LanguageHaskell2010

OpenAPIPetstore.MimeTypes

Description

 

ContentType MimeType

data ContentType a Source #

Constructors

MimeType a => ContentType 

Fields

Accept MimeType

data Accept a Source #

Constructors

MimeType a => Accept 

Fields

Consumes Class

class MimeType mtype => Consumes req mtype Source #

Instances
MimeType mtype => Consumes UpdateUser mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes CreateUsersWithListInput mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes CreateUsersWithArrayInput mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes CreateUser mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes PlaceOrder mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Store

Consumes UploadFileWithRequiredFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePetWithForm MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes AddPet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes AddPet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Consumes TestJsonFormData MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestInlineAdditionalProperties MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEnumParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEndpointParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithQueryParams MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithFileSchema MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterStringSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterNumberSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterCompositeSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterBooleanSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Produces Class

class MimeType mtype => Produces req mtype Source #

Instances
Produces UpdateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces LogoutUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces DeleteUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithListInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithArrayInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces PlaceOrder MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetInventory MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces DeleteOrder MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Store

Produces UploadFileWithRequiredFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePetWithForm MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeletePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces AddPet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Produces TestQueryParameterCollectionFormat MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestJsonFormData MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestInlineAdditionalProperties MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestGroupParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEnumParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEndpointParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithQueryParams MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithFileSchema MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterStringSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterNumberSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterCompositeSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterBooleanSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces CreateXmlItem MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Default Mime Types

data MimeJSON Source #

Constructors

MimeJSON 
Instances
MimeType MimeJSON Source #
application/json; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeJSON -> [MediaType] Source #

mimeType :: Proxy MimeJSON -> Maybe MediaType Source #

mimeType' :: MimeJSON -> Maybe MediaType Source #

mimeTypes' :: MimeJSON -> [MediaType] Source #

FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode
Instance details

Defined in OpenAPIPetstore.MimeTypes

ToJSON a => MimeRender MimeJSON a Source #

encode

Instance details

Defined in OpenAPIPetstore.MimeTypes

Produces LoginUser MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces PlaceOrder MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetInventory MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces UploadFileWithRequiredFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Produces TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Consumes UpdatePet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes AddPet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Consumes TestInlineAdditionalProperties MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithQueryParams MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithFileSchema MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

data MimeXML Source #

Constructors

MimeXML 
Instances
MimeType MimeXML Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeXML -> [MediaType] Source #

mimeType :: Proxy MimeXML -> Maybe MediaType Source #

mimeType' :: MimeXML -> Maybe MediaType Source #

mimeTypes' :: MimeXML -> [MediaType] Source #

Produces LoginUser MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces PlaceOrder MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetPetById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes AddPet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes CreateXmlItem MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

data MimePlainText Source #

Constructors

MimePlainText 
Instances
MimeType MimePlainText Source #
text/plain; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimePlainText -> [MediaType] Source #

mimeType :: Proxy MimePlainText -> Maybe MediaType Source #

mimeType' :: MimePlainText -> Maybe MediaType Source #

mimeTypes' :: MimePlainText -> [MediaType] Source #

MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeFormUrlEncoded Source #

Constructors

MimeFormUrlEncoded 
Instances
MimeType MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.MimeTypes

FromForm a => MimeUnrender MimeFormUrlEncoded a Source #
P.left T.unpack . WH.urlDecodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

ToForm a => MimeRender MimeFormUrlEncoded a Source #
WH.urlEncodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes UpdatePetWithForm MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes TestJsonFormData MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEnumParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEndpointParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

data MimeMultipartFormData Source #

Constructors

MimeMultipartFormData 
Instances
MimeType MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Bool Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Char Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Double Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Float Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Int Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Integer Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData String Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData ByteString Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Text Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Consumes UploadFileWithRequiredFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

data MimeOctetStream Source #

Constructors

MimeOctetStream 
Instances
MimeType MimeOctetStream Source #
application/octet-stream
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeNoContent Source #

Constructors

MimeNoContent 
Instances
MimeType MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeNoContent -> [MediaType] Source #

mimeType :: Proxy MimeNoContent -> Maybe MediaType Source #

mimeType' :: MimeNoContent -> Maybe MediaType Source #

mimeTypes' :: MimeNoContent -> [MediaType] Source #

MimeUnrender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

Produces UpdateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces LogoutUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces DeleteUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithListInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithArrayInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces DeleteOrder MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Store

Produces UpdatePetWithForm MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeletePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces AddPet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces TestQueryParameterCollectionFormat MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestJsonFormData MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestInlineAdditionalProperties MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestGroupParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEnumParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEndpointParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithQueryParams MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithFileSchema MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces CreateXmlItem MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

data MimeAny Source #

Constructors

MimeAny 
Instances
MimeType MimeAny Source #
"*/*"
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeAny -> [MediaType] Source #

mimeType :: Proxy MimeAny -> Maybe MediaType Source #

mimeType' :: MimeAny -> Maybe MediaType Source #

mimeTypes' :: MimeAny -> [MediaType] Source #

data NoContent Source #

A type for responses without content-body.

Constructors

NoContent 

MimeType Class

class Typeable mtype => MimeType mtype where Source #

Minimal complete definition

mimeType | mimeTypes

Methods

mimeTypes :: Proxy mtype -> [MediaType] Source #

mimeType :: Proxy mtype -> Maybe MediaType Source #

mimeType' :: mtype -> Maybe MediaType Source #

mimeTypes' :: mtype -> [MediaType] Source #

Instances
MimeType MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeTextXml -> [MediaType] Source #

mimeType :: Proxy MimeTextXml -> Maybe MediaType Source #

mimeType' :: MimeTextXml -> Maybe MediaType Source #

mimeTypes' :: MimeTextXml -> [MediaType] Source #

MimeType MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeAny Source #
"*/*"
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeAny -> [MediaType] Source #

mimeType :: Proxy MimeAny -> Maybe MediaType Source #

mimeType' :: MimeAny -> Maybe MediaType Source #

mimeTypes' :: MimeAny -> [MediaType] Source #

MimeType MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeNoContent -> [MediaType] Source #

mimeType :: Proxy MimeNoContent -> Maybe MediaType Source #

mimeType' :: MimeNoContent -> Maybe MediaType Source #

mimeTypes' :: MimeNoContent -> [MediaType] Source #

MimeType MimeOctetStream Source #
application/octet-stream
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimePlainText Source #
text/plain; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimePlainText -> [MediaType] Source #

mimeType :: Proxy MimePlainText -> Maybe MediaType Source #

mimeType' :: MimePlainText -> Maybe MediaType Source #

mimeTypes' :: MimePlainText -> [MediaType] Source #

MimeType MimeXML Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeXML -> [MediaType] Source #

mimeType :: Proxy MimeXML -> Maybe MediaType Source #

mimeType' :: MimeXML -> Maybe MediaType Source #

mimeTypes' :: MimeXML -> [MediaType] Source #

MimeType MimeJSON Source #
application/json; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeJSON -> [MediaType] Source #

mimeType :: Proxy MimeJSON -> Maybe MediaType Source #

mimeType' :: MimeJSON -> Maybe MediaType Source #

mimeTypes' :: MimeJSON -> [MediaType] Source #

MimeRender Class

class MimeType mtype => MimeRender mtype x where Source #

Minimal complete definition

mimeRender

Methods

mimeRender :: Proxy mtype -> x -> ByteString Source #

mimeRender' :: mtype -> x -> ByteString Source #

Instances
MimeRender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Bool Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Char Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Double Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Float Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Int Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Integer Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData String Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData ByteString Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Text Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToForm a => MimeRender MimeFormUrlEncoded a Source #
WH.urlEncodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

ToJSON a => MimeRender MimeJSON a Source #

encode

Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender Class

class MimeType mtype => MimeUnrender mtype o where Source #

Minimal complete definition

mimeUnrender

Instances
MimeUnrender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
Instance details

Defined in OpenAPIPetstore.MimeTypes

FromForm a => MimeUnrender MimeFormUrlEncoded a Source #
P.left T.unpack . WH.urlDecodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
Instance details

Defined in OpenAPIPetstore.MimeTypes

FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode
Instance details

Defined in OpenAPIPetstore.MimeTypes

Custom Mime Types

MimeXmlCharsetutf16

data MimeXmlCharsetutf16 Source #

Constructors

MimeXmlCharsetutf16 
Instances
MimeType MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeXmlCharsetutf8

data MimeXmlCharsetutf8 Source #

Constructors

MimeXmlCharsetutf8 
Instances
MimeType MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeTextXml

data MimeTextXml Source #

Constructors

MimeTextXml 
Instances
MimeType MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeTextXml -> [MediaType] Source #

mimeType :: Proxy MimeTextXml -> Maybe MediaType Source #

mimeType' :: MimeTextXml -> Maybe MediaType Source #

mimeTypes' :: MimeTextXml -> [MediaType] Source #

Consumes CreateXmlItem MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeTextXmlCharsetutf16

MimeTextXmlCharsetutf8

\ No newline at end of file +OpenAPIPetstore.MimeTypes

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Safe HaskellNone
LanguageHaskell2010

OpenAPIPetstore.MimeTypes

Description

 

ContentType MimeType

data ContentType a Source #

Constructors

MimeType a => ContentType 

Fields

Accept MimeType

data Accept a Source #

Constructors

MimeType a => Accept 

Fields

Consumes Class

class MimeType mtype => Consumes req mtype Source #

Instances
MimeType mtype => Consumes UpdateUser mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes CreateUsersWithListInput mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes CreateUsersWithArrayInput mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes CreateUser mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes PlaceOrder mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Store

Consumes UploadFileWithRequiredFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePetWithForm MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes AddPet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes AddPet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Consumes TestJsonFormData MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestInlineAdditionalProperties MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEnumParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEndpointParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithQueryParams MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithFileSchema MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterStringSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterNumberSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterCompositeSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterBooleanSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Produces Class

class MimeType mtype => Produces req mtype Source #

Instances
Produces UpdateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces LogoutUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces DeleteUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithListInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithArrayInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces PlaceOrder MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetInventory MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces DeleteOrder MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Store

Produces UploadFileWithRequiredFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePetWithForm MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeletePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces AddPet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Produces TestQueryParameterCollectionFormat MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestJsonFormData MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestInlineAdditionalProperties MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestGroupParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEnumParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEndpointParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithQueryParams MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithFileSchema MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterStringSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterNumberSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterCompositeSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterBooleanSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces CreateXmlItem MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Default Mime Types

data MimeJSON Source #

Constructors

MimeJSON 
Instances
MimeType MimeJSON Source #
application/json; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeJSON -> [MediaType] Source #

mimeType :: Proxy MimeJSON -> Maybe MediaType Source #

mimeType' :: MimeJSON -> Maybe MediaType Source #

mimeTypes' :: MimeJSON -> [MediaType] Source #

FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode
Instance details

Defined in OpenAPIPetstore.MimeTypes

ToJSON a => MimeRender MimeJSON a Source #

encode

Instance details

Defined in OpenAPIPetstore.MimeTypes

Produces LoginUser MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces PlaceOrder MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetInventory MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces UploadFileWithRequiredFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Produces TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Consumes UpdatePet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes AddPet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Consumes TestInlineAdditionalProperties MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithQueryParams MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithFileSchema MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

data MimeXML Source #

Constructors

MimeXML 
Instances
MimeType MimeXML Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeXML -> [MediaType] Source #

mimeType :: Proxy MimeXML -> Maybe MediaType Source #

mimeType' :: MimeXML -> Maybe MediaType Source #

mimeTypes' :: MimeXML -> [MediaType] Source #

Produces LoginUser MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces PlaceOrder MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetPetById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes AddPet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes CreateXmlItem MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

data MimePlainText Source #

Constructors

MimePlainText 
Instances
MimeType MimePlainText Source #
text/plain; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimePlainText -> [MediaType] Source #

mimeType :: Proxy MimePlainText -> Maybe MediaType Source #

mimeType' :: MimePlainText -> Maybe MediaType Source #

mimeTypes' :: MimePlainText -> [MediaType] Source #

MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeFormUrlEncoded Source #

Constructors

MimeFormUrlEncoded 
Instances
MimeType MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.MimeTypes

FromForm a => MimeUnrender MimeFormUrlEncoded a Source #
P.left T.unpack . WH.urlDecodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

ToForm a => MimeRender MimeFormUrlEncoded a Source #
WH.urlEncodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes UpdatePetWithForm MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes TestJsonFormData MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEnumParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEndpointParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

data MimeMultipartFormData Source #

Constructors

MimeMultipartFormData 
Instances
MimeType MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Bool Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Char Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Double Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Float Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Int Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Integer Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData String Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData ByteString Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Text Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Consumes UploadFileWithRequiredFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

data MimeOctetStream Source #

Constructors

MimeOctetStream 
Instances
MimeType MimeOctetStream Source #
application/octet-stream
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeNoContent Source #

Constructors

MimeNoContent 
Instances
MimeType MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeNoContent -> [MediaType] Source #

mimeType :: Proxy MimeNoContent -> Maybe MediaType Source #

mimeType' :: MimeNoContent -> Maybe MediaType Source #

mimeTypes' :: MimeNoContent -> [MediaType] Source #

MimeUnrender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

Produces UpdateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces LogoutUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces DeleteUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithListInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithArrayInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces DeleteOrder MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Store

Produces UpdatePetWithForm MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeletePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces AddPet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces TestQueryParameterCollectionFormat MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestJsonFormData MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestInlineAdditionalProperties MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestGroupParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEnumParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEndpointParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithQueryParams MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithFileSchema MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces CreateXmlItem MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

data MimeAny Source #

Constructors

MimeAny 
Instances
MimeType MimeAny Source #
"*/*"
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeAny -> [MediaType] Source #

mimeType :: Proxy MimeAny -> Maybe MediaType Source #

mimeType' :: MimeAny -> Maybe MediaType Source #

mimeTypes' :: MimeAny -> [MediaType] Source #

data NoContent Source #

A type for responses without content-body.

Constructors

NoContent 

MimeType Class

class Typeable mtype => MimeType mtype where Source #

Minimal complete definition

mimeType | mimeTypes

Methods

mimeTypes :: Proxy mtype -> [MediaType] Source #

mimeType :: Proxy mtype -> Maybe MediaType Source #

mimeType' :: mtype -> Maybe MediaType Source #

mimeTypes' :: mtype -> [MediaType] Source #

Instances
MimeType MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeTextXml -> [MediaType] Source #

mimeType :: Proxy MimeTextXml -> Maybe MediaType Source #

mimeType' :: MimeTextXml -> Maybe MediaType Source #

mimeTypes' :: MimeTextXml -> [MediaType] Source #

MimeType MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeAny Source #
"*/*"
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeAny -> [MediaType] Source #

mimeType :: Proxy MimeAny -> Maybe MediaType Source #

mimeType' :: MimeAny -> Maybe MediaType Source #

mimeTypes' :: MimeAny -> [MediaType] Source #

MimeType MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeNoContent -> [MediaType] Source #

mimeType :: Proxy MimeNoContent -> Maybe MediaType Source #

mimeType' :: MimeNoContent -> Maybe MediaType Source #

mimeTypes' :: MimeNoContent -> [MediaType] Source #

MimeType MimeOctetStream Source #
application/octet-stream
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimePlainText Source #
text/plain; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimePlainText -> [MediaType] Source #

mimeType :: Proxy MimePlainText -> Maybe MediaType Source #

mimeType' :: MimePlainText -> Maybe MediaType Source #

mimeTypes' :: MimePlainText -> [MediaType] Source #

MimeType MimeXML Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeXML -> [MediaType] Source #

mimeType :: Proxy MimeXML -> Maybe MediaType Source #

mimeType' :: MimeXML -> Maybe MediaType Source #

mimeTypes' :: MimeXML -> [MediaType] Source #

MimeType MimeJSON Source #
application/json; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeJSON -> [MediaType] Source #

mimeType :: Proxy MimeJSON -> Maybe MediaType Source #

mimeType' :: MimeJSON -> Maybe MediaType Source #

mimeTypes' :: MimeJSON -> [MediaType] Source #

MimeRender Class

class MimeType mtype => MimeRender mtype x where Source #

Minimal complete definition

mimeRender

Methods

mimeRender :: Proxy mtype -> x -> ByteString Source #

mimeRender' :: mtype -> x -> ByteString Source #

Instances
MimeRender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Bool Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Char Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Double Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Float Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Int Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Integer Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData String Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData ByteString Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Text Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToForm a => MimeRender MimeFormUrlEncoded a Source #
WH.urlEncodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

ToJSON a => MimeRender MimeJSON a Source #

encode

Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender Class

class MimeType mtype => MimeUnrender mtype o where Source #

Minimal complete definition

mimeUnrender

Instances
MimeUnrender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
Instance details

Defined in OpenAPIPetstore.MimeTypes

FromForm a => MimeUnrender MimeFormUrlEncoded a Source #
P.left T.unpack . WH.urlDecodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
Instance details

Defined in OpenAPIPetstore.MimeTypes

FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode
Instance details

Defined in OpenAPIPetstore.MimeTypes

Custom Mime Types

MimeXmlCharsetutf16

data MimeXmlCharsetutf16 Source #

Constructors

MimeXmlCharsetutf16 
Instances
MimeType MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeXmlCharsetutf8

data MimeXmlCharsetutf8 Source #

Constructors

MimeXmlCharsetutf8 
Instances
MimeType MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeTextXml

data MimeTextXml Source #

Constructors

MimeTextXml 
Instances
MimeType MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeTextXml -> [MediaType] Source #

mimeType :: Proxy MimeTextXml -> Maybe MediaType Source #

mimeType' :: MimeTextXml -> Maybe MediaType Source #

mimeTypes' :: MimeTextXml -> [MediaType] Source #

Consumes CreateXmlItem MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeTextXmlCharsetutf16

MimeTextXmlCharsetutf8

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Model.html b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Model.html index 012635d257..32fea81c6d 100644 --- a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Model.html +++ b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Model.html @@ -1,9 +1,9 @@ -OpenAPIPetstore.Model

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Safe HaskellNone
LanguageHaskell2010

OpenAPIPetstore.Model

Description

 
Synopsis

Parameter newtypes

AdditionalMetadata

newtype AdditionalMetadata Source #

Instances
Eq AdditionalMetadata Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show AdditionalMetadata Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UploadFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

ApiKey

newtype ApiKey Source #

Constructors

ApiKey 

Fields

Instances
Eq ApiKey Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: ApiKey -> ApiKey -> Bool #

(/=) :: ApiKey -> ApiKey -> Bool #

Show ApiKey Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam DeletePet ApiKey Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

Body

newtype Body Source #

Constructors

Body 

Fields

Instances
Eq Body Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Body -> Body -> Bool #

(/=) :: Body -> Body -> Bool #

Show Body Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Body -> ShowS #

show :: Body -> String #

showList :: [Body] -> ShowS #

ToJSON Body Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Body -> Value

toEncoding :: Body -> Encoding

toJSONList :: [Body] -> Value

toEncodingList :: [Body] -> Encoding

HasBodyParam CreateUsersWithListInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

HasBodyParam CreateUsersWithArrayInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

BodyBool

newtype BodyBool Source #

Constructors

BodyBool 

Fields

Instances
Eq BodyBool Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show BodyBool Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON BodyBool Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: BodyBool -> Value

toEncoding :: BodyBool -> Encoding

toJSONList :: [BodyBool] -> Value

toEncodingList :: [BodyBool] -> Encoding

HasBodyParam FakeOuterBooleanSerialize BodyBool Source #

Body Param "body" - Input boolean as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

BodyDouble

newtype BodyDouble Source #

Constructors

BodyDouble 

Fields

Instances
Eq BodyDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show BodyDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON BodyDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: BodyDouble -> Value

toEncoding :: BodyDouble -> Encoding

toJSONList :: [BodyDouble] -> Value

toEncodingList :: [BodyDouble] -> Encoding

HasBodyParam FakeOuterNumberSerialize BodyDouble Source #

Body Param "body" - Input number as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

BodyText

newtype BodyText Source #

Constructors

BodyText 

Fields

Instances
Eq BodyText Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show BodyText Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON BodyText Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: BodyText -> Value

toEncoding :: BodyText -> Encoding

toJSONList :: [BodyText] -> Value

toEncodingList :: [BodyText] -> Encoding

HasBodyParam FakeOuterStringSerialize BodyText Source #

Body Param "body" - Input string as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

BooleanGroup

newtype BooleanGroup Source #

Constructors

BooleanGroup 

Fields

Instances
Eq BooleanGroup Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show BooleanGroup Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestGroupParameters BooleanGroup Source #

Optional Param "boolean_group" - Boolean in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

Byte

newtype Byte Source #

Constructors

Byte 

Fields

Instances
Eq Byte Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Byte -> Byte -> Bool #

(/=) :: Byte -> Byte -> Bool #

Show Byte Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Byte -> ShowS #

show :: Byte -> String #

showList :: [Byte] -> ShowS #

Callback

newtype Callback Source #

Constructors

Callback 

Fields

Instances
Eq Callback Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Callback Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestEndpointParameters Callback Source #

Optional Param "callback" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

Context

newtype Context Source #

Constructors

Context 

Fields

Instances
Eq Context Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Context -> Context -> Bool #

(/=) :: Context -> Context -> Bool #

Show Context Source # 
Instance details

Defined in OpenAPIPetstore.Model

EnumFormString

newtype EnumFormString Source #

Instances
Eq EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestEnumParameters EnumFormString Source #

Optional Param "enum_form_string" - Form parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

EnumFormStringArray

EnumHeaderString

EnumHeaderStringArray

EnumQueryDouble

newtype EnumQueryDouble Source #

Instances
Eq EnumQueryDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show EnumQueryDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestEnumParameters EnumQueryDouble Source #

Optional Param "enum_query_double" - Query parameter enum test (double)

Instance details

Defined in OpenAPIPetstore.API.Fake

EnumQueryInteger

EnumQueryString

EnumQueryStringArray

File2

newtype File2 Source #

Constructors

File2 

Fields

Instances
Eq File2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: File2 -> File2 -> Bool #

(/=) :: File2 -> File2 -> Bool #

Show File2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> File2 -> ShowS #

show :: File2 -> String #

showList :: [File2] -> ShowS #

HasOptionalParam UploadFile File2 Source #

Optional Param "file" - file to upload

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

Http

newtype Http Source #

Constructors

Http 

Fields

Instances
Eq Http Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Http -> Http -> Bool #

(/=) :: Http -> Http -> Bool #

Show Http Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Http -> ShowS #

show :: Http -> String #

showList :: [Http] -> ShowS #

Int32

newtype Int32 Source #

Constructors

Int32 

Fields

Instances
Eq Int32 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Int32 -> Int32 -> Bool #

(/=) :: Int32 -> Int32 -> Bool #

Show Int32 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

HasOptionalParam TestEndpointParameters Int32 Source #

Optional Param "int32" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

Int64

newtype Int64 Source #

Constructors

Int64 

Fields

Instances
Eq Int64 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Int64 -> Int64 -> Bool #

(/=) :: Int64 -> Int64 -> Bool #

Show Int64 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

HasOptionalParam TestEndpointParameters Int64 Source #

Optional Param "int64" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

Int64Group

newtype Int64Group Source #

Constructors

Int64Group 
Instances
Eq Int64Group Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Int64Group Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestGroupParameters Int64Group Source #

Optional Param "int64_group" - Integer in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

Ioutil

newtype Ioutil Source #

Constructors

Ioutil 

Fields

Instances
Eq Ioutil Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Ioutil -> Ioutil -> Bool #

(/=) :: Ioutil -> Ioutil -> Bool #

Show Ioutil Source # 
Instance details

Defined in OpenAPIPetstore.Model

Name2

newtype Name2 Source #

Constructors

Name2 

Fields

Instances
Eq Name2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Name2 -> Name2 -> Bool #

(/=) :: Name2 -> Name2 -> Bool #

Show Name2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Name2 -> ShowS #

show :: Name2 -> String #

showList :: [Name2] -> ShowS #

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

Number

newtype Number Source #

Constructors

Number 

Fields

Instances
Eq Number Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Number -> Number -> Bool #

(/=) :: Number -> Number -> Bool #

Show Number Source # 
Instance details

Defined in OpenAPIPetstore.Model

OrderId

newtype OrderId Source #

Constructors

OrderId 

Fields

Instances
Eq OrderId Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: OrderId -> OrderId -> Bool #

(/=) :: OrderId -> OrderId -> Bool #

Show OrderId Source # 
Instance details

Defined in OpenAPIPetstore.Model

OrderIdText

newtype OrderIdText Source #

Constructors

OrderIdText 

Fields

Instances
Eq OrderIdText Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show OrderIdText Source # 
Instance details

Defined in OpenAPIPetstore.Model

Param

newtype Param Source #

Constructors

Param 

Fields

Instances
Eq Param Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Param -> Param -> Bool #

(/=) :: Param -> Param -> Bool #

Show Param Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Param -> ShowS #

show :: Param -> String #

showList :: [Param] -> ShowS #

Param2

newtype Param2 Source #

Constructors

Param2 

Fields

Instances
Eq Param2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Param2 -> Param2 -> Bool #

(/=) :: Param2 -> Param2 -> Bool #

Show Param2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

ParamBinary

ParamDate

newtype ParamDate Source #

Constructors

ParamDate 

Fields

Instances
Eq ParamDate Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ParamDate Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestEndpointParameters ParamDate Source #

Optional Param "date" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

ParamDateTime

ParamDouble

newtype ParamDouble Source #

Constructors

ParamDouble 
Instances
Eq ParamDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ParamDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

ParamFloat

ParamInteger

ParamMapMapStringText

ParamString

Password

newtype Password Source #

Constructors

Password 

Fields

Instances
Eq Password Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Password Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestEndpointParameters Password Source #

Optional Param "password" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

PatternWithoutDelimiter

PetId

newtype PetId Source #

Constructors

PetId 

Fields

Instances
Eq PetId Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: PetId -> PetId -> Bool #

(/=) :: PetId -> PetId -> Bool #

Show PetId Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> PetId -> ShowS #

show :: PetId -> String #

showList :: [PetId] -> ShowS #

Pipe

newtype Pipe Source #

Constructors

Pipe 

Fields

Instances
Eq Pipe Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Pipe -> Pipe -> Bool #

(/=) :: Pipe -> Pipe -> Bool #

Show Pipe Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Pipe -> ShowS #

show :: Pipe -> String #

showList :: [Pipe] -> ShowS #

Query

newtype Query Source #

Constructors

Query 

Fields

Instances
Eq Query Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Query -> Query -> Bool #

(/=) :: Query -> Query -> Bool #

Show Query Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Query -> ShowS #

show :: Query -> String #

showList :: [Query] -> ShowS #

RequiredBooleanGroup

RequiredFile

RequiredInt64Group

RequiredStringGroup

Status

newtype Status Source #

Constructors

Status 

Fields

Instances
Eq Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Status -> Status -> Bool #

(/=) :: Status -> Status -> Bool #

Show Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

StatusText

newtype StatusText Source #

Constructors

StatusText 

Fields

Instances
Eq StatusText Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show StatusText Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam UpdatePetWithForm StatusText Source #

Optional Param "status" - Updated status of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

StringGroup

newtype StringGroup Source #

Constructors

StringGroup 

Fields

Instances
Eq StringGroup Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show StringGroup Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestGroupParameters StringGroup Source #

Optional Param "string_group" - String in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

Tags

newtype Tags Source #

Constructors

Tags 

Fields

Instances
Eq Tags Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Tags -> Tags -> Bool #

(/=) :: Tags -> Tags -> Bool #

Show Tags Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Tags -> ShowS #

show :: Tags -> String #

showList :: [Tags] -> ShowS #

Url

newtype Url Source #

Constructors

Url 

Fields

Instances
Eq Url Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Url -> Url -> Bool #

(/=) :: Url -> Url -> Bool #

Show Url Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Url -> ShowS #

show :: Url -> String #

showList :: [Url] -> ShowS #

Username

newtype Username Source #

Constructors

Username 

Fields

Instances
Eq Username Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Username Source # 
Instance details

Defined in OpenAPIPetstore.Model

Models

AdditionalPropertiesAnyType

mkAdditionalPropertiesAnyType :: AdditionalPropertiesAnyType Source #

Construct a value of type AdditionalPropertiesAnyType (by applying it's required fields, if any)

AdditionalPropertiesArray

mkAdditionalPropertiesArray :: AdditionalPropertiesArray Source #

Construct a value of type AdditionalPropertiesArray (by applying it's required fields, if any)

AdditionalPropertiesBoolean

mkAdditionalPropertiesBoolean :: AdditionalPropertiesBoolean Source #

Construct a value of type AdditionalPropertiesBoolean (by applying it's required fields, if any)

AdditionalPropertiesClass

data AdditionalPropertiesClass Source #

AdditionalPropertiesClass

mkAdditionalPropertiesClass :: AdditionalPropertiesClass Source #

Construct a value of type AdditionalPropertiesClass (by applying it's required fields, if any)

AdditionalPropertiesInteger

mkAdditionalPropertiesInteger :: AdditionalPropertiesInteger Source #

Construct a value of type AdditionalPropertiesInteger (by applying it's required fields, if any)

AdditionalPropertiesNumber

mkAdditionalPropertiesNumber :: AdditionalPropertiesNumber Source #

Construct a value of type AdditionalPropertiesNumber (by applying it's required fields, if any)

AdditionalPropertiesObject

mkAdditionalPropertiesObject :: AdditionalPropertiesObject Source #

Construct a value of type AdditionalPropertiesObject (by applying it's required fields, if any)

AdditionalPropertiesString

mkAdditionalPropertiesString :: AdditionalPropertiesString Source #

Construct a value of type AdditionalPropertiesString (by applying it's required fields, if any)

Animal

data Animal Source #

Animal

Constructors

Animal 

Fields

Instances
Eq Animal Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Animal -> Animal -> Bool #

(/=) :: Animal -> Animal -> Bool #

Show Animal Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON Animal Source #

ToJSON Animal

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Animal -> Value

toEncoding :: Animal -> Encoding

toJSONList :: [Animal] -> Value

toEncodingList :: [Animal] -> Encoding

FromJSON Animal Source #

FromJSON Animal

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Animal

parseJSONList :: Value -> Parser [Animal]

mkAnimal Source #

Arguments

:: Text

animalClassName

-> Animal 

Construct a value of type Animal (by applying it's required fields, if any)

ApiResponse

data ApiResponse Source #

ApiResponse

Constructors

ApiResponse 

Fields

Instances
Eq ApiResponse Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ApiResponse Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ApiResponse Source #

ToJSON ApiResponse

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ApiResponse -> Value

toEncoding :: ApiResponse -> Encoding

toJSONList :: [ApiResponse] -> Value

toEncodingList :: [ApiResponse] -> Encoding

FromJSON ApiResponse Source #

FromJSON ApiResponse

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ApiResponse

parseJSONList :: Value -> Parser [ApiResponse]

mkApiResponse :: ApiResponse Source #

Construct a value of type ApiResponse (by applying it's required fields, if any)

ArrayOfArrayOfNumberOnly

mkArrayOfArrayOfNumberOnly :: ArrayOfArrayOfNumberOnly Source #

Construct a value of type ArrayOfArrayOfNumberOnly (by applying it's required fields, if any)

ArrayOfNumberOnly

data ArrayOfNumberOnly Source #

ArrayOfNumberOnly

Instances
Eq ArrayOfNumberOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ArrayOfNumberOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ArrayOfNumberOnly Source #

ToJSON ArrayOfNumberOnly

Instance details

Defined in OpenAPIPetstore.Model

FromJSON ArrayOfNumberOnly Source #

FromJSON ArrayOfNumberOnly

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ArrayOfNumberOnly

parseJSONList :: Value -> Parser [ArrayOfNumberOnly]

mkArrayOfNumberOnly :: ArrayOfNumberOnly Source #

Construct a value of type ArrayOfNumberOnly (by applying it's required fields, if any)

ArrayTest

data ArrayTest Source #

ArrayTest

Constructors

ArrayTest 

Fields

Instances
Eq ArrayTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ArrayTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ArrayTest Source #

ToJSON ArrayTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ArrayTest -> Value

toEncoding :: ArrayTest -> Encoding

toJSONList :: [ArrayTest] -> Value

toEncodingList :: [ArrayTest] -> Encoding

FromJSON ArrayTest Source #

FromJSON ArrayTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ArrayTest

parseJSONList :: Value -> Parser [ArrayTest]

mkArrayTest :: ArrayTest Source #

Construct a value of type ArrayTest (by applying it's required fields, if any)

Capitalization

data Capitalization Source #

Capitalization

Instances
Eq Capitalization Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Capitalization Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON Capitalization Source #

ToJSON Capitalization

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Capitalization -> Value

toEncoding :: Capitalization -> Encoding

toJSONList :: [Capitalization] -> Value

toEncodingList :: [Capitalization] -> Encoding

FromJSON Capitalization Source #

FromJSON Capitalization

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Capitalization

parseJSONList :: Value -> Parser [Capitalization]

mkCapitalization :: Capitalization Source #

Construct a value of type Capitalization (by applying it's required fields, if any)

Cat

data Cat Source #

Cat

Constructors

Cat 

Fields

Instances
Eq Cat Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Cat -> Cat -> Bool #

(/=) :: Cat -> Cat -> Bool #

Show Cat Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Cat -> ShowS #

show :: Cat -> String #

showList :: [Cat] -> ShowS #

ToJSON Cat Source #

ToJSON Cat

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Cat -> Value

toEncoding :: Cat -> Encoding

toJSONList :: [Cat] -> Value

toEncodingList :: [Cat] -> Encoding

FromJSON Cat Source #

FromJSON Cat

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Cat

parseJSONList :: Value -> Parser [Cat]

mkCat Source #

Arguments

:: Text

catClassName

-> Cat 

Construct a value of type Cat (by applying it's required fields, if any)

CatAllOf

data CatAllOf Source #

CatAllOf

Constructors

CatAllOf 

Fields

Instances
Eq CatAllOf Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show CatAllOf Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON CatAllOf Source #

ToJSON CatAllOf

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: CatAllOf -> Value

toEncoding :: CatAllOf -> Encoding

toJSONList :: [CatAllOf] -> Value

toEncodingList :: [CatAllOf] -> Encoding

FromJSON CatAllOf Source #

FromJSON CatAllOf

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser CatAllOf

parseJSONList :: Value -> Parser [CatAllOf]

mkCatAllOf :: CatAllOf Source #

Construct a value of type CatAllOf (by applying it's required fields, if any)

Category

data Category Source #

Category

Constructors

Category 

Fields

Instances
Eq Category Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Category Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON Category Source #

ToJSON Category

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Category -> Value

toEncoding :: Category -> Encoding

toJSONList :: [Category] -> Value

toEncodingList :: [Category] -> Encoding

FromJSON Category Source #

FromJSON Category

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Category

parseJSONList :: Value -> Parser [Category]

mkCategory Source #

Arguments

:: Text

categoryName

-> Category 

Construct a value of type Category (by applying it's required fields, if any)

ClassModel

data ClassModel Source #

ClassModel +OpenAPIPetstore.Model

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Safe HaskellNone
LanguageHaskell2010

OpenAPIPetstore.Model

Description

 
Synopsis

Parameter newtypes

AdditionalMetadata

newtype AdditionalMetadata Source #

Instances
Eq AdditionalMetadata Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show AdditionalMetadata Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UploadFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

ApiKey

newtype ApiKey Source #

Constructors

ApiKey 

Fields

Instances
Eq ApiKey Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: ApiKey -> ApiKey -> Bool #

(/=) :: ApiKey -> ApiKey -> Bool #

Show ApiKey Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam DeletePet ApiKey Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

Body

newtype Body Source #

Constructors

Body 

Fields

Instances
Eq Body Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Body -> Body -> Bool #

(/=) :: Body -> Body -> Bool #

Show Body Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Body -> ShowS #

show :: Body -> String #

showList :: [Body] -> ShowS #

ToJSON Body Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Body -> Value

toEncoding :: Body -> Encoding

toJSONList :: [Body] -> Value

toEncodingList :: [Body] -> Encoding

HasBodyParam CreateUsersWithListInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

HasBodyParam CreateUsersWithArrayInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

BodyBool

newtype BodyBool Source #

Constructors

BodyBool 

Fields

Instances
Eq BodyBool Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show BodyBool Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON BodyBool Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: BodyBool -> Value

toEncoding :: BodyBool -> Encoding

toJSONList :: [BodyBool] -> Value

toEncodingList :: [BodyBool] -> Encoding

HasBodyParam FakeOuterBooleanSerialize BodyBool Source #

Body Param "body" - Input boolean as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

BodyDouble

newtype BodyDouble Source #

Constructors

BodyDouble 

Fields

Instances
Eq BodyDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show BodyDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON BodyDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: BodyDouble -> Value

toEncoding :: BodyDouble -> Encoding

toJSONList :: [BodyDouble] -> Value

toEncodingList :: [BodyDouble] -> Encoding

HasBodyParam FakeOuterNumberSerialize BodyDouble Source #

Body Param "body" - Input number as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

BodyText

newtype BodyText Source #

Constructors

BodyText 

Fields

Instances
Eq BodyText Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show BodyText Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON BodyText Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: BodyText -> Value

toEncoding :: BodyText -> Encoding

toJSONList :: [BodyText] -> Value

toEncodingList :: [BodyText] -> Encoding

HasBodyParam FakeOuterStringSerialize BodyText Source #

Body Param "body" - Input string as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

BooleanGroup

newtype BooleanGroup Source #

Constructors

BooleanGroup 

Fields

Instances
Eq BooleanGroup Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show BooleanGroup Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestGroupParameters BooleanGroup Source #

Optional Param "boolean_group" - Boolean in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

Byte

newtype Byte Source #

Constructors

Byte 

Fields

Instances
Eq Byte Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Byte -> Byte -> Bool #

(/=) :: Byte -> Byte -> Bool #

Show Byte Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Byte -> ShowS #

show :: Byte -> String #

showList :: [Byte] -> ShowS #

Callback

newtype Callback Source #

Constructors

Callback 

Fields

Instances
Eq Callback Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Callback Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestEndpointParameters Callback Source #

Optional Param "callback" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

Context

newtype Context Source #

Constructors

Context 

Fields

Instances
Eq Context Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Context -> Context -> Bool #

(/=) :: Context -> Context -> Bool #

Show Context Source # 
Instance details

Defined in OpenAPIPetstore.Model

EnumFormString

newtype EnumFormString Source #

Instances
Eq EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestEnumParameters EnumFormString Source #

Optional Param "enum_form_string" - Form parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

EnumFormStringArray

EnumHeaderString

EnumHeaderStringArray

EnumQueryDouble

newtype EnumQueryDouble Source #

Instances
Eq EnumQueryDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show EnumQueryDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestEnumParameters EnumQueryDouble Source #

Optional Param "enum_query_double" - Query parameter enum test (double)

Instance details

Defined in OpenAPIPetstore.API.Fake

EnumQueryInteger

EnumQueryString

EnumQueryStringArray

File2

newtype File2 Source #

Constructors

File2 

Fields

Instances
Eq File2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: File2 -> File2 -> Bool #

(/=) :: File2 -> File2 -> Bool #

Show File2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> File2 -> ShowS #

show :: File2 -> String #

showList :: [File2] -> ShowS #

HasOptionalParam UploadFile File2 Source #

Optional Param "file" - file to upload

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

Http

newtype Http Source #

Constructors

Http 

Fields

Instances
Eq Http Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Http -> Http -> Bool #

(/=) :: Http -> Http -> Bool #

Show Http Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Http -> ShowS #

show :: Http -> String #

showList :: [Http] -> ShowS #

Int32

newtype Int32 Source #

Constructors

Int32 

Fields

Instances
Eq Int32 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Int32 -> Int32 -> Bool #

(/=) :: Int32 -> Int32 -> Bool #

Show Int32 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

HasOptionalParam TestEndpointParameters Int32 Source #

Optional Param "int32" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

Int64

newtype Int64 Source #

Constructors

Int64 

Fields

Instances
Eq Int64 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Int64 -> Int64 -> Bool #

(/=) :: Int64 -> Int64 -> Bool #

Show Int64 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

HasOptionalParam TestEndpointParameters Int64 Source #

Optional Param "int64" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

Int64Group

newtype Int64Group Source #

Constructors

Int64Group 
Instances
Eq Int64Group Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Int64Group Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestGroupParameters Int64Group Source #

Optional Param "int64_group" - Integer in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

Ioutil

newtype Ioutil Source #

Constructors

Ioutil 

Fields

Instances
Eq Ioutil Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Ioutil -> Ioutil -> Bool #

(/=) :: Ioutil -> Ioutil -> Bool #

Show Ioutil Source # 
Instance details

Defined in OpenAPIPetstore.Model

Name2

newtype Name2 Source #

Constructors

Name2 

Fields

Instances
Eq Name2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Name2 -> Name2 -> Bool #

(/=) :: Name2 -> Name2 -> Bool #

Show Name2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Name2 -> ShowS #

show :: Name2 -> String #

showList :: [Name2] -> ShowS #

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

Number

newtype Number Source #

Constructors

Number 

Fields

Instances
Eq Number Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Number -> Number -> Bool #

(/=) :: Number -> Number -> Bool #

Show Number Source # 
Instance details

Defined in OpenAPIPetstore.Model

OrderId

newtype OrderId Source #

Constructors

OrderId 

Fields

Instances
Eq OrderId Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: OrderId -> OrderId -> Bool #

(/=) :: OrderId -> OrderId -> Bool #

Show OrderId Source # 
Instance details

Defined in OpenAPIPetstore.Model

OrderIdText

newtype OrderIdText Source #

Constructors

OrderIdText 

Fields

Instances
Eq OrderIdText Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show OrderIdText Source # 
Instance details

Defined in OpenAPIPetstore.Model

Param

newtype Param Source #

Constructors

Param 

Fields

Instances
Eq Param Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Param -> Param -> Bool #

(/=) :: Param -> Param -> Bool #

Show Param Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Param -> ShowS #

show :: Param -> String #

showList :: [Param] -> ShowS #

Param2

newtype Param2 Source #

Constructors

Param2 

Fields

Instances
Eq Param2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Param2 -> Param2 -> Bool #

(/=) :: Param2 -> Param2 -> Bool #

Show Param2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

ParamBinary

ParamDate

newtype ParamDate Source #

Constructors

ParamDate 

Fields

Instances
Eq ParamDate Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ParamDate Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestEndpointParameters ParamDate Source #

Optional Param "date" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

ParamDateTime

ParamDouble

newtype ParamDouble Source #

Constructors

ParamDouble 
Instances
Eq ParamDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ParamDouble Source # 
Instance details

Defined in OpenAPIPetstore.Model

ParamFloat

ParamInteger

ParamMapMapStringText

ParamString

Password

newtype Password Source #

Constructors

Password 

Fields

Instances
Eq Password Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Password Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestEndpointParameters Password Source #

Optional Param "password" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

PatternWithoutDelimiter

PetId

newtype PetId Source #

Constructors

PetId 

Fields

Instances
Eq PetId Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: PetId -> PetId -> Bool #

(/=) :: PetId -> PetId -> Bool #

Show PetId Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> PetId -> ShowS #

show :: PetId -> String #

showList :: [PetId] -> ShowS #

Pipe

newtype Pipe Source #

Constructors

Pipe 

Fields

Instances
Eq Pipe Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Pipe -> Pipe -> Bool #

(/=) :: Pipe -> Pipe -> Bool #

Show Pipe Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Pipe -> ShowS #

show :: Pipe -> String #

showList :: [Pipe] -> ShowS #

Query

newtype Query Source #

Constructors

Query 

Fields

Instances
Eq Query Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Query -> Query -> Bool #

(/=) :: Query -> Query -> Bool #

Show Query Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Query -> ShowS #

show :: Query -> String #

showList :: [Query] -> ShowS #

RequiredBooleanGroup

RequiredFile

RequiredInt64Group

RequiredStringGroup

Status

newtype Status Source #

Constructors

Status 

Fields

Instances
Eq Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Status -> Status -> Bool #

(/=) :: Status -> Status -> Bool #

Show Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

StatusText

newtype StatusText Source #

Constructors

StatusText 

Fields

Instances
Eq StatusText Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show StatusText Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam UpdatePetWithForm StatusText Source #

Optional Param "status" - Updated status of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

StringGroup

newtype StringGroup Source #

Constructors

StringGroup 

Fields

Instances
Eq StringGroup Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show StringGroup Source # 
Instance details

Defined in OpenAPIPetstore.Model

HasOptionalParam TestGroupParameters StringGroup Source #

Optional Param "string_group" - String in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

Tags

newtype Tags Source #

Constructors

Tags 

Fields

Instances
Eq Tags Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Tags -> Tags -> Bool #

(/=) :: Tags -> Tags -> Bool #

Show Tags Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Tags -> ShowS #

show :: Tags -> String #

showList :: [Tags] -> ShowS #

Url

newtype Url Source #

Constructors

Url 

Fields

Instances
Eq Url Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Url -> Url -> Bool #

(/=) :: Url -> Url -> Bool #

Show Url Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Url -> ShowS #

show :: Url -> String #

showList :: [Url] -> ShowS #

Username

newtype Username Source #

Constructors

Username 

Fields

Instances
Eq Username Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Username Source # 
Instance details

Defined in OpenAPIPetstore.Model

Models

AdditionalPropertiesAnyType

mkAdditionalPropertiesAnyType :: AdditionalPropertiesAnyType Source #

Construct a value of type AdditionalPropertiesAnyType (by applying it's required fields, if any)

AdditionalPropertiesArray

mkAdditionalPropertiesArray :: AdditionalPropertiesArray Source #

Construct a value of type AdditionalPropertiesArray (by applying it's required fields, if any)

AdditionalPropertiesBoolean

mkAdditionalPropertiesBoolean :: AdditionalPropertiesBoolean Source #

Construct a value of type AdditionalPropertiesBoolean (by applying it's required fields, if any)

AdditionalPropertiesClass

data AdditionalPropertiesClass Source #

AdditionalPropertiesClass

mkAdditionalPropertiesClass :: AdditionalPropertiesClass Source #

Construct a value of type AdditionalPropertiesClass (by applying it's required fields, if any)

AdditionalPropertiesInteger

mkAdditionalPropertiesInteger :: AdditionalPropertiesInteger Source #

Construct a value of type AdditionalPropertiesInteger (by applying it's required fields, if any)

AdditionalPropertiesNumber

mkAdditionalPropertiesNumber :: AdditionalPropertiesNumber Source #

Construct a value of type AdditionalPropertiesNumber (by applying it's required fields, if any)

AdditionalPropertiesObject

mkAdditionalPropertiesObject :: AdditionalPropertiesObject Source #

Construct a value of type AdditionalPropertiesObject (by applying it's required fields, if any)

AdditionalPropertiesString

mkAdditionalPropertiesString :: AdditionalPropertiesString Source #

Construct a value of type AdditionalPropertiesString (by applying it's required fields, if any)

Animal

data Animal Source #

Animal

Constructors

Animal 

Fields

Instances
Eq Animal Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Animal -> Animal -> Bool #

(/=) :: Animal -> Animal -> Bool #

Show Animal Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON Animal Source #

ToJSON Animal

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Animal -> Value

toEncoding :: Animal -> Encoding

toJSONList :: [Animal] -> Value

toEncodingList :: [Animal] -> Encoding

FromJSON Animal Source #

FromJSON Animal

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Animal

parseJSONList :: Value -> Parser [Animal]

mkAnimal Source #

Arguments

:: Text

animalClassName

-> Animal 

Construct a value of type Animal (by applying it's required fields, if any)

ApiResponse

data ApiResponse Source #

ApiResponse

Constructors

ApiResponse 

Fields

Instances
Eq ApiResponse Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ApiResponse Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ApiResponse Source #

ToJSON ApiResponse

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ApiResponse -> Value

toEncoding :: ApiResponse -> Encoding

toJSONList :: [ApiResponse] -> Value

toEncodingList :: [ApiResponse] -> Encoding

FromJSON ApiResponse Source #

FromJSON ApiResponse

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ApiResponse

parseJSONList :: Value -> Parser [ApiResponse]

mkApiResponse :: ApiResponse Source #

Construct a value of type ApiResponse (by applying it's required fields, if any)

ArrayOfArrayOfNumberOnly

mkArrayOfArrayOfNumberOnly :: ArrayOfArrayOfNumberOnly Source #

Construct a value of type ArrayOfArrayOfNumberOnly (by applying it's required fields, if any)

ArrayOfNumberOnly

data ArrayOfNumberOnly Source #

ArrayOfNumberOnly

Instances
Eq ArrayOfNumberOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ArrayOfNumberOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ArrayOfNumberOnly Source #

ToJSON ArrayOfNumberOnly

Instance details

Defined in OpenAPIPetstore.Model

FromJSON ArrayOfNumberOnly Source #

FromJSON ArrayOfNumberOnly

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ArrayOfNumberOnly

parseJSONList :: Value -> Parser [ArrayOfNumberOnly]

mkArrayOfNumberOnly :: ArrayOfNumberOnly Source #

Construct a value of type ArrayOfNumberOnly (by applying it's required fields, if any)

ArrayTest

data ArrayTest Source #

ArrayTest

Constructors

ArrayTest 

Fields

Instances
Eq ArrayTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ArrayTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ArrayTest Source #

ToJSON ArrayTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ArrayTest -> Value

toEncoding :: ArrayTest -> Encoding

toJSONList :: [ArrayTest] -> Value

toEncodingList :: [ArrayTest] -> Encoding

FromJSON ArrayTest Source #

FromJSON ArrayTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ArrayTest

parseJSONList :: Value -> Parser [ArrayTest]

mkArrayTest :: ArrayTest Source #

Construct a value of type ArrayTest (by applying it's required fields, if any)

Capitalization

data Capitalization Source #

Capitalization

Instances
Eq Capitalization Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Capitalization Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON Capitalization Source #

ToJSON Capitalization

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Capitalization -> Value

toEncoding :: Capitalization -> Encoding

toJSONList :: [Capitalization] -> Value

toEncodingList :: [Capitalization] -> Encoding

FromJSON Capitalization Source #

FromJSON Capitalization

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Capitalization

parseJSONList :: Value -> Parser [Capitalization]

mkCapitalization :: Capitalization Source #

Construct a value of type Capitalization (by applying it's required fields, if any)

Cat

data Cat Source #

Cat

Constructors

Cat 

Fields

Instances
Eq Cat Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Cat -> Cat -> Bool #

(/=) :: Cat -> Cat -> Bool #

Show Cat Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Cat -> ShowS #

show :: Cat -> String #

showList :: [Cat] -> ShowS #

ToJSON Cat Source #

ToJSON Cat

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Cat -> Value

toEncoding :: Cat -> Encoding

toJSONList :: [Cat] -> Value

toEncodingList :: [Cat] -> Encoding

FromJSON Cat Source #

FromJSON Cat

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Cat

parseJSONList :: Value -> Parser [Cat]

mkCat Source #

Arguments

:: Text

catClassName

-> Cat 

Construct a value of type Cat (by applying it's required fields, if any)

CatAllOf

data CatAllOf Source #

CatAllOf

Constructors

CatAllOf 

Fields

Instances
Eq CatAllOf Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show CatAllOf Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON CatAllOf Source #

ToJSON CatAllOf

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: CatAllOf -> Value

toEncoding :: CatAllOf -> Encoding

toJSONList :: [CatAllOf] -> Value

toEncodingList :: [CatAllOf] -> Encoding

FromJSON CatAllOf Source #

FromJSON CatAllOf

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser CatAllOf

parseJSONList :: Value -> Parser [CatAllOf]

mkCatAllOf :: CatAllOf Source #

Construct a value of type CatAllOf (by applying it's required fields, if any)

Category

data Category Source #

Category

Constructors

Category 

Fields

Instances
Eq Category Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Category Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON Category Source #

ToJSON Category

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Category -> Value

toEncoding :: Category -> Encoding

toJSONList :: [Category] -> Value

toEncodingList :: [Category] -> Encoding

FromJSON Category Source #

FromJSON Category

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Category

parseJSONList :: Value -> Parser [Category]

mkCategory Source #

Arguments

:: Text

categoryName

-> Category 

Construct a value of type Category (by applying it's required fields, if any)

ClassModel

data ClassModel Source #

ClassModel Model for testing model with "_class" property

Constructors

ClassModel 

Fields

Instances
Eq ClassModel Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ClassModel Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ClassModel Source #

ToJSON ClassModel

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ClassModel -> Value

toEncoding :: ClassModel -> Encoding

toJSONList :: [ClassModel] -> Value

toEncodingList :: [ClassModel] -> Encoding

FromJSON ClassModel Source #

FromJSON ClassModel

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ClassModel

parseJSONList :: Value -> Parser [ClassModel]

mkClassModel :: ClassModel Source #

Construct a value of type ClassModel (by applying it's required fields, if any)

Client

data Client Source #

Client

Constructors

Client 

Fields

Instances
Eq Client Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Client -> Client -> Bool #

(/=) :: Client -> Client -> Bool #

Show Client Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON Client Source #

ToJSON Client

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Client -> Value

toEncoding :: Client -> Encoding

toJSONList :: [Client] -> Value

toEncodingList :: [Client] -> Encoding

FromJSON Client Source #

FromJSON Client

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Client

parseJSONList :: Value -> Parser [Client]

HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Methods

setBodyParam :: (Consumes TestClassname contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest TestClassname contentType res accept -> Client -> OpenAPIPetstoreRequest TestClassname contentType res accept Source #

HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes TestClientModel contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest TestClientModel contentType res accept -> Client -> OpenAPIPetstoreRequest TestClientModel contentType res accept Source #

HasBodyParam Op123testSpecialTags Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Methods

setBodyParam :: (Consumes Op123testSpecialTags contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest Op123testSpecialTags contentType res accept -> Client -> OpenAPIPetstoreRequest Op123testSpecialTags contentType res accept Source #

mkClient :: Client Source #

Construct a value of type Client (by applying it's required fields, if any)

Dog

data Dog Source #

Dog

Constructors

Dog 

Fields

Instances
Eq Dog Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Dog -> Dog -> Bool #

(/=) :: Dog -> Dog -> Bool #

Show Dog Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Dog -> ShowS #

show :: Dog -> String #

showList :: [Dog] -> ShowS #

ToJSON Dog Source #

ToJSON Dog

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Dog -> Value

toEncoding :: Dog -> Encoding

toJSONList :: [Dog] -> Value

toEncodingList :: [Dog] -> Encoding

FromJSON Dog Source #

FromJSON Dog

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Dog

parseJSONList :: Value -> Parser [Dog]

mkDog Source #

Arguments

:: Text

dogClassName

-> Dog 

Construct a value of type Dog (by applying it's required fields, if any)

DogAllOf

data DogAllOf Source #

DogAllOf

Constructors

DogAllOf 

Fields

Instances
Eq DogAllOf Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show DogAllOf Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON DogAllOf Source #

ToJSON DogAllOf

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: DogAllOf -> Value

toEncoding :: DogAllOf -> Encoding

toJSONList :: [DogAllOf] -> Value

toEncodingList :: [DogAllOf] -> Encoding

FromJSON DogAllOf Source #

FromJSON DogAllOf

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser DogAllOf

parseJSONList :: Value -> Parser [DogAllOf]

mkDogAllOf :: DogAllOf Source #

Construct a value of type DogAllOf (by applying it's required fields, if any)

EnumArrays

data EnumArrays Source #

EnumArrays

Constructors

EnumArrays 

Fields

Instances
Eq EnumArrays Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show EnumArrays Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON EnumArrays Source #

ToJSON EnumArrays

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: EnumArrays -> Value

toEncoding :: EnumArrays -> Encoding

toJSONList :: [EnumArrays] -> Value

toEncodingList :: [EnumArrays] -> Encoding

FromJSON EnumArrays Source #

FromJSON EnumArrays

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser EnumArrays

parseJSONList :: Value -> Parser [EnumArrays]

mkEnumArrays :: EnumArrays Source #

Construct a value of type EnumArrays (by applying it's required fields, if any)

EnumTest

data EnumTest Source #

EnumTest

Constructors

EnumTest 

Fields

Instances
Eq EnumTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show EnumTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON EnumTest Source #

ToJSON EnumTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: EnumTest -> Value

toEncoding :: EnumTest -> Encoding

toJSONList :: [EnumTest] -> Value

toEncodingList :: [EnumTest] -> Encoding

FromJSON EnumTest Source #

FromJSON EnumTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser EnumTest

parseJSONList :: Value -> Parser [EnumTest]

mkEnumTest Source #

Construct a value of type EnumTest (by applying it's required fields, if any)

File

data File Source #

File - Must be named File for test.

Constructors

File 

Fields

Instances
Eq File Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: File -> File -> Bool #

(/=) :: File -> File -> Bool #

Show File Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> File -> ShowS #

show :: File -> String #

showList :: [File] -> ShowS #

ToJSON File Source #

ToJSON File

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: File -> Value

toEncoding :: File -> Encoding

toJSONList :: [File] -> Value

toEncodingList :: [File] -> Encoding

FromJSON File Source #

FromJSON File

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser File

parseJSONList :: Value -> Parser [File]

mkFile :: File Source #

Construct a value of type File (by applying it's required fields, if any)

FileSchemaTestClass

data FileSchemaTestClass Source #

FileSchemaTestClass

mkFileSchemaTestClass :: FileSchemaTestClass Source #

Construct a value of type FileSchemaTestClass (by applying it's required fields, if any)

FormatTest

data FormatTest Source #

FormatTest

Constructors

FormatTest 

Fields

Instances
Eq FormatTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show FormatTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON FormatTest Source #

ToJSON FormatTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: FormatTest -> Value

toEncoding :: FormatTest -> Encoding

toJSONList :: [FormatTest] -> Value

toEncodingList :: [FormatTest] -> Encoding

FromJSON FormatTest Source #

FromJSON FormatTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser FormatTest

parseJSONList :: Value -> Parser [FormatTest]

mkFormatTest Source #

Construct a value of type FormatTest (by applying it's required fields, if any)

HasOnlyReadOnly

data HasOnlyReadOnly Source #

HasOnlyReadOnly

Constructors

HasOnlyReadOnly 
Instances
Eq HasOnlyReadOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show HasOnlyReadOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON HasOnlyReadOnly Source #

ToJSON HasOnlyReadOnly

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: HasOnlyReadOnly -> Value

toEncoding :: HasOnlyReadOnly -> Encoding

toJSONList :: [HasOnlyReadOnly] -> Value

toEncodingList :: [HasOnlyReadOnly] -> Encoding

FromJSON HasOnlyReadOnly Source #

FromJSON HasOnlyReadOnly

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser HasOnlyReadOnly

parseJSONList :: Value -> Parser [HasOnlyReadOnly]

mkHasOnlyReadOnly :: HasOnlyReadOnly Source #

Construct a value of type HasOnlyReadOnly (by applying it's required fields, if any)

MapTest

data MapTest Source #

MapTest

Constructors

MapTest 

Fields

Instances
Eq MapTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: MapTest -> MapTest -> Bool #

(/=) :: MapTest -> MapTest -> Bool #

Show MapTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON MapTest Source #

ToJSON MapTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: MapTest -> Value

toEncoding :: MapTest -> Encoding

toJSONList :: [MapTest] -> Value

toEncodingList :: [MapTest] -> Encoding

FromJSON MapTest Source #

FromJSON MapTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser MapTest

parseJSONList :: Value -> Parser [MapTest]

mkMapTest :: MapTest Source #

Construct a value of type MapTest (by applying it's required fields, if any)

MixedPropertiesAndAdditionalPropertiesClass

data MixedPropertiesAndAdditionalPropertiesClass Source #

MixedPropertiesAndAdditionalPropertiesClass

Model200Response

data Model200Response Source #

Model200Response - Model for testing model name starting with number

Instances
Eq Model200Response Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Model200Response Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON Model200Response Source #

ToJSON Model200Response

Instance details

Defined in OpenAPIPetstore.Model

FromJSON Model200Response Source #

FromJSON Model200Response

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Model200Response

parseJSONList :: Value -> Parser [Model200Response]

mkModel200Response :: Model200Response Source #

Construct a value of type Model200Response (by applying it's required fields, if any)

ModelList

data ModelList Source #

ModelList

Constructors

ModelList 

Fields

Instances
Eq ModelList Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ModelList Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ModelList Source #

ToJSON ModelList

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ModelList -> Value

toEncoding :: ModelList -> Encoding

toJSONList :: [ModelList] -> Value

toEncodingList :: [ModelList] -> Encoding

FromJSON ModelList Source #

FromJSON ModelList

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ModelList

parseJSONList :: Value -> Parser [ModelList]

mkModelList :: ModelList Source #

Construct a value of type ModelList (by applying it's required fields, if any)

ModelReturn

data ModelReturn Source #

ModelReturn - Model for testing reserved words

Constructors

ModelReturn 

Fields

Instances
Eq ModelReturn Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ModelReturn Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ModelReturn Source #

ToJSON ModelReturn

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ModelReturn -> Value

toEncoding :: ModelReturn -> Encoding

toJSONList :: [ModelReturn] -> Value

toEncodingList :: [ModelReturn] -> Encoding

FromJSON ModelReturn Source #

FromJSON ModelReturn

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ModelReturn

parseJSONList :: Value -> Parser [ModelReturn]

mkModelReturn :: ModelReturn Source #

Construct a value of type ModelReturn (by applying it's required fields, if any)

Name

data Name Source #

Name - Model for testing model name same as property name

Constructors

Name 

Fields

Instances
Eq Name Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Name -> Name -> Bool #

(/=) :: Name -> Name -> Bool #

Show Name Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

ToJSON Name Source #

ToJSON Name

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Name -> Value

toEncoding :: Name -> Encoding

toJSONList :: [Name] -> Value

toEncodingList :: [Name] -> Encoding

FromJSON Name Source #

FromJSON Name

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Name

parseJSONList :: Value -> Parser [Name]

mkName Source #

Arguments

:: Int

nameName

-> Name 

Construct a value of type Name (by applying it's required fields, if any)

NumberOnly

data NumberOnly Source #

NumberOnly

Instances
Eq NumberOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show NumberOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON NumberOnly Source #

ToJSON NumberOnly

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: NumberOnly -> Value

toEncoding :: NumberOnly -> Encoding

toJSONList :: [NumberOnly] -> Value

toEncodingList :: [NumberOnly] -> Encoding

FromJSON NumberOnly Source #

FromJSON NumberOnly

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser NumberOnly

parseJSONList :: Value -> Parser [NumberOnly]

mkNumberOnly :: NumberOnly Source #

Construct a value of type NumberOnly (by applying it's required fields, if any)

Order

data Order Source #

Order

Constructors

Order 

Fields

Instances
Eq Order Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Order -> Order -> Bool #

(/=) :: Order -> Order -> Bool #

Show Order Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Order -> ShowS #

show :: Order -> String #

showList :: [Order] -> ShowS #

ToJSON Order Source #

ToJSON Order

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Order -> Value

toEncoding :: Order -> Encoding

toJSONList :: [Order] -> Value

toEncodingList :: [Order] -> Encoding

FromJSON Order Source #

FromJSON Order

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Order

parseJSONList :: Value -> Parser [Order]

HasBodyParam PlaceOrder Order Source #

Body Param "body" - order placed for purchasing the pet

Instance details

Defined in OpenAPIPetstore.API.Store

Methods

setBodyParam :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => OpenAPIPetstoreRequest PlaceOrder contentType res accept -> Order -> OpenAPIPetstoreRequest PlaceOrder contentType res accept Source #

mkOrder :: Order Source #

Construct a value of type Order (by applying it's required fields, if any)

OuterComposite

data OuterComposite Source #

OuterComposite

Constructors

OuterComposite 

Fields

Instances
Eq OuterComposite Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show OuterComposite Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON OuterComposite Source #

ToJSON OuterComposite

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: OuterComposite -> Value

toEncoding :: OuterComposite -> Encoding

toJSONList :: [OuterComposite] -> Value

toEncodingList :: [OuterComposite] -> Encoding

FromJSON OuterComposite Source #

FromJSON OuterComposite

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser OuterComposite

parseJSONList :: Value -> Parser [OuterComposite]

HasBodyParam FakeOuterCompositeSerialize OuterComposite Source #

Body Param "body" - Input composite as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

mkOuterComposite :: OuterComposite Source #

Construct a value of type OuterComposite (by applying it's required fields, if any)

Pet

data Pet Source #

Pet

Constructors

Pet 

Fields

Instances
Eq Pet Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Pet -> Pet -> Bool #

(/=) :: Pet -> Pet -> Bool #

Show Pet Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Pet -> ShowS #

show :: Pet -> String #

showList :: [Pet] -> ShowS #

ToJSON Pet Source #

ToJSON Pet

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Pet -> Value

toEncoding :: Pet -> Encoding

toJSONList :: [Pet] -> Value

toEncodingList :: [Pet] -> Encoding

FromJSON Pet Source #

FromJSON Pet

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Pet

parseJSONList :: Value -> Parser [Pet]

HasBodyParam UpdatePet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes UpdatePet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest UpdatePet contentType res accept -> Pet -> OpenAPIPetstoreRequest UpdatePet contentType res accept Source #

HasBodyParam AddPet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes AddPet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest AddPet contentType res accept -> Pet -> OpenAPIPetstoreRequest AddPet contentType res accept Source #

mkPet Source #

Arguments

:: Text

petName

-> [Text]

petPhotoUrls

-> Pet 

Construct a value of type Pet (by applying it's required fields, if any)

ReadOnlyFirst

data ReadOnlyFirst Source #

ReadOnlyFirst

Constructors

ReadOnlyFirst 
Instances
Eq ReadOnlyFirst Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ReadOnlyFirst Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ReadOnlyFirst Source #

ToJSON ReadOnlyFirst

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ReadOnlyFirst -> Value

toEncoding :: ReadOnlyFirst -> Encoding

toJSONList :: [ReadOnlyFirst] -> Value

toEncodingList :: [ReadOnlyFirst] -> Encoding

FromJSON ReadOnlyFirst Source #

FromJSON ReadOnlyFirst

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ReadOnlyFirst

parseJSONList :: Value -> Parser [ReadOnlyFirst]

mkReadOnlyFirst :: ReadOnlyFirst Source #

Construct a value of type ReadOnlyFirst (by applying it's required fields, if any)

SpecialModelName

data SpecialModelName Source #

SpecialModelName

Constructors

SpecialModelName 

Fields

Instances
Eq SpecialModelName Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show SpecialModelName Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON SpecialModelName Source #

ToJSON SpecialModelName

Instance details

Defined in OpenAPIPetstore.Model

FromJSON SpecialModelName Source #

FromJSON SpecialModelName

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser SpecialModelName

parseJSONList :: Value -> Parser [SpecialModelName]

mkSpecialModelName :: SpecialModelName Source #

Construct a value of type SpecialModelName (by applying it's required fields, if any)

Tag

data Tag Source #

Tag

Constructors

Tag 

Fields

Instances
Eq Tag Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Tag -> Tag -> Bool #

(/=) :: Tag -> Tag -> Bool #

Show Tag Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Tag -> ShowS #

show :: Tag -> String #

showList :: [Tag] -> ShowS #

ToJSON Tag Source #

ToJSON Tag

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Tag -> Value

toEncoding :: Tag -> Encoding

toJSONList :: [Tag] -> Value

toEncodingList :: [Tag] -> Encoding

FromJSON Tag Source #

FromJSON Tag

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Tag

parseJSONList :: Value -> Parser [Tag]

mkTag :: Tag Source #

Construct a value of type Tag (by applying it's required fields, if any)

TypeHolderDefault

data TypeHolderDefault Source #

TypeHolderDefault

Constructors

TypeHolderDefault 

Fields

Instances
Eq TypeHolderDefault Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show TypeHolderDefault Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON TypeHolderDefault Source #

ToJSON TypeHolderDefault

Instance details

Defined in OpenAPIPetstore.Model

FromJSON TypeHolderDefault Source #

FromJSON TypeHolderDefault

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser TypeHolderDefault

parseJSONList :: Value -> Parser [TypeHolderDefault]

TypeHolderExample

data TypeHolderExample Source #

TypeHolderExample

Constructors

TypeHolderExample 

Fields

Instances
Eq TypeHolderExample Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show TypeHolderExample Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON TypeHolderExample Source #

ToJSON TypeHolderExample

Instance details

Defined in OpenAPIPetstore.Model

FromJSON TypeHolderExample Source #

FromJSON TypeHolderExample

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser TypeHolderExample

parseJSONList :: Value -> Parser [TypeHolderExample]

User

data User Source #

User

Constructors

User 

Fields

Instances
Eq User Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: User -> User -> Bool #

(/=) :: User -> User -> Bool #

Show User Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

ToJSON User Source #

ToJSON User

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: User -> Value

toEncoding :: User -> Encoding

toJSONList :: [User] -> Value

toEncodingList :: [User] -> Encoding

FromJSON User Source #

FromJSON User

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser User

parseJSONList :: Value -> Parser [User]

HasBodyParam UpdateUser User Source #

Body Param "body" - Updated user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes UpdateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest UpdateUser contentType res accept -> User -> OpenAPIPetstoreRequest UpdateUser contentType res accept Source #

HasBodyParam CreateUser User Source #

Body Param "body" - Created user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes CreateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest CreateUser contentType res accept -> User -> OpenAPIPetstoreRequest CreateUser contentType res accept Source #

HasBodyParam TestBodyWithQueryParams User Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

mkUser :: User Source #

Construct a value of type User (by applying it's required fields, if any)

XmlItem

data XmlItem Source #

XmlItem

Constructors

XmlItem 

Fields

Instances
Eq XmlItem Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: XmlItem -> XmlItem -> Bool #

(/=) :: XmlItem -> XmlItem -> Bool #

Show XmlItem Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON XmlItem Source #

ToJSON XmlItem

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: XmlItem -> Value

toEncoding :: XmlItem -> Encoding

toJSONList :: [XmlItem] -> Value

toEncodingList :: [XmlItem] -> Encoding

FromJSON XmlItem Source #

FromJSON XmlItem

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser XmlItem

parseJSONList :: Value -> Parser [XmlItem]

HasBodyParam CreateXmlItem XmlItem Source #

Body Param XmlItem - XmlItem Body

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) => OpenAPIPetstoreRequest CreateXmlItem contentType res accept -> XmlItem -> OpenAPIPetstoreRequest CreateXmlItem contentType res accept Source #

mkXmlItem :: XmlItem Source #

Construct a value of type XmlItem (by applying it's required fields, if any)

Enums

E'ArrayEnum

data E'ArrayEnum Source #

Enum of Text

Constructors

E'ArrayEnum'Fish
"fish"
E'ArrayEnum'Crab
"crab"
Instances
Bounded E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'ArrayEnum -> Value

toEncoding :: E'ArrayEnum -> Encoding

toJSONList :: [E'ArrayEnum] -> Value

toEncodingList :: [E'ArrayEnum] -> Encoding

FromJSON E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'ArrayEnum

parseJSONList :: Value -> Parser [E'ArrayEnum]

FromHttpApiData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumFormString

data E'EnumFormString Source #

Enum of Text . - Form parameter enum test (string)

Instances
Bounded E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

FromJSON E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumFormString

parseJSONList :: Value -> Parser [E'EnumFormString]

FromHttpApiData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumFormStringArray

data E'EnumFormStringArray Source #

Enum of Text

Instances
Bounded E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

FromJSON E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumFormStringArray

parseJSONList :: Value -> Parser [E'EnumFormStringArray]

FromHttpApiData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumInteger

data E'EnumInteger Source #

Enum of Int

Instances
Bounded E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'EnumInteger -> Value

toEncoding :: E'EnumInteger -> Encoding

toJSONList :: [E'EnumInteger] -> Value

toEncodingList :: [E'EnumInteger] -> Encoding

FromJSON E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumInteger

parseJSONList :: Value -> Parser [E'EnumInteger]

FromHttpApiData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumNumber

data E'EnumNumber Source #

Enum of Double

Instances
Bounded E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'EnumNumber -> Value

toEncoding :: E'EnumNumber -> Encoding

toJSONList :: [E'EnumNumber] -> Value

toEncodingList :: [E'EnumNumber] -> Encoding

FromJSON E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumNumber

parseJSONList :: Value -> Parser [E'EnumNumber]

FromHttpApiData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumQueryInteger

data E'EnumQueryInteger Source #

Enum of Int

Instances
Bounded E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

FromJSON E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumQueryInteger

parseJSONList :: Value -> Parser [E'EnumQueryInteger]

FromHttpApiData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumString

data E'EnumString Source #

Enum of Text

Instances
Bounded E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'EnumString -> Value

toEncoding :: E'EnumString -> Encoding

toJSONList :: [E'EnumString] -> Value

toEncodingList :: [E'EnumString] -> Encoding

FromJSON E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumString

parseJSONList :: Value -> Parser [E'EnumString]

FromHttpApiData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'Inner

data E'Inner Source #

Enum of Text

Instances
Bounded E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: E'Inner -> E'Inner -> Bool #

(/=) :: E'Inner -> E'Inner -> Bool #

Ord E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'Inner -> Value

toEncoding :: E'Inner -> Encoding

toJSONList :: [E'Inner] -> Value

toEncodingList :: [E'Inner] -> Encoding

FromJSON E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'Inner

parseJSONList :: Value -> Parser [E'Inner]

FromHttpApiData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'JustSymbol

data E'JustSymbol Source #

Enum of Text

Instances
Bounded E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'JustSymbol -> Value

toEncoding :: E'JustSymbol -> Encoding

toJSONList :: [E'JustSymbol] -> Value

toEncodingList :: [E'JustSymbol] -> Encoding

FromJSON E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'JustSymbol

parseJSONList :: Value -> Parser [E'JustSymbol]

FromHttpApiData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'Status

data E'Status Source #

Enum of Text . - Order Status

Constructors

E'Status'Placed
"placed"
E'Status'Approved
"approved"
E'Status'Delivered
"delivered"
Instances
Bounded E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'Status -> Value

toEncoding :: E'Status -> Encoding

toJSONList :: [E'Status] -> Value

toEncodingList :: [E'Status] -> Encoding

FromJSON E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'Status

parseJSONList :: Value -> Parser [E'Status]

FromHttpApiData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'Status2

data E'Status2 Source #

Enum of Text . - pet status in the store

Constructors

E'Status2'Available
"available"
E'Status2'Pending
"pending"
E'Status2'Sold
"sold"
Instances
Bounded E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'Status2 -> Value

toEncoding :: E'Status2 -> Encoding

toJSONList :: [E'Status2] -> Value

toEncodingList :: [E'Status2] -> Encoding

FromJSON E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'Status2

parseJSONList :: Value -> Parser [E'Status2]

FromHttpApiData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

EnumClass

data EnumClass Source #

Enum of Text

Constructors

EnumClass'_abc
"_abc"
EnumClass'_efg
"-efg"
EnumClass'_xyz
"(xyz)"
Instances
Bounded EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: EnumClass -> Value

toEncoding :: EnumClass -> Encoding

toJSONList :: [EnumClass] -> Value

toEncodingList :: [EnumClass] -> Encoding

FromJSON EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser EnumClass

parseJSONList :: Value -> Parser [EnumClass]

FromHttpApiData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

OuterEnum

data OuterEnum Source #

Enum of Text

Constructors

OuterEnum'Placed
"placed"
OuterEnum'Approved
"approved"
OuterEnum'Delivered
"delivered"
Instances
Bounded OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: OuterEnum -> Value

toEncoding :: OuterEnum -> Encoding

toJSONList :: [OuterEnum] -> Value

toEncodingList :: [OuterEnum] -> Encoding

FromJSON OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser OuterEnum

parseJSONList :: Value -> Parser [OuterEnum]

FromHttpApiData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Auth Methods

AuthApiKeyApiKey

AuthApiKeyApiKeyQuery

AuthBasicHttpBasicTest

AuthOAuthPetstoreAuth

\ No newline at end of file + Must be named File for test.

Constructors

File 

Fields

Instances
Eq File Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: File -> File -> Bool #

(/=) :: File -> File -> Bool #

Show File Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> File -> ShowS #

show :: File -> String #

showList :: [File] -> ShowS #

ToJSON File Source #

ToJSON File

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: File -> Value

toEncoding :: File -> Encoding

toJSONList :: [File] -> Value

toEncodingList :: [File] -> Encoding

FromJSON File Source #

FromJSON File

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser File

parseJSONList :: Value -> Parser [File]

mkFile :: File Source #

Construct a value of type File (by applying it's required fields, if any)

FileSchemaTestClass

data FileSchemaTestClass Source #

FileSchemaTestClass

mkFileSchemaTestClass :: FileSchemaTestClass Source #

Construct a value of type FileSchemaTestClass (by applying it's required fields, if any)

FormatTest

data FormatTest Source #

FormatTest

Constructors

FormatTest 

Fields

Instances
Eq FormatTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show FormatTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON FormatTest Source #

ToJSON FormatTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: FormatTest -> Value

toEncoding :: FormatTest -> Encoding

toJSONList :: [FormatTest] -> Value

toEncodingList :: [FormatTest] -> Encoding

FromJSON FormatTest Source #

FromJSON FormatTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser FormatTest

parseJSONList :: Value -> Parser [FormatTest]

mkFormatTest Source #

Construct a value of type FormatTest (by applying it's required fields, if any)

HasOnlyReadOnly

data HasOnlyReadOnly Source #

HasOnlyReadOnly

Constructors

HasOnlyReadOnly 
Instances
Eq HasOnlyReadOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show HasOnlyReadOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON HasOnlyReadOnly Source #

ToJSON HasOnlyReadOnly

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: HasOnlyReadOnly -> Value

toEncoding :: HasOnlyReadOnly -> Encoding

toJSONList :: [HasOnlyReadOnly] -> Value

toEncodingList :: [HasOnlyReadOnly] -> Encoding

FromJSON HasOnlyReadOnly Source #

FromJSON HasOnlyReadOnly

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser HasOnlyReadOnly

parseJSONList :: Value -> Parser [HasOnlyReadOnly]

mkHasOnlyReadOnly :: HasOnlyReadOnly Source #

Construct a value of type HasOnlyReadOnly (by applying it's required fields, if any)

MapTest

data MapTest Source #

MapTest

Constructors

MapTest 

Fields

Instances
Eq MapTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: MapTest -> MapTest -> Bool #

(/=) :: MapTest -> MapTest -> Bool #

Show MapTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON MapTest Source #

ToJSON MapTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: MapTest -> Value

toEncoding :: MapTest -> Encoding

toJSONList :: [MapTest] -> Value

toEncodingList :: [MapTest] -> Encoding

FromJSON MapTest Source #

FromJSON MapTest

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser MapTest

parseJSONList :: Value -> Parser [MapTest]

mkMapTest :: MapTest Source #

Construct a value of type MapTest (by applying it's required fields, if any)

MixedPropertiesAndAdditionalPropertiesClass

data MixedPropertiesAndAdditionalPropertiesClass Source #

MixedPropertiesAndAdditionalPropertiesClass

Model200Response

data Model200Response Source #

Model200Response + Model for testing model name starting with number

Instances
Eq Model200Response Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show Model200Response Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON Model200Response Source #

ToJSON Model200Response

Instance details

Defined in OpenAPIPetstore.Model

FromJSON Model200Response Source #

FromJSON Model200Response

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Model200Response

parseJSONList :: Value -> Parser [Model200Response]

mkModel200Response :: Model200Response Source #

Construct a value of type Model200Response (by applying it's required fields, if any)

ModelList

data ModelList Source #

ModelList

Constructors

ModelList 

Fields

Instances
Eq ModelList Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ModelList Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ModelList Source #

ToJSON ModelList

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ModelList -> Value

toEncoding :: ModelList -> Encoding

toJSONList :: [ModelList] -> Value

toEncodingList :: [ModelList] -> Encoding

FromJSON ModelList Source #

FromJSON ModelList

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ModelList

parseJSONList :: Value -> Parser [ModelList]

mkModelList :: ModelList Source #

Construct a value of type ModelList (by applying it's required fields, if any)

ModelReturn

data ModelReturn Source #

ModelReturn + Model for testing reserved words

Constructors

ModelReturn 

Fields

Instances
Eq ModelReturn Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ModelReturn Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ModelReturn Source #

ToJSON ModelReturn

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ModelReturn -> Value

toEncoding :: ModelReturn -> Encoding

toJSONList :: [ModelReturn] -> Value

toEncodingList :: [ModelReturn] -> Encoding

FromJSON ModelReturn Source #

FromJSON ModelReturn

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ModelReturn

parseJSONList :: Value -> Parser [ModelReturn]

mkModelReturn :: ModelReturn Source #

Construct a value of type ModelReturn (by applying it's required fields, if any)

Name

data Name Source #

Name + Model for testing model name same as property name

Constructors

Name 

Fields

Instances
Eq Name Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Name -> Name -> Bool #

(/=) :: Name -> Name -> Bool #

Show Name Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

ToJSON Name Source #

ToJSON Name

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Name -> Value

toEncoding :: Name -> Encoding

toJSONList :: [Name] -> Value

toEncodingList :: [Name] -> Encoding

FromJSON Name Source #

FromJSON Name

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Name

parseJSONList :: Value -> Parser [Name]

mkName Source #

Arguments

:: Int

nameName

-> Name 

Construct a value of type Name (by applying it's required fields, if any)

NumberOnly

data NumberOnly Source #

NumberOnly

Instances
Eq NumberOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show NumberOnly Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON NumberOnly Source #

ToJSON NumberOnly

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: NumberOnly -> Value

toEncoding :: NumberOnly -> Encoding

toJSONList :: [NumberOnly] -> Value

toEncodingList :: [NumberOnly] -> Encoding

FromJSON NumberOnly Source #

FromJSON NumberOnly

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser NumberOnly

parseJSONList :: Value -> Parser [NumberOnly]

mkNumberOnly :: NumberOnly Source #

Construct a value of type NumberOnly (by applying it's required fields, if any)

Order

data Order Source #

Order

Constructors

Order 

Fields

Instances
Eq Order Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Order -> Order -> Bool #

(/=) :: Order -> Order -> Bool #

Show Order Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Order -> ShowS #

show :: Order -> String #

showList :: [Order] -> ShowS #

ToJSON Order Source #

ToJSON Order

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Order -> Value

toEncoding :: Order -> Encoding

toJSONList :: [Order] -> Value

toEncodingList :: [Order] -> Encoding

FromJSON Order Source #

FromJSON Order

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Order

parseJSONList :: Value -> Parser [Order]

HasBodyParam PlaceOrder Order Source #

Body Param "body" - order placed for purchasing the pet

Instance details

Defined in OpenAPIPetstore.API.Store

Methods

setBodyParam :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => OpenAPIPetstoreRequest PlaceOrder contentType res accept -> Order -> OpenAPIPetstoreRequest PlaceOrder contentType res accept Source #

mkOrder :: Order Source #

Construct a value of type Order (by applying it's required fields, if any)

OuterComposite

data OuterComposite Source #

OuterComposite

Constructors

OuterComposite 

Fields

Instances
Eq OuterComposite Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show OuterComposite Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON OuterComposite Source #

ToJSON OuterComposite

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: OuterComposite -> Value

toEncoding :: OuterComposite -> Encoding

toJSONList :: [OuterComposite] -> Value

toEncodingList :: [OuterComposite] -> Encoding

FromJSON OuterComposite Source #

FromJSON OuterComposite

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser OuterComposite

parseJSONList :: Value -> Parser [OuterComposite]

HasBodyParam FakeOuterCompositeSerialize OuterComposite Source #

Body Param "body" - Input composite as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

mkOuterComposite :: OuterComposite Source #

Construct a value of type OuterComposite (by applying it's required fields, if any)

Pet

data Pet Source #

Pet

Constructors

Pet 

Fields

Instances
Eq Pet Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Pet -> Pet -> Bool #

(/=) :: Pet -> Pet -> Bool #

Show Pet Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Pet -> ShowS #

show :: Pet -> String #

showList :: [Pet] -> ShowS #

ToJSON Pet Source #

ToJSON Pet

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Pet -> Value

toEncoding :: Pet -> Encoding

toJSONList :: [Pet] -> Value

toEncodingList :: [Pet] -> Encoding

FromJSON Pet Source #

FromJSON Pet

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Pet

parseJSONList :: Value -> Parser [Pet]

HasBodyParam UpdatePet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes UpdatePet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest UpdatePet contentType res accept -> Pet -> OpenAPIPetstoreRequest UpdatePet contentType res accept Source #

HasBodyParam AddPet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes AddPet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest AddPet contentType res accept -> Pet -> OpenAPIPetstoreRequest AddPet contentType res accept Source #

mkPet Source #

Arguments

:: Text

petName

-> [Text]

petPhotoUrls

-> Pet 

Construct a value of type Pet (by applying it's required fields, if any)

ReadOnlyFirst

data ReadOnlyFirst Source #

ReadOnlyFirst

Constructors

ReadOnlyFirst 
Instances
Eq ReadOnlyFirst Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show ReadOnlyFirst Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON ReadOnlyFirst Source #

ToJSON ReadOnlyFirst

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: ReadOnlyFirst -> Value

toEncoding :: ReadOnlyFirst -> Encoding

toJSONList :: [ReadOnlyFirst] -> Value

toEncodingList :: [ReadOnlyFirst] -> Encoding

FromJSON ReadOnlyFirst Source #

FromJSON ReadOnlyFirst

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser ReadOnlyFirst

parseJSONList :: Value -> Parser [ReadOnlyFirst]

mkReadOnlyFirst :: ReadOnlyFirst Source #

Construct a value of type ReadOnlyFirst (by applying it's required fields, if any)

SpecialModelName

data SpecialModelName Source #

SpecialModelName

Constructors

SpecialModelName 

Fields

Instances
Eq SpecialModelName Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show SpecialModelName Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON SpecialModelName Source #

ToJSON SpecialModelName

Instance details

Defined in OpenAPIPetstore.Model

FromJSON SpecialModelName Source #

FromJSON SpecialModelName

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser SpecialModelName

parseJSONList :: Value -> Parser [SpecialModelName]

mkSpecialModelName :: SpecialModelName Source #

Construct a value of type SpecialModelName (by applying it's required fields, if any)

Tag

data Tag Source #

Tag

Constructors

Tag 

Fields

Instances
Eq Tag Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: Tag -> Tag -> Bool #

(/=) :: Tag -> Tag -> Bool #

Show Tag Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> Tag -> ShowS #

show :: Tag -> String #

showList :: [Tag] -> ShowS #

ToJSON Tag Source #

ToJSON Tag

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: Tag -> Value

toEncoding :: Tag -> Encoding

toJSONList :: [Tag] -> Value

toEncodingList :: [Tag] -> Encoding

FromJSON Tag Source #

FromJSON Tag

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser Tag

parseJSONList :: Value -> Parser [Tag]

mkTag :: Tag Source #

Construct a value of type Tag (by applying it's required fields, if any)

TypeHolderDefault

data TypeHolderDefault Source #

TypeHolderDefault

Constructors

TypeHolderDefault 

Fields

Instances
Eq TypeHolderDefault Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show TypeHolderDefault Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON TypeHolderDefault Source #

ToJSON TypeHolderDefault

Instance details

Defined in OpenAPIPetstore.Model

FromJSON TypeHolderDefault Source #

FromJSON TypeHolderDefault

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser TypeHolderDefault

parseJSONList :: Value -> Parser [TypeHolderDefault]

TypeHolderExample

data TypeHolderExample Source #

TypeHolderExample

Constructors

TypeHolderExample 

Fields

Instances
Eq TypeHolderExample Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show TypeHolderExample Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON TypeHolderExample Source #

ToJSON TypeHolderExample

Instance details

Defined in OpenAPIPetstore.Model

FromJSON TypeHolderExample Source #

FromJSON TypeHolderExample

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser TypeHolderExample

parseJSONList :: Value -> Parser [TypeHolderExample]

User

data User Source #

User

Constructors

User 

Fields

Instances
Eq User Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: User -> User -> Bool #

(/=) :: User -> User -> Bool #

Show User Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

ToJSON User Source #

ToJSON User

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: User -> Value

toEncoding :: User -> Encoding

toJSONList :: [User] -> Value

toEncodingList :: [User] -> Encoding

FromJSON User Source #

FromJSON User

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser User

parseJSONList :: Value -> Parser [User]

HasBodyParam UpdateUser User Source #

Body Param "body" - Updated user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes UpdateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest UpdateUser contentType res accept -> User -> OpenAPIPetstoreRequest UpdateUser contentType res accept Source #

HasBodyParam CreateUser User Source #

Body Param "body" - Created user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes CreateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest CreateUser contentType res accept -> User -> OpenAPIPetstoreRequest CreateUser contentType res accept Source #

HasBodyParam TestBodyWithQueryParams User Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

mkUser :: User Source #

Construct a value of type User (by applying it's required fields, if any)

XmlItem

data XmlItem Source #

XmlItem

Constructors

XmlItem 

Fields

Instances
Eq XmlItem Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: XmlItem -> XmlItem -> Bool #

(/=) :: XmlItem -> XmlItem -> Bool #

Show XmlItem Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON XmlItem Source #

ToJSON XmlItem

Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: XmlItem -> Value

toEncoding :: XmlItem -> Encoding

toJSONList :: [XmlItem] -> Value

toEncodingList :: [XmlItem] -> Encoding

FromJSON XmlItem Source #

FromJSON XmlItem

Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser XmlItem

parseJSONList :: Value -> Parser [XmlItem]

HasBodyParam CreateXmlItem XmlItem Source #

Body Param XmlItem - XmlItem Body

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) => OpenAPIPetstoreRequest CreateXmlItem contentType res accept -> XmlItem -> OpenAPIPetstoreRequest CreateXmlItem contentType res accept Source #

mkXmlItem :: XmlItem Source #

Construct a value of type XmlItem (by applying it's required fields, if any)

Enums

E'ArrayEnum

data E'ArrayEnum Source #

Enum of Text

Constructors

E'ArrayEnum'Fish
"fish"
E'ArrayEnum'Crab
"crab"
Instances
Bounded E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'ArrayEnum -> Value

toEncoding :: E'ArrayEnum -> Encoding

toJSONList :: [E'ArrayEnum] -> Value

toEncodingList :: [E'ArrayEnum] -> Encoding

FromJSON E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'ArrayEnum

parseJSONList :: Value -> Parser [E'ArrayEnum]

FromHttpApiData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumFormString

data E'EnumFormString Source #

Enum of Text . + Form parameter enum test (string)

Instances
Bounded E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

FromJSON E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumFormString

parseJSONList :: Value -> Parser [E'EnumFormString]

FromHttpApiData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumFormStringArray

data E'EnumFormStringArray Source #

Enum of Text

Instances
Bounded E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

FromJSON E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumFormStringArray

parseJSONList :: Value -> Parser [E'EnumFormStringArray]

FromHttpApiData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumInteger

data E'EnumInteger Source #

Enum of Int

Instances
Bounded E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'EnumInteger -> Value

toEncoding :: E'EnumInteger -> Encoding

toJSONList :: [E'EnumInteger] -> Value

toEncodingList :: [E'EnumInteger] -> Encoding

FromJSON E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumInteger

parseJSONList :: Value -> Parser [E'EnumInteger]

FromHttpApiData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumNumber

data E'EnumNumber Source #

Enum of Double

Instances
Bounded E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'EnumNumber -> Value

toEncoding :: E'EnumNumber -> Encoding

toJSONList :: [E'EnumNumber] -> Value

toEncodingList :: [E'EnumNumber] -> Encoding

FromJSON E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumNumber

parseJSONList :: Value -> Parser [E'EnumNumber]

FromHttpApiData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumQueryInteger

data E'EnumQueryInteger Source #

Enum of Int

Instances
Bounded E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

FromJSON E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumQueryInteger

parseJSONList :: Value -> Parser [E'EnumQueryInteger]

FromHttpApiData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'EnumString

data E'EnumString Source #

Enum of Text

Instances
Bounded E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'EnumString -> Value

toEncoding :: E'EnumString -> Encoding

toJSONList :: [E'EnumString] -> Value

toEncodingList :: [E'EnumString] -> Encoding

FromJSON E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'EnumString

parseJSONList :: Value -> Parser [E'EnumString]

FromHttpApiData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'Inner

data E'Inner Source #

Enum of Text

Instances
Bounded E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

(==) :: E'Inner -> E'Inner -> Bool #

(/=) :: E'Inner -> E'Inner -> Bool #

Ord E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'Inner -> Value

toEncoding :: E'Inner -> Encoding

toJSONList :: [E'Inner] -> Value

toEncodingList :: [E'Inner] -> Encoding

FromJSON E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'Inner

parseJSONList :: Value -> Parser [E'Inner]

FromHttpApiData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'JustSymbol

data E'JustSymbol Source #

Enum of Text

Instances
Bounded E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'JustSymbol -> Value

toEncoding :: E'JustSymbol -> Encoding

toJSONList :: [E'JustSymbol] -> Value

toEncodingList :: [E'JustSymbol] -> Encoding

FromJSON E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'JustSymbol

parseJSONList :: Value -> Parser [E'JustSymbol]

FromHttpApiData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'Status

data E'Status Source #

Enum of Text . + Order Status

Constructors

E'Status'Placed
"placed"
E'Status'Approved
"approved"
E'Status'Delivered
"delivered"
Instances
Bounded E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'Status -> Value

toEncoding :: E'Status -> Encoding

toJSONList :: [E'Status] -> Value

toEncodingList :: [E'Status] -> Encoding

FromJSON E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'Status

parseJSONList :: Value -> Parser [E'Status]

FromHttpApiData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

E'Status2

data E'Status2 Source #

Enum of Text . + pet status in the store

Constructors

E'Status2'Available
"available"
E'Status2'Pending
"pending"
E'Status2'Sold
"sold"
Instances
Bounded E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: E'Status2 -> Value

toEncoding :: E'Status2 -> Encoding

toJSONList :: [E'Status2] -> Value

toEncodingList :: [E'Status2] -> Encoding

FromJSON E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser E'Status2

parseJSONList :: Value -> Parser [E'Status2]

FromHttpApiData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

EnumClass

data EnumClass Source #

Enum of Text

Constructors

EnumClass'_abc
"_abc"
EnumClass'_efg
"-efg"
EnumClass'_xyz
"(xyz)"
Instances
Bounded EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: EnumClass -> Value

toEncoding :: EnumClass -> Encoding

toJSONList :: [EnumClass] -> Value

toEncodingList :: [EnumClass] -> Encoding

FromJSON EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser EnumClass

parseJSONList :: Value -> Parser [EnumClass]

FromHttpApiData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

OuterEnum

data OuterEnum Source #

Enum of Text

Constructors

OuterEnum'Placed
"placed"
OuterEnum'Approved
"approved"
OuterEnum'Delivered
"delivered"
Instances
Bounded OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Enum OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Eq OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Ord OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Show OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToJSON OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

toJSON :: OuterEnum -> Value

toEncoding :: OuterEnum -> Encoding

toJSONList :: [OuterEnum] -> Value

toEncodingList :: [OuterEnum] -> Encoding

FromJSON OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

parseJSON :: Value -> Parser OuterEnum

parseJSONList :: Value -> Parser [OuterEnum]

FromHttpApiData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

ToHttpApiData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

Auth Methods

AuthApiKeyApiKey

AuthApiKeyApiKeyQuery

AuthBasicHttpBasicTest

AuthOAuthPetstoreAuth

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-ModelLens.html b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-ModelLens.html index 76c85bc8a6..0759d9aebc 100644 --- a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-ModelLens.html +++ b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-ModelLens.html @@ -1 +1 @@ -OpenAPIPetstore.ModelLens

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Safe HaskellNone
LanguageHaskell2010

OpenAPIPetstore.ModelLens

Description

 
Synopsis

AdditionalPropertiesAnyType

AdditionalPropertiesArray

AdditionalPropertiesBoolean

AdditionalPropertiesClass

AdditionalPropertiesInteger

AdditionalPropertiesNumber

AdditionalPropertiesObject

AdditionalPropertiesString

Animal

ApiResponse

ArrayOfArrayOfNumberOnly

ArrayOfNumberOnly

ArrayTest

Capitalization

Cat

CatAllOf

Category

ClassModel

Client

Dog

DogAllOf

EnumArrays

EnumClass

EnumTest

File

FileSchemaTestClass

FormatTest

HasOnlyReadOnly

MapTest

MixedPropertiesAndAdditionalPropertiesClass

Model200Response

ModelList

ModelReturn

Name

NumberOnly

Order

OuterComposite

OuterEnum

Pet

ReadOnlyFirst

SpecialModelName

Tag

TypeHolderDefault

TypeHolderExample

User

XmlItem

\ No newline at end of file +OpenAPIPetstore.ModelLens

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Safe HaskellNone
LanguageHaskell2010

OpenAPIPetstore.ModelLens

Description

 
Synopsis

AdditionalPropertiesAnyType

AdditionalPropertiesArray

AdditionalPropertiesBoolean

AdditionalPropertiesClass

AdditionalPropertiesInteger

AdditionalPropertiesNumber

AdditionalPropertiesObject

AdditionalPropertiesString

Animal

ApiResponse

ArrayOfArrayOfNumberOnly

ArrayOfNumberOnly

ArrayTest

Capitalization

Cat

CatAllOf

Category

ClassModel

Client

Dog

DogAllOf

EnumArrays

EnumClass

EnumTest

File

FileSchemaTestClass

FormatTest

HasOnlyReadOnly

MapTest

MixedPropertiesAndAdditionalPropertiesClass

Model200Response

ModelList

ModelReturn

Name

NumberOnly

Order

OuterComposite

OuterEnum

Pet

ReadOnlyFirst

SpecialModelName

Tag

TypeHolderDefault

TypeHolderExample

User

XmlItem

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/doc-index-All.html b/samples/client/petstore/haskell-http-client/docs/doc-index-All.html index 850bdfe1ef..12032a4a44 100644 --- a/samples/client/petstore/haskell-http-client/docs/doc-index-All.html +++ b/samples/client/petstore/haskell-http-client/docs/doc-index-All.html @@ -1 +1 @@ -openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client (Index)

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Index

-&-OpenAPIPetstore.Core, OpenAPIPetstore
Accept 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
addAuthMethodOpenAPIPetstore.Core, OpenAPIPetstore
addFormOpenAPIPetstore.Core, OpenAPIPetstore
AdditionalMetadata 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
AdditionalPropertiesAnyType 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesAnyTypeNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesAnyTypeNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesArray 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesArrayNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesArrayNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesBoolean 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesBooleanNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesBooleanNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesClass 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassAnytype1OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassAnytype1LOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassAnytype2OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassAnytype2LOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassAnytype3OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassAnytype3LOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapArrayAnytypeOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapArrayAnytypeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapArrayIntegerOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapArrayIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapBooleanOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapIntegerOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapMapAnytypeOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapMapAnytypeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapMapStringOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapMapStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapNumberOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapStringOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesInteger 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesIntegerNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesIntegerNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesNumber 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesNumberNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesNumberNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesObject 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesObjectNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesObjectNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesString 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesStringNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesStringNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AddPetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
addPetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
Animal 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
animalClassNameOpenAPIPetstore.Model, OpenAPIPetstore
animalClassNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
animalColorOpenAPIPetstore.Model, OpenAPIPetstore
animalColorLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AnyAuthMethod 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
ApiKey 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ApiResponse 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
apiResponseCodeOpenAPIPetstore.Model, OpenAPIPetstore
apiResponseCodeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
apiResponseMessageOpenAPIPetstore.Model, OpenAPIPetstore
apiResponseMessageLOpenAPIPetstore.ModelLens, OpenAPIPetstore
apiResponseTypeOpenAPIPetstore.Model, OpenAPIPetstore
apiResponseTypeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
applyAuthMethodOpenAPIPetstore.Core, OpenAPIPetstore
applyOptionalParamOpenAPIPetstore.Core, OpenAPIPetstore
ArrayOfArrayOfNumberOnly 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
arrayOfArrayOfNumberOnlyArrayArrayNumberOpenAPIPetstore.Model, OpenAPIPetstore
arrayOfArrayOfNumberOnlyArrayArrayNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
ArrayOfNumberOnly 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
arrayOfNumberOnlyArrayNumberOpenAPIPetstore.Model, OpenAPIPetstore
arrayOfNumberOnlyArrayNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
ArrayTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
arrayTestArrayArrayOfIntegerOpenAPIPetstore.Model, OpenAPIPetstore
arrayTestArrayArrayOfIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
arrayTestArrayArrayOfModelOpenAPIPetstore.Model, OpenAPIPetstore
arrayTestArrayArrayOfModelLOpenAPIPetstore.ModelLens, OpenAPIPetstore
arrayTestArrayOfStringOpenAPIPetstore.Model, OpenAPIPetstore
arrayTestArrayOfStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AuthApiKeyApiKey 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
AuthApiKeyApiKeyQuery 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
AuthBasicHttpBasicTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
AuthMethodOpenAPIPetstore.Core, OpenAPIPetstore
AuthMethodException 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
AuthOAuthPetstoreAuth 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Binary 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
Body 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
BodyBool 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
BodyDouble 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
BodyText 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
BooleanGroup 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Byte 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ByteArray 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
Callback 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Capitalization 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
capitalizationAttNameOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationAttNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
capitalizationCapitalCamelOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationCapitalCamelLOpenAPIPetstore.ModelLens, OpenAPIPetstore
capitalizationCapitalSnakeOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationCapitalSnakeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
capitalizationScaEthFlowPointsOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationScaEthFlowPointsLOpenAPIPetstore.ModelLens, OpenAPIPetstore
capitalizationSmallCamelOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationSmallCamelLOpenAPIPetstore.ModelLens, OpenAPIPetstore
capitalizationSmallSnakeOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationSmallSnakeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Cat 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
CatAllOf 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
catAllOfDeclawedOpenAPIPetstore.Model, OpenAPIPetstore
catAllOfDeclawedLOpenAPIPetstore.ModelLens, OpenAPIPetstore
catClassNameOpenAPIPetstore.Model, OpenAPIPetstore
catClassNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
catColorOpenAPIPetstore.Model, OpenAPIPetstore
catColorLOpenAPIPetstore.ModelLens, OpenAPIPetstore
catDeclawedOpenAPIPetstore.Model, OpenAPIPetstore
catDeclawedLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Category 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
categoryIdOpenAPIPetstore.Model, OpenAPIPetstore
categoryIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
categoryNameOpenAPIPetstore.Model, OpenAPIPetstore
categoryNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
ClassModel 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
classModelClassOpenAPIPetstore.Model, OpenAPIPetstore
classModelClassLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Client 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
clientClientOpenAPIPetstore.Model, OpenAPIPetstore
clientClientLOpenAPIPetstore.ModelLens, OpenAPIPetstore
CollectionFormatOpenAPIPetstore.Core, OpenAPIPetstore
CommaSeparatedOpenAPIPetstore.Core, OpenAPIPetstore
configAuthMethodsOpenAPIPetstore.Core, OpenAPIPetstore
configHostOpenAPIPetstore.Core, OpenAPIPetstore
configLogContextOpenAPIPetstore.Core, OpenAPIPetstore
configLogExecWithContextOpenAPIPetstore.Core, OpenAPIPetstore
configUserAgentOpenAPIPetstore.Core, OpenAPIPetstore
configValidateAuthMethodsOpenAPIPetstore.Core, OpenAPIPetstore
ConsumesOpenAPIPetstore.MimeTypes, OpenAPIPetstore
ContentType 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
Context 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
CreateUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
createUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
CreateUsersWithArrayInputOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
createUsersWithArrayInputOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
CreateUsersWithListInputOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
createUsersWithListInputOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
CreateXmlItemOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
createXmlItemOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
Date 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
DateTime 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
DeleteOrderOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
deleteOrderOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
DeletePetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
deletePetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
DeleteUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
deleteUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
dispatchInitUnsafeOpenAPIPetstore.Client, OpenAPIPetstore
dispatchLbsOpenAPIPetstore.Client, OpenAPIPetstore
dispatchLbsUnsafeOpenAPIPetstore.Client, OpenAPIPetstore
dispatchMimeOpenAPIPetstore.Client, OpenAPIPetstore
dispatchMime'OpenAPIPetstore.Client, OpenAPIPetstore
Dog 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
DogAllOf 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
dogAllOfBreedOpenAPIPetstore.Model, OpenAPIPetstore
dogAllOfBreedLOpenAPIPetstore.ModelLens, OpenAPIPetstore
dogBreedOpenAPIPetstore.Model, OpenAPIPetstore
dogBreedLOpenAPIPetstore.ModelLens, OpenAPIPetstore
dogClassNameOpenAPIPetstore.Model, OpenAPIPetstore
dogClassNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
dogColorOpenAPIPetstore.Model, OpenAPIPetstore
dogColorLOpenAPIPetstore.ModelLens, OpenAPIPetstore
E'ArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
E'ArrayEnum'CrabOpenAPIPetstore.Model, OpenAPIPetstore
E'ArrayEnum'FishOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormString'_abcOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormString'_efgOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormString'_xyzOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormStringArray'DollarOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormStringArray'GreaterThanOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumInteger'Num1OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumInteger'NumMinus_1OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumNumber'Num1_Dot_1OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumNumber'NumMinus_1_Dot_2OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumQueryInteger'Num1OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumQueryInteger'NumMinus_2OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumStringOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumString'EmptyOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumString'LowerOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumString'UPPEROpenAPIPetstore.Model, OpenAPIPetstore
E'InnerOpenAPIPetstore.Model, OpenAPIPetstore
E'Inner'LowerOpenAPIPetstore.Model, OpenAPIPetstore
E'Inner'UPPEROpenAPIPetstore.Model, OpenAPIPetstore
E'JustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
E'JustSymbol'DollarOpenAPIPetstore.Model, OpenAPIPetstore
E'JustSymbol'Greater_Than_Or_Equal_ToOpenAPIPetstore.Model, OpenAPIPetstore
E'StatusOpenAPIPetstore.Model, OpenAPIPetstore
E'Status'ApprovedOpenAPIPetstore.Model, OpenAPIPetstore
E'Status'DeliveredOpenAPIPetstore.Model, OpenAPIPetstore
E'Status'PlacedOpenAPIPetstore.Model, OpenAPIPetstore
E'Status2OpenAPIPetstore.Model, OpenAPIPetstore
E'Status2'AvailableOpenAPIPetstore.Model, OpenAPIPetstore
E'Status2'PendingOpenAPIPetstore.Model, OpenAPIPetstore
E'Status2'SoldOpenAPIPetstore.Model, OpenAPIPetstore
EnumArrays 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
enumArraysArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
enumArraysArrayEnumLOpenAPIPetstore.ModelLens, OpenAPIPetstore
enumArraysJustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
enumArraysJustSymbolLOpenAPIPetstore.ModelLens, OpenAPIPetstore
EnumClassOpenAPIPetstore.Model, OpenAPIPetstore
EnumClass'_abcOpenAPIPetstore.Model, OpenAPIPetstore
EnumClass'_efgOpenAPIPetstore.Model, OpenAPIPetstore
EnumClass'_xyzOpenAPIPetstore.Model, OpenAPIPetstore
EnumFormString 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumFormStringArray 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumHeaderString 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumHeaderStringArray 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumQueryDouble 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumQueryInteger 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumQueryString 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumQueryStringArray 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
enumTestEnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
enumTestEnumIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
enumTestEnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
enumTestEnumNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
enumTestEnumStringOpenAPIPetstore.Model, OpenAPIPetstore
enumTestEnumStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
enumTestEnumStringRequiredOpenAPIPetstore.Model, OpenAPIPetstore
enumTestEnumStringRequiredLOpenAPIPetstore.ModelLens, OpenAPIPetstore
enumTestOuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
enumTestOuterEnumLOpenAPIPetstore.ModelLens, OpenAPIPetstore
FakeOuterBooleanSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterBooleanSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterCompositeSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterCompositeSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterNumberSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterNumberSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterStringSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterStringSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
File 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
File2 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
FileSchemaTestClass 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFileOpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFileLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fileSchemaTestClassFilesOpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFilesLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fileSourceUriOpenAPIPetstore.Model, OpenAPIPetstore
fileSourceUriLOpenAPIPetstore.ModelLens, OpenAPIPetstore
FindPetsByStatusOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
findPetsByStatusOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
FindPetsByTagsOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
findPetsByTagsOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
FormatTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
formatTestBinaryOpenAPIPetstore.Model, OpenAPIPetstore
formatTestBinaryLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestByteOpenAPIPetstore.Model, OpenAPIPetstore
formatTestByteLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDateOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDateLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDateTimeOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDateTimeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDoubleOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDoubleLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestFloatOpenAPIPetstore.Model, OpenAPIPetstore
formatTestFloatLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestInt32OpenAPIPetstore.Model, OpenAPIPetstore
formatTestInt32LOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestInt64OpenAPIPetstore.Model, OpenAPIPetstore
formatTestInt64LOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestIntegerOpenAPIPetstore.Model, OpenAPIPetstore
formatTestIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestNumberOpenAPIPetstore.Model, OpenAPIPetstore
formatTestNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestPasswordOpenAPIPetstore.Model, OpenAPIPetstore
formatTestPasswordLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestStringOpenAPIPetstore.Model, OpenAPIPetstore
formatTestStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestUuidOpenAPIPetstore.Model, OpenAPIPetstore
formatTestUuidLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fromE'ArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumStringOpenAPIPetstore.Model, OpenAPIPetstore
fromE'InnerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'JustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
fromE'StatusOpenAPIPetstore.Model, OpenAPIPetstore
fromE'Status2OpenAPIPetstore.Model, OpenAPIPetstore
fromEnumClassOpenAPIPetstore.Model, OpenAPIPetstore
fromOuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
GetInventoryOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
getInventoryOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
GetOrderByIdOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
getOrderByIdOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
GetPetByIdOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
getPetByIdOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
GetUserByNameOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
getUserByNameOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
HasBodyParamOpenAPIPetstore.Core, OpenAPIPetstore
HasOnlyReadOnly 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
hasOnlyReadOnlyBarOpenAPIPetstore.Model, OpenAPIPetstore
hasOnlyReadOnlyBarLOpenAPIPetstore.ModelLens, OpenAPIPetstore
hasOnlyReadOnlyFooOpenAPIPetstore.Model, OpenAPIPetstore
hasOnlyReadOnlyFooLOpenAPIPetstore.ModelLens, OpenAPIPetstore
HasOptionalParamOpenAPIPetstore.Core, OpenAPIPetstore
Http 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
initLogContextOpenAPIPetstore.Logging, OpenAPIPetstore
InitRequest 
1 (Type/Class)OpenAPIPetstore.Client, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Client, OpenAPIPetstore
Int32 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Int64 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Int64Group 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Ioutil 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Lens_OpenAPIPetstore.Core, OpenAPIPetstore
Lens_'OpenAPIPetstore.Core, OpenAPIPetstore
levelDebugOpenAPIPetstore.Logging, OpenAPIPetstore
levelErrorOpenAPIPetstore.Logging, OpenAPIPetstore
levelInfoOpenAPIPetstore.Logging, OpenAPIPetstore
LogContextOpenAPIPetstore.Logging, OpenAPIPetstore
logExceptionsOpenAPIPetstore.Logging, OpenAPIPetstore
LogExecOpenAPIPetstore.Logging, OpenAPIPetstore
LogExecWithContextOpenAPIPetstore.Logging, OpenAPIPetstore
LoginUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
loginUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
LogLevelOpenAPIPetstore.Logging, OpenAPIPetstore
LogoutUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
logoutUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
MapTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
mapTestDirectMapOpenAPIPetstore.Model, OpenAPIPetstore
mapTestDirectMapLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mapTestIndirectMapOpenAPIPetstore.Model, OpenAPIPetstore
mapTestIndirectMapLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mapTestMapMapOfStringOpenAPIPetstore.Model, OpenAPIPetstore
mapTestMapMapOfStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mapTestMapOfEnumStringOpenAPIPetstore.Model, OpenAPIPetstore
mapTestMapOfEnumStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
MimeAny 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeError 
1 (Type/Class)OpenAPIPetstore.Client, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Client, OpenAPIPetstore
mimeErrorOpenAPIPetstore.Client, OpenAPIPetstore
mimeErrorResponseOpenAPIPetstore.Client, OpenAPIPetstore
MimeFormUrlEncoded 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeJSON 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeMultipartFormData 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeNoContent 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeOctetStream 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimePlainText 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeRenderOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeRenderOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeRender'OpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeRenderDefaultMultipartFormDataOpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeResult 
1 (Type/Class)OpenAPIPetstore.Client, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Client, OpenAPIPetstore
mimeResultOpenAPIPetstore.Client, OpenAPIPetstore
mimeResultResponseOpenAPIPetstore.Client, OpenAPIPetstore
MimeTextXml 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeTextXmlCharsetutf16 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeTextXmlCharsetutf8 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeTypeOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeTypeOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeType'OpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeTypesOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeTypes'OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeUnrenderOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeUnrenderOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeUnrender'OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeXML 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeXmlCharsetutf16 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeXmlCharsetutf8 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MixedPropertiesAndAdditionalPropertiesClass 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassDateTimeOpenAPIPetstore.Model, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassDateTimeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassMapOpenAPIPetstore.Model, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassMapLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassUuidOpenAPIPetstore.Model, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassUuidLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mkAdditionalPropertiesAnyTypeOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesArrayOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesBooleanOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesClassOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesIntegerOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesNumberOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesObjectOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesStringOpenAPIPetstore.Model, OpenAPIPetstore
mkAnimalOpenAPIPetstore.Model, OpenAPIPetstore
mkApiResponseOpenAPIPetstore.Model, OpenAPIPetstore
mkArrayOfArrayOfNumberOnlyOpenAPIPetstore.Model, OpenAPIPetstore
mkArrayOfNumberOnlyOpenAPIPetstore.Model, OpenAPIPetstore
mkArrayTestOpenAPIPetstore.Model, OpenAPIPetstore
mkCapitalizationOpenAPIPetstore.Model, OpenAPIPetstore
mkCatOpenAPIPetstore.Model, OpenAPIPetstore
mkCatAllOfOpenAPIPetstore.Model, OpenAPIPetstore
mkCategoryOpenAPIPetstore.Model, OpenAPIPetstore
mkClassModelOpenAPIPetstore.Model, OpenAPIPetstore
mkClientOpenAPIPetstore.Model, OpenAPIPetstore
mkDogOpenAPIPetstore.Model, OpenAPIPetstore
mkDogAllOfOpenAPIPetstore.Model, OpenAPIPetstore
mkEnumArraysOpenAPIPetstore.Model, OpenAPIPetstore
mkEnumTestOpenAPIPetstore.Model, OpenAPIPetstore
mkFileOpenAPIPetstore.Model, OpenAPIPetstore
mkFileSchemaTestClassOpenAPIPetstore.Model, OpenAPIPetstore
mkFormatTestOpenAPIPetstore.Model, OpenAPIPetstore
mkHasOnlyReadOnlyOpenAPIPetstore.Model, OpenAPIPetstore
mkMapTestOpenAPIPetstore.Model, OpenAPIPetstore
mkMixedPropertiesAndAdditionalPropertiesClassOpenAPIPetstore.Model, OpenAPIPetstore
mkModel200ResponseOpenAPIPetstore.Model, OpenAPIPetstore
mkModelListOpenAPIPetstore.Model, OpenAPIPetstore
mkModelReturnOpenAPIPetstore.Model, OpenAPIPetstore
mkNameOpenAPIPetstore.Model, OpenAPIPetstore
mkNumberOnlyOpenAPIPetstore.Model, OpenAPIPetstore
mkOrderOpenAPIPetstore.Model, OpenAPIPetstore
mkOuterCompositeOpenAPIPetstore.Model, OpenAPIPetstore
mkPetOpenAPIPetstore.Model, OpenAPIPetstore
mkReadOnlyFirstOpenAPIPetstore.Model, OpenAPIPetstore
mkSpecialModelNameOpenAPIPetstore.Model, OpenAPIPetstore
mkTagOpenAPIPetstore.Model, OpenAPIPetstore
mkTypeHolderDefaultOpenAPIPetstore.Model, OpenAPIPetstore
mkTypeHolderExampleOpenAPIPetstore.Model, OpenAPIPetstore
mkUserOpenAPIPetstore.Model, OpenAPIPetstore
mkXmlItemOpenAPIPetstore.Model, OpenAPIPetstore
Model200Response 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
model200ResponseClassOpenAPIPetstore.Model, OpenAPIPetstore
model200ResponseClassLOpenAPIPetstore.ModelLens, OpenAPIPetstore
model200ResponseNameOpenAPIPetstore.Model, OpenAPIPetstore
model200ResponseNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
ModelList 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
modelList123listOpenAPIPetstore.Model, OpenAPIPetstore
modelList123listLOpenAPIPetstore.ModelLens, OpenAPIPetstore
ModelReturn 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
modelReturnReturnOpenAPIPetstore.Model, OpenAPIPetstore
modelReturnReturnLOpenAPIPetstore.ModelLens, OpenAPIPetstore
modifyInitRequestOpenAPIPetstore.Client, OpenAPIPetstore
modifyInitRequestMOpenAPIPetstore.Client, OpenAPIPetstore
MultiParamArrayOpenAPIPetstore.Core, OpenAPIPetstore
Name 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
name123numberOpenAPIPetstore.Model, OpenAPIPetstore
name123numberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Name2 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
nameNameOpenAPIPetstore.Model, OpenAPIPetstore
nameNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
namePropertyOpenAPIPetstore.Model, OpenAPIPetstore
namePropertyLOpenAPIPetstore.ModelLens, OpenAPIPetstore
nameSnakeCaseOpenAPIPetstore.Model, OpenAPIPetstore
nameSnakeCaseLOpenAPIPetstore.ModelLens, OpenAPIPetstore
newConfigOpenAPIPetstore.Core, OpenAPIPetstore
NoContent 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
Number 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
NumberOnly 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
numberOnlyJustNumberOpenAPIPetstore.Model, OpenAPIPetstore
numberOnlyJustNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Op123testSpecialTagsOpenAPIPetstore.API.AnotherFake, OpenAPIPetstore.API, OpenAPIPetstore
op123testSpecialTagsOpenAPIPetstore.API.AnotherFake, OpenAPIPetstore.API, OpenAPIPetstore
OpenAPIPetstoreConfig 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
OpenAPIPetstoreRequest 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
Order 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
orderCompleteOpenAPIPetstore.Model, OpenAPIPetstore
orderCompleteLOpenAPIPetstore.ModelLens, OpenAPIPetstore
OrderId 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
orderIdOpenAPIPetstore.Model, OpenAPIPetstore
orderIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
OrderIdText 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
orderPetIdOpenAPIPetstore.Model, OpenAPIPetstore
orderPetIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
orderQuantityOpenAPIPetstore.Model, OpenAPIPetstore
orderQuantityLOpenAPIPetstore.ModelLens, OpenAPIPetstore
orderShipDateOpenAPIPetstore.Model, OpenAPIPetstore
orderShipDateLOpenAPIPetstore.ModelLens, OpenAPIPetstore
orderStatusOpenAPIPetstore.Model, OpenAPIPetstore
orderStatusLOpenAPIPetstore.ModelLens, OpenAPIPetstore
OuterComposite 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
outerCompositeMyBooleanOpenAPIPetstore.Model, OpenAPIPetstore
outerCompositeMyBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
outerCompositeMyNumberOpenAPIPetstore.Model, OpenAPIPetstore
outerCompositeMyNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
outerCompositeMyStringOpenAPIPetstore.Model, OpenAPIPetstore
outerCompositeMyStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
OuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
OuterEnum'ApprovedOpenAPIPetstore.Model, OpenAPIPetstore
OuterEnum'DeliveredOpenAPIPetstore.Model, OpenAPIPetstore
OuterEnum'PlacedOpenAPIPetstore.Model, OpenAPIPetstore
Param 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Param2 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamBinary 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamBodyOpenAPIPetstore.Core, OpenAPIPetstore
ParamBodyBOpenAPIPetstore.Core, OpenAPIPetstore
ParamBodyBLOpenAPIPetstore.Core, OpenAPIPetstore
ParamBodyFormUrlEncodedOpenAPIPetstore.Core, OpenAPIPetstore
ParamBodyMultipartFormDataOpenAPIPetstore.Core, OpenAPIPetstore
ParamBodyNoneOpenAPIPetstore.Core, OpenAPIPetstore
ParamDate 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamDateTime 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamDouble 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamFloat 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamInteger 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamMapMapStringText 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Params 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
paramsBodyOpenAPIPetstore.Core, OpenAPIPetstore
paramsBodyLOpenAPIPetstore.Core, OpenAPIPetstore
paramsHeadersOpenAPIPetstore.Core, OpenAPIPetstore
paramsHeadersLOpenAPIPetstore.Core, OpenAPIPetstore
paramsQueryOpenAPIPetstore.Core, OpenAPIPetstore
paramsQueryLOpenAPIPetstore.Core, OpenAPIPetstore
ParamString 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Password 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
PatternWithoutDelimiter 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Pet 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
petCategoryOpenAPIPetstore.Model, OpenAPIPetstore
petCategoryLOpenAPIPetstore.ModelLens, OpenAPIPetstore
PetId 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
petIdOpenAPIPetstore.Model, OpenAPIPetstore
petIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
petNameOpenAPIPetstore.Model, OpenAPIPetstore
petNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
petPhotoUrlsOpenAPIPetstore.Model, OpenAPIPetstore
petPhotoUrlsLOpenAPIPetstore.ModelLens, OpenAPIPetstore
petStatusOpenAPIPetstore.Model, OpenAPIPetstore
petStatusLOpenAPIPetstore.ModelLens, OpenAPIPetstore
petTagsOpenAPIPetstore.Model, OpenAPIPetstore
petTagsLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Pipe 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
PipeSeparatedOpenAPIPetstore.Core, OpenAPIPetstore
PlaceOrderOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
placeOrderOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
ProducesOpenAPIPetstore.MimeTypes, OpenAPIPetstore
Query 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
rAuthTypesOpenAPIPetstore.Core, OpenAPIPetstore
rAuthTypesLOpenAPIPetstore.Core, OpenAPIPetstore
ReadOnlyFirst 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
readOnlyFirstBarOpenAPIPetstore.Model, OpenAPIPetstore
readOnlyFirstBarLOpenAPIPetstore.ModelLens, OpenAPIPetstore
readOnlyFirstBazOpenAPIPetstore.Model, OpenAPIPetstore
readOnlyFirstBazLOpenAPIPetstore.ModelLens, OpenAPIPetstore
removeHeaderOpenAPIPetstore.Core, OpenAPIPetstore
RequiredBooleanGroup 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
RequiredFile 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
RequiredInt64Group 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
RequiredStringGroup 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
rMethodOpenAPIPetstore.Core, OpenAPIPetstore
rMethodLOpenAPIPetstore.Core, OpenAPIPetstore
rParamsOpenAPIPetstore.Core, OpenAPIPetstore
rParamsLOpenAPIPetstore.Core, OpenAPIPetstore
runConfigLogOpenAPIPetstore.Client, OpenAPIPetstore
runConfigLogWithExceptionsOpenAPIPetstore.Client, OpenAPIPetstore
runDefaultLogExecWithContextOpenAPIPetstore.Logging, OpenAPIPetstore
runNullLogExecOpenAPIPetstore.Logging, OpenAPIPetstore
rUrlPathOpenAPIPetstore.Core, OpenAPIPetstore
rUrlPathLOpenAPIPetstore.Core, OpenAPIPetstore
setBodyParamOpenAPIPetstore.Core, OpenAPIPetstore
setHeaderOpenAPIPetstore.Core, OpenAPIPetstore
setQueryOpenAPIPetstore.Core, OpenAPIPetstore
SpaceSeparatedOpenAPIPetstore.Core, OpenAPIPetstore
SpecialModelName 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
specialModelNameSpecialPropertyNameOpenAPIPetstore.Model, OpenAPIPetstore
specialModelNameSpecialPropertyNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Status 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
StatusText 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
stderrLoggingContextOpenAPIPetstore.Logging, OpenAPIPetstore
stderrLoggingExecOpenAPIPetstore.Logging, OpenAPIPetstore
stdoutLoggingContextOpenAPIPetstore.Logging, OpenAPIPetstore
stdoutLoggingExecOpenAPIPetstore.Logging, OpenAPIPetstore
StringGroup 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
TabSeparatedOpenAPIPetstore.Core, OpenAPIPetstore
Tag 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
tagIdOpenAPIPetstore.Model, OpenAPIPetstore
tagIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
tagNameOpenAPIPetstore.Model, OpenAPIPetstore
tagNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Tags 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
TestBodyWithFileSchemaOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testBodyWithFileSchemaOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestBodyWithQueryParamsOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testBodyWithQueryParamsOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestClassnameOpenAPIPetstore.API.FakeClassnameTags123, OpenAPIPetstore.API, OpenAPIPetstore
testClassnameOpenAPIPetstore.API.FakeClassnameTags123, OpenAPIPetstore.API, OpenAPIPetstore
TestClientModelOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testClientModelOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestEndpointParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testEndpointParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestEnumParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testEnumParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestGroupParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testGroupParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestInlineAdditionalPropertiesOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testInlineAdditionalPropertiesOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestJsonFormDataOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testJsonFormDataOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestQueryParameterCollectionFormatOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testQueryParameterCollectionFormatOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
toE'ArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumStringOpenAPIPetstore.Model, OpenAPIPetstore
toE'InnerOpenAPIPetstore.Model, OpenAPIPetstore
toE'JustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
toE'StatusOpenAPIPetstore.Model, OpenAPIPetstore
toE'Status2OpenAPIPetstore.Model, OpenAPIPetstore
toEnumClassOpenAPIPetstore.Model, OpenAPIPetstore
toFormOpenAPIPetstore.Core, OpenAPIPetstore
toFormCollOpenAPIPetstore.Core, OpenAPIPetstore
toHeaderOpenAPIPetstore.Core, OpenAPIPetstore
toHeaderCollOpenAPIPetstore.Core, OpenAPIPetstore
toOuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
toPathOpenAPIPetstore.Core, OpenAPIPetstore
toQueryOpenAPIPetstore.Core, OpenAPIPetstore
toQueryCollOpenAPIPetstore.Core, OpenAPIPetstore
TypeHolderDefault 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultArrayItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultArrayItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultBoolItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultBoolItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultIntegerItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultIntegerItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultNumberItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultNumberItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultStringItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultStringItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
TypeHolderExample 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleArrayItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleArrayItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleBoolItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleBoolItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleIntegerItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleIntegerItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleNumberItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleNumberItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleStringItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleStringItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
unAcceptOpenAPIPetstore.MimeTypes, OpenAPIPetstore
unAdditionalMetadataOpenAPIPetstore.Model, OpenAPIPetstore
unApiKeyOpenAPIPetstore.Model, OpenAPIPetstore
unBinaryOpenAPIPetstore.Core, OpenAPIPetstore
unBodyOpenAPIPetstore.Model, OpenAPIPetstore
unBodyBoolOpenAPIPetstore.Model, OpenAPIPetstore
unBodyDoubleOpenAPIPetstore.Model, OpenAPIPetstore
unBodyTextOpenAPIPetstore.Model, OpenAPIPetstore
unBooleanGroupOpenAPIPetstore.Model, OpenAPIPetstore
unByteOpenAPIPetstore.Model, OpenAPIPetstore
unByteArrayOpenAPIPetstore.Core, OpenAPIPetstore
unCallbackOpenAPIPetstore.Model, OpenAPIPetstore
unContentTypeOpenAPIPetstore.MimeTypes, OpenAPIPetstore
unContextOpenAPIPetstore.Model, OpenAPIPetstore
unDateOpenAPIPetstore.Core, OpenAPIPetstore
unDateTimeOpenAPIPetstore.Core, OpenAPIPetstore
unEnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
unEnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
unEnumHeaderStringOpenAPIPetstore.Model, OpenAPIPetstore
unEnumHeaderStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
unEnumQueryDoubleOpenAPIPetstore.Model, OpenAPIPetstore
unEnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
unEnumQueryStringOpenAPIPetstore.Model, OpenAPIPetstore
unEnumQueryStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
unFile2OpenAPIPetstore.Model, OpenAPIPetstore
unHttpOpenAPIPetstore.Model, OpenAPIPetstore
unInitRequestOpenAPIPetstore.Client, OpenAPIPetstore
unInt32OpenAPIPetstore.Model, OpenAPIPetstore
unInt64OpenAPIPetstore.Model, OpenAPIPetstore
unInt64GroupOpenAPIPetstore.Model, OpenAPIPetstore
unIoutilOpenAPIPetstore.Model, OpenAPIPetstore
unName2OpenAPIPetstore.Model, OpenAPIPetstore
unNumberOpenAPIPetstore.Model, OpenAPIPetstore
unOrderIdOpenAPIPetstore.Model, OpenAPIPetstore
unOrderIdTextOpenAPIPetstore.Model, OpenAPIPetstore
unParamOpenAPIPetstore.Model, OpenAPIPetstore
unParam2OpenAPIPetstore.Model, OpenAPIPetstore
unParamBinaryOpenAPIPetstore.Model, OpenAPIPetstore
unParamDateOpenAPIPetstore.Model, OpenAPIPetstore
unParamDateTimeOpenAPIPetstore.Model, OpenAPIPetstore
unParamDoubleOpenAPIPetstore.Model, OpenAPIPetstore
unParamFloatOpenAPIPetstore.Model, OpenAPIPetstore
unParamIntegerOpenAPIPetstore.Model, OpenAPIPetstore
unParamMapMapStringTextOpenAPIPetstore.Model, OpenAPIPetstore
unParamStringOpenAPIPetstore.Model, OpenAPIPetstore
unPasswordOpenAPIPetstore.Model, OpenAPIPetstore
unPatternWithoutDelimiterOpenAPIPetstore.Model, OpenAPIPetstore
unPetIdOpenAPIPetstore.Model, OpenAPIPetstore
unPipeOpenAPIPetstore.Model, OpenAPIPetstore
unQueryOpenAPIPetstore.Model, OpenAPIPetstore
unRequiredBooleanGroupOpenAPIPetstore.Model, OpenAPIPetstore
unRequiredFileOpenAPIPetstore.Model, OpenAPIPetstore
unRequiredInt64GroupOpenAPIPetstore.Model, OpenAPIPetstore
unRequiredStringGroupOpenAPIPetstore.Model, OpenAPIPetstore
unStatusOpenAPIPetstore.Model, OpenAPIPetstore
unStatusTextOpenAPIPetstore.Model, OpenAPIPetstore
unStringGroupOpenAPIPetstore.Model, OpenAPIPetstore
unTagsOpenAPIPetstore.Model, OpenAPIPetstore
unUrlOpenAPIPetstore.Model, OpenAPIPetstore
unUsernameOpenAPIPetstore.Model, OpenAPIPetstore
UpdatePetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
updatePetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
UpdatePetWithFormOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
updatePetWithFormOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
UpdateUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
updateUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
UploadFileOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
uploadFileOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
UploadFileWithRequiredFileOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
uploadFileWithRequiredFileOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
Url 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
User 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
userEmailOpenAPIPetstore.Model, OpenAPIPetstore
userEmailLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userFirstNameOpenAPIPetstore.Model, OpenAPIPetstore
userFirstNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userIdOpenAPIPetstore.Model, OpenAPIPetstore
userIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userLastNameOpenAPIPetstore.Model, OpenAPIPetstore
userLastNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Username 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
userPasswordOpenAPIPetstore.Model, OpenAPIPetstore
userPasswordLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userPhoneOpenAPIPetstore.Model, OpenAPIPetstore
userPhoneLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userUsernameOpenAPIPetstore.Model, OpenAPIPetstore
userUsernameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userUserStatusOpenAPIPetstore.Model, OpenAPIPetstore
userUserStatusLOpenAPIPetstore.ModelLens, OpenAPIPetstore
withNoLoggingOpenAPIPetstore.Core, OpenAPIPetstore
withStderrLoggingOpenAPIPetstore.Core, OpenAPIPetstore
withStdoutLoggingOpenAPIPetstore.Core, OpenAPIPetstore
XmlItem 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
xmlItemAttributeBooleanOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemAttributeBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemAttributeIntegerOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemAttributeIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemAttributeNumberOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemAttributeNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemAttributeStringOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemAttributeStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameBooleanOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameIntegerOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameNumberOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceBooleanOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceIntegerOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceNumberOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceStringOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceWrappedArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceWrappedArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameStringOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameWrappedArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameWrappedArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixBooleanOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixIntegerOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsBooleanOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsIntegerOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsNumberOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsStringOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsWrappedArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsWrappedArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNumberOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixStringOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixWrappedArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixWrappedArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemWrappedArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemWrappedArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
_addMultiFormPartOpenAPIPetstore.Core, OpenAPIPetstore
_applyAuthMethodsOpenAPIPetstore.Core, OpenAPIPetstore
_emptyToNothingOpenAPIPetstore.Core, OpenAPIPetstore
_hasAuthTypeOpenAPIPetstore.Core, OpenAPIPetstore
_logOpenAPIPetstore.Logging, OpenAPIPetstore
_memptyToNothingOpenAPIPetstore.Core, OpenAPIPetstore
_mkParamsOpenAPIPetstore.Core, OpenAPIPetstore
_mkRequestOpenAPIPetstore.Core, OpenAPIPetstore
_omitNullsOpenAPIPetstore.Core, OpenAPIPetstore
_parseISO8601OpenAPIPetstore.Core, OpenAPIPetstore
_readBinaryBase64OpenAPIPetstore.Core, OpenAPIPetstore
_readByteArrayOpenAPIPetstore.Core, OpenAPIPetstore
_readDateOpenAPIPetstore.Core, OpenAPIPetstore
_readDateTimeOpenAPIPetstore.Core, OpenAPIPetstore
_setAcceptHeaderOpenAPIPetstore.Core, OpenAPIPetstore
_setBodyBSOpenAPIPetstore.Core, OpenAPIPetstore
_setBodyLBSOpenAPIPetstore.Core, OpenAPIPetstore
_setContentTypeHeaderOpenAPIPetstore.Core, OpenAPIPetstore
_showBinaryBase64OpenAPIPetstore.Core, OpenAPIPetstore
_showByteArrayOpenAPIPetstore.Core, OpenAPIPetstore
_showDateOpenAPIPetstore.Core, OpenAPIPetstore
_showDateTimeOpenAPIPetstore.Core, OpenAPIPetstore
_toCollOpenAPIPetstore.Core, OpenAPIPetstore
_toCollAOpenAPIPetstore.Core, OpenAPIPetstore
_toCollA'OpenAPIPetstore.Core, OpenAPIPetstore
_toFormItemOpenAPIPetstore.Core, OpenAPIPetstore
_toInitRequestOpenAPIPetstore.Client, OpenAPIPetstore
\ No newline at end of file +openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client (Index)

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Index

-&-OpenAPIPetstore.Core, OpenAPIPetstore
Accept 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
addAuthMethodOpenAPIPetstore.Core, OpenAPIPetstore
addFormOpenAPIPetstore.Core, OpenAPIPetstore
AdditionalMetadata 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
AdditionalPropertiesAnyType 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesAnyTypeNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesAnyTypeNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesArray 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesArrayNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesArrayNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesBoolean 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesBooleanNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesBooleanNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesClass 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassAnytype1OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassAnytype1LOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassAnytype2OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassAnytype2LOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassAnytype3OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassAnytype3LOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapArrayAnytypeOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapArrayAnytypeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapArrayIntegerOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapArrayIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapBooleanOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapIntegerOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapMapAnytypeOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapMapAnytypeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapMapStringOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapMapStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapNumberOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
additionalPropertiesClassMapStringOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesClassMapStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesInteger 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesIntegerNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesIntegerNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesNumber 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesNumberNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesNumberNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesObject 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesObjectNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesObjectNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AdditionalPropertiesString 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesStringNameOpenAPIPetstore.Model, OpenAPIPetstore
additionalPropertiesStringNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AddPetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
addPetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
Animal 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
animalClassNameOpenAPIPetstore.Model, OpenAPIPetstore
animalClassNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
animalColorOpenAPIPetstore.Model, OpenAPIPetstore
animalColorLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AnyAuthMethod 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
ApiKey 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ApiResponse 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
apiResponseCodeOpenAPIPetstore.Model, OpenAPIPetstore
apiResponseCodeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
apiResponseMessageOpenAPIPetstore.Model, OpenAPIPetstore
apiResponseMessageLOpenAPIPetstore.ModelLens, OpenAPIPetstore
apiResponseTypeOpenAPIPetstore.Model, OpenAPIPetstore
apiResponseTypeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
applyAuthMethodOpenAPIPetstore.Core, OpenAPIPetstore
applyOptionalParamOpenAPIPetstore.Core, OpenAPIPetstore
ArrayOfArrayOfNumberOnly 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
arrayOfArrayOfNumberOnlyArrayArrayNumberOpenAPIPetstore.Model, OpenAPIPetstore
arrayOfArrayOfNumberOnlyArrayArrayNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
ArrayOfNumberOnly 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
arrayOfNumberOnlyArrayNumberOpenAPIPetstore.Model, OpenAPIPetstore
arrayOfNumberOnlyArrayNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
ArrayTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
arrayTestArrayArrayOfIntegerOpenAPIPetstore.Model, OpenAPIPetstore
arrayTestArrayArrayOfIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
arrayTestArrayArrayOfModelOpenAPIPetstore.Model, OpenAPIPetstore
arrayTestArrayArrayOfModelLOpenAPIPetstore.ModelLens, OpenAPIPetstore
arrayTestArrayOfStringOpenAPIPetstore.Model, OpenAPIPetstore
arrayTestArrayOfStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
AuthApiKeyApiKey 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
AuthApiKeyApiKeyQuery 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
AuthBasicHttpBasicTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
AuthMethodOpenAPIPetstore.Core, OpenAPIPetstore
AuthMethodException 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
AuthOAuthPetstoreAuth 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Binary 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
Body 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
BodyBool 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
BodyDouble 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
BodyText 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
BooleanGroup 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Byte 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ByteArray 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
Callback 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Capitalization 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
capitalizationAttNameOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationAttNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
capitalizationCapitalCamelOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationCapitalCamelLOpenAPIPetstore.ModelLens, OpenAPIPetstore
capitalizationCapitalSnakeOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationCapitalSnakeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
capitalizationScaEthFlowPointsOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationScaEthFlowPointsLOpenAPIPetstore.ModelLens, OpenAPIPetstore
capitalizationSmallCamelOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationSmallCamelLOpenAPIPetstore.ModelLens, OpenAPIPetstore
capitalizationSmallSnakeOpenAPIPetstore.Model, OpenAPIPetstore
capitalizationSmallSnakeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Cat 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
CatAllOf 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
catAllOfDeclawedOpenAPIPetstore.Model, OpenAPIPetstore
catAllOfDeclawedLOpenAPIPetstore.ModelLens, OpenAPIPetstore
catClassNameOpenAPIPetstore.Model, OpenAPIPetstore
catClassNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
catColorOpenAPIPetstore.Model, OpenAPIPetstore
catColorLOpenAPIPetstore.ModelLens, OpenAPIPetstore
catDeclawedOpenAPIPetstore.Model, OpenAPIPetstore
catDeclawedLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Category 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
categoryIdOpenAPIPetstore.Model, OpenAPIPetstore
categoryIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
categoryNameOpenAPIPetstore.Model, OpenAPIPetstore
categoryNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
ClassModel 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
classModelClassOpenAPIPetstore.Model, OpenAPIPetstore
classModelClassLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Client 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
clientClientOpenAPIPetstore.Model, OpenAPIPetstore
clientClientLOpenAPIPetstore.ModelLens, OpenAPIPetstore
CollectionFormatOpenAPIPetstore.Core, OpenAPIPetstore
CommaSeparatedOpenAPIPetstore.Core, OpenAPIPetstore
configAuthMethodsOpenAPIPetstore.Core, OpenAPIPetstore
configHostOpenAPIPetstore.Core, OpenAPIPetstore
configLogContextOpenAPIPetstore.Core, OpenAPIPetstore
configLogExecWithContextOpenAPIPetstore.Core, OpenAPIPetstore
configUserAgentOpenAPIPetstore.Core, OpenAPIPetstore
configValidateAuthMethodsOpenAPIPetstore.Core, OpenAPIPetstore
ConsumesOpenAPIPetstore.MimeTypes, OpenAPIPetstore
ContentType 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
Context 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
CreateUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
createUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
CreateUsersWithArrayInputOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
createUsersWithArrayInputOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
CreateUsersWithListInputOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
createUsersWithListInputOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
CreateXmlItemOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
createXmlItemOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
Date 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
DateTime 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
DeleteOrderOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
deleteOrderOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
DeletePetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
deletePetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
DeleteUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
deleteUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
dispatchInitUnsafeOpenAPIPetstore.Client, OpenAPIPetstore
dispatchLbsOpenAPIPetstore.Client, OpenAPIPetstore
dispatchLbsUnsafeOpenAPIPetstore.Client, OpenAPIPetstore
dispatchMimeOpenAPIPetstore.Client, OpenAPIPetstore
dispatchMime'OpenAPIPetstore.Client, OpenAPIPetstore
Dog 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
DogAllOf 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
dogAllOfBreedOpenAPIPetstore.Model, OpenAPIPetstore
dogAllOfBreedLOpenAPIPetstore.ModelLens, OpenAPIPetstore
dogBreedOpenAPIPetstore.Model, OpenAPIPetstore
dogBreedLOpenAPIPetstore.ModelLens, OpenAPIPetstore
dogClassNameOpenAPIPetstore.Model, OpenAPIPetstore
dogClassNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
dogColorOpenAPIPetstore.Model, OpenAPIPetstore
dogColorLOpenAPIPetstore.ModelLens, OpenAPIPetstore
E'ArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
E'ArrayEnum'CrabOpenAPIPetstore.Model, OpenAPIPetstore
E'ArrayEnum'FishOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormString'_abcOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormString'_efgOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormString'_xyzOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormStringArray'DollarOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumFormStringArray'GreaterThanOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumInteger'Num1OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumInteger'NumMinus_1OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumNumber'Num1_Dot_1OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumNumber'NumMinus_1_Dot_2OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumQueryInteger'Num1OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumQueryInteger'NumMinus_2OpenAPIPetstore.Model, OpenAPIPetstore
E'EnumStringOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumString'EmptyOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumString'LowerOpenAPIPetstore.Model, OpenAPIPetstore
E'EnumString'UPPEROpenAPIPetstore.Model, OpenAPIPetstore
E'InnerOpenAPIPetstore.Model, OpenAPIPetstore
E'Inner'LowerOpenAPIPetstore.Model, OpenAPIPetstore
E'Inner'UPPEROpenAPIPetstore.Model, OpenAPIPetstore
E'JustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
E'JustSymbol'DollarOpenAPIPetstore.Model, OpenAPIPetstore
E'JustSymbol'Greater_Than_Or_Equal_ToOpenAPIPetstore.Model, OpenAPIPetstore
E'StatusOpenAPIPetstore.Model, OpenAPIPetstore
E'Status'ApprovedOpenAPIPetstore.Model, OpenAPIPetstore
E'Status'DeliveredOpenAPIPetstore.Model, OpenAPIPetstore
E'Status'PlacedOpenAPIPetstore.Model, OpenAPIPetstore
E'Status2OpenAPIPetstore.Model, OpenAPIPetstore
E'Status2'AvailableOpenAPIPetstore.Model, OpenAPIPetstore
E'Status2'PendingOpenAPIPetstore.Model, OpenAPIPetstore
E'Status2'SoldOpenAPIPetstore.Model, OpenAPIPetstore
EnumArrays 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
enumArraysArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
enumArraysArrayEnumLOpenAPIPetstore.ModelLens, OpenAPIPetstore
enumArraysJustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
enumArraysJustSymbolLOpenAPIPetstore.ModelLens, OpenAPIPetstore
EnumClassOpenAPIPetstore.Model, OpenAPIPetstore
EnumClass'_abcOpenAPIPetstore.Model, OpenAPIPetstore
EnumClass'_efgOpenAPIPetstore.Model, OpenAPIPetstore
EnumClass'_xyzOpenAPIPetstore.Model, OpenAPIPetstore
EnumFormString 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumFormStringArray 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumHeaderString 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumHeaderStringArray 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumQueryDouble 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumQueryInteger 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumQueryString 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumQueryStringArray 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
EnumTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
enumTestEnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
enumTestEnumIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
enumTestEnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
enumTestEnumNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
enumTestEnumStringOpenAPIPetstore.Model, OpenAPIPetstore
enumTestEnumStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
enumTestEnumStringRequiredOpenAPIPetstore.Model, OpenAPIPetstore
enumTestEnumStringRequiredLOpenAPIPetstore.ModelLens, OpenAPIPetstore
enumTestOuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
enumTestOuterEnumLOpenAPIPetstore.ModelLens, OpenAPIPetstore
FakeOuterBooleanSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterBooleanSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterCompositeSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterCompositeSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterNumberSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterNumberSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterStringSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterStringSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
File 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
File2 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
FileSchemaTestClass 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFileOpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFileLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fileSchemaTestClassFilesOpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFilesLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fileSourceUriOpenAPIPetstore.Model, OpenAPIPetstore
fileSourceUriLOpenAPIPetstore.ModelLens, OpenAPIPetstore
FindPetsByStatusOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
findPetsByStatusOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
FindPetsByTagsOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
findPetsByTagsOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
FormatTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
formatTestBigDecimalOpenAPIPetstore.Model, OpenAPIPetstore
formatTestBigDecimalLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestBinaryOpenAPIPetstore.Model, OpenAPIPetstore
formatTestBinaryLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestByteOpenAPIPetstore.Model, OpenAPIPetstore
formatTestByteLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDateOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDateLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDateTimeOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDateTimeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDoubleOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDoubleLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestFloatOpenAPIPetstore.Model, OpenAPIPetstore
formatTestFloatLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestInt32OpenAPIPetstore.Model, OpenAPIPetstore
formatTestInt32LOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestInt64OpenAPIPetstore.Model, OpenAPIPetstore
formatTestInt64LOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestIntegerOpenAPIPetstore.Model, OpenAPIPetstore
formatTestIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestNumberOpenAPIPetstore.Model, OpenAPIPetstore
formatTestNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestPasswordOpenAPIPetstore.Model, OpenAPIPetstore
formatTestPasswordLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestStringOpenAPIPetstore.Model, OpenAPIPetstore
formatTestStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestUuidOpenAPIPetstore.Model, OpenAPIPetstore
formatTestUuidLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fromE'ArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumStringOpenAPIPetstore.Model, OpenAPIPetstore
fromE'InnerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'JustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
fromE'StatusOpenAPIPetstore.Model, OpenAPIPetstore
fromE'Status2OpenAPIPetstore.Model, OpenAPIPetstore
fromEnumClassOpenAPIPetstore.Model, OpenAPIPetstore
fromOuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
GetInventoryOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
getInventoryOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
GetOrderByIdOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
getOrderByIdOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
GetPetByIdOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
getPetByIdOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
GetUserByNameOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
getUserByNameOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
HasBodyParamOpenAPIPetstore.Core, OpenAPIPetstore
HasOnlyReadOnly 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
hasOnlyReadOnlyBarOpenAPIPetstore.Model, OpenAPIPetstore
hasOnlyReadOnlyBarLOpenAPIPetstore.ModelLens, OpenAPIPetstore
hasOnlyReadOnlyFooOpenAPIPetstore.Model, OpenAPIPetstore
hasOnlyReadOnlyFooLOpenAPIPetstore.ModelLens, OpenAPIPetstore
HasOptionalParamOpenAPIPetstore.Core, OpenAPIPetstore
Http 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
initLogContextOpenAPIPetstore.Logging, OpenAPIPetstore
InitRequest 
1 (Type/Class)OpenAPIPetstore.Client, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Client, OpenAPIPetstore
Int32 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Int64 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Int64Group 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Ioutil 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Lens_OpenAPIPetstore.Core, OpenAPIPetstore
Lens_'OpenAPIPetstore.Core, OpenAPIPetstore
levelDebugOpenAPIPetstore.Logging, OpenAPIPetstore
levelErrorOpenAPIPetstore.Logging, OpenAPIPetstore
levelInfoOpenAPIPetstore.Logging, OpenAPIPetstore
LogContextOpenAPIPetstore.Logging, OpenAPIPetstore
logExceptionsOpenAPIPetstore.Logging, OpenAPIPetstore
LogExecOpenAPIPetstore.Logging, OpenAPIPetstore
LogExecWithContextOpenAPIPetstore.Logging, OpenAPIPetstore
LoginUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
loginUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
LogLevelOpenAPIPetstore.Logging, OpenAPIPetstore
LogoutUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
logoutUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
MapTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
mapTestDirectMapOpenAPIPetstore.Model, OpenAPIPetstore
mapTestDirectMapLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mapTestIndirectMapOpenAPIPetstore.Model, OpenAPIPetstore
mapTestIndirectMapLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mapTestMapMapOfStringOpenAPIPetstore.Model, OpenAPIPetstore
mapTestMapMapOfStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mapTestMapOfEnumStringOpenAPIPetstore.Model, OpenAPIPetstore
mapTestMapOfEnumStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
MimeAny 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeError 
1 (Type/Class)OpenAPIPetstore.Client, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Client, OpenAPIPetstore
mimeErrorOpenAPIPetstore.Client, OpenAPIPetstore
mimeErrorResponseOpenAPIPetstore.Client, OpenAPIPetstore
MimeFormUrlEncoded 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeJSON 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeMultipartFormData 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeNoContent 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeOctetStream 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimePlainText 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeRenderOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeRenderOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeRender'OpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeRenderDefaultMultipartFormDataOpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeResult 
1 (Type/Class)OpenAPIPetstore.Client, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Client, OpenAPIPetstore
mimeResultOpenAPIPetstore.Client, OpenAPIPetstore
mimeResultResponseOpenAPIPetstore.Client, OpenAPIPetstore
MimeTextXml 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeTextXmlCharsetutf16 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeTextXmlCharsetutf8 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeTypeOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeTypeOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeType'OpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeTypesOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeTypes'OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeUnrenderOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeUnrenderOpenAPIPetstore.MimeTypes, OpenAPIPetstore
mimeUnrender'OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeXML 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeXmlCharsetutf16 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MimeXmlCharsetutf8 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
MixedPropertiesAndAdditionalPropertiesClass 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassDateTimeOpenAPIPetstore.Model, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassDateTimeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassMapOpenAPIPetstore.Model, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassMapLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassUuidOpenAPIPetstore.Model, OpenAPIPetstore
mixedPropertiesAndAdditionalPropertiesClassUuidLOpenAPIPetstore.ModelLens, OpenAPIPetstore
mkAdditionalPropertiesAnyTypeOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesArrayOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesBooleanOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesClassOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesIntegerOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesNumberOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesObjectOpenAPIPetstore.Model, OpenAPIPetstore
mkAdditionalPropertiesStringOpenAPIPetstore.Model, OpenAPIPetstore
mkAnimalOpenAPIPetstore.Model, OpenAPIPetstore
mkApiResponseOpenAPIPetstore.Model, OpenAPIPetstore
mkArrayOfArrayOfNumberOnlyOpenAPIPetstore.Model, OpenAPIPetstore
mkArrayOfNumberOnlyOpenAPIPetstore.Model, OpenAPIPetstore
mkArrayTestOpenAPIPetstore.Model, OpenAPIPetstore
mkCapitalizationOpenAPIPetstore.Model, OpenAPIPetstore
mkCatOpenAPIPetstore.Model, OpenAPIPetstore
mkCatAllOfOpenAPIPetstore.Model, OpenAPIPetstore
mkCategoryOpenAPIPetstore.Model, OpenAPIPetstore
mkClassModelOpenAPIPetstore.Model, OpenAPIPetstore
mkClientOpenAPIPetstore.Model, OpenAPIPetstore
mkDogOpenAPIPetstore.Model, OpenAPIPetstore
mkDogAllOfOpenAPIPetstore.Model, OpenAPIPetstore
mkEnumArraysOpenAPIPetstore.Model, OpenAPIPetstore
mkEnumTestOpenAPIPetstore.Model, OpenAPIPetstore
mkFileOpenAPIPetstore.Model, OpenAPIPetstore
mkFileSchemaTestClassOpenAPIPetstore.Model, OpenAPIPetstore
mkFormatTestOpenAPIPetstore.Model, OpenAPIPetstore
mkHasOnlyReadOnlyOpenAPIPetstore.Model, OpenAPIPetstore
mkMapTestOpenAPIPetstore.Model, OpenAPIPetstore
mkMixedPropertiesAndAdditionalPropertiesClassOpenAPIPetstore.Model, OpenAPIPetstore
mkModel200ResponseOpenAPIPetstore.Model, OpenAPIPetstore
mkModelListOpenAPIPetstore.Model, OpenAPIPetstore
mkModelReturnOpenAPIPetstore.Model, OpenAPIPetstore
mkNameOpenAPIPetstore.Model, OpenAPIPetstore
mkNumberOnlyOpenAPIPetstore.Model, OpenAPIPetstore
mkOrderOpenAPIPetstore.Model, OpenAPIPetstore
mkOuterCompositeOpenAPIPetstore.Model, OpenAPIPetstore
mkPetOpenAPIPetstore.Model, OpenAPIPetstore
mkReadOnlyFirstOpenAPIPetstore.Model, OpenAPIPetstore
mkSpecialModelNameOpenAPIPetstore.Model, OpenAPIPetstore
mkTagOpenAPIPetstore.Model, OpenAPIPetstore
mkTypeHolderDefaultOpenAPIPetstore.Model, OpenAPIPetstore
mkTypeHolderExampleOpenAPIPetstore.Model, OpenAPIPetstore
mkUserOpenAPIPetstore.Model, OpenAPIPetstore
mkXmlItemOpenAPIPetstore.Model, OpenAPIPetstore
Model200Response 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
model200ResponseClassOpenAPIPetstore.Model, OpenAPIPetstore
model200ResponseClassLOpenAPIPetstore.ModelLens, OpenAPIPetstore
model200ResponseNameOpenAPIPetstore.Model, OpenAPIPetstore
model200ResponseNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
ModelList 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
modelList123listOpenAPIPetstore.Model, OpenAPIPetstore
modelList123listLOpenAPIPetstore.ModelLens, OpenAPIPetstore
ModelReturn 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
modelReturnReturnOpenAPIPetstore.Model, OpenAPIPetstore
modelReturnReturnLOpenAPIPetstore.ModelLens, OpenAPIPetstore
modifyInitRequestOpenAPIPetstore.Client, OpenAPIPetstore
modifyInitRequestMOpenAPIPetstore.Client, OpenAPIPetstore
MultiParamArrayOpenAPIPetstore.Core, OpenAPIPetstore
Name 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
name123numberOpenAPIPetstore.Model, OpenAPIPetstore
name123numberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Name2 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
nameNameOpenAPIPetstore.Model, OpenAPIPetstore
nameNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
namePropertyOpenAPIPetstore.Model, OpenAPIPetstore
namePropertyLOpenAPIPetstore.ModelLens, OpenAPIPetstore
nameSnakeCaseOpenAPIPetstore.Model, OpenAPIPetstore
nameSnakeCaseLOpenAPIPetstore.ModelLens, OpenAPIPetstore
newConfigOpenAPIPetstore.Core, OpenAPIPetstore
NoContent 
1 (Type/Class)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.MimeTypes, OpenAPIPetstore
Number 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
NumberOnly 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
numberOnlyJustNumberOpenAPIPetstore.Model, OpenAPIPetstore
numberOnlyJustNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Op123testSpecialTagsOpenAPIPetstore.API.AnotherFake, OpenAPIPetstore.API, OpenAPIPetstore
op123testSpecialTagsOpenAPIPetstore.API.AnotherFake, OpenAPIPetstore.API, OpenAPIPetstore
OpenAPIPetstoreConfig 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
OpenAPIPetstoreRequest 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
Order 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
orderCompleteOpenAPIPetstore.Model, OpenAPIPetstore
orderCompleteLOpenAPIPetstore.ModelLens, OpenAPIPetstore
OrderId 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
orderIdOpenAPIPetstore.Model, OpenAPIPetstore
orderIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
OrderIdText 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
orderPetIdOpenAPIPetstore.Model, OpenAPIPetstore
orderPetIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
orderQuantityOpenAPIPetstore.Model, OpenAPIPetstore
orderQuantityLOpenAPIPetstore.ModelLens, OpenAPIPetstore
orderShipDateOpenAPIPetstore.Model, OpenAPIPetstore
orderShipDateLOpenAPIPetstore.ModelLens, OpenAPIPetstore
orderStatusOpenAPIPetstore.Model, OpenAPIPetstore
orderStatusLOpenAPIPetstore.ModelLens, OpenAPIPetstore
OuterComposite 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
outerCompositeMyBooleanOpenAPIPetstore.Model, OpenAPIPetstore
outerCompositeMyBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
outerCompositeMyNumberOpenAPIPetstore.Model, OpenAPIPetstore
outerCompositeMyNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
outerCompositeMyStringOpenAPIPetstore.Model, OpenAPIPetstore
outerCompositeMyStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
OuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
OuterEnum'ApprovedOpenAPIPetstore.Model, OpenAPIPetstore
OuterEnum'DeliveredOpenAPIPetstore.Model, OpenAPIPetstore
OuterEnum'PlacedOpenAPIPetstore.Model, OpenAPIPetstore
Param 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Param2 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamBinary 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamBodyOpenAPIPetstore.Core, OpenAPIPetstore
ParamBodyBOpenAPIPetstore.Core, OpenAPIPetstore
ParamBodyBLOpenAPIPetstore.Core, OpenAPIPetstore
ParamBodyFormUrlEncodedOpenAPIPetstore.Core, OpenAPIPetstore
ParamBodyMultipartFormDataOpenAPIPetstore.Core, OpenAPIPetstore
ParamBodyNoneOpenAPIPetstore.Core, OpenAPIPetstore
ParamDate 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamDateTime 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamDouble 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamFloat 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamInteger 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
ParamMapMapStringText 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Params 
1 (Type/Class)OpenAPIPetstore.Core, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Core, OpenAPIPetstore
paramsBodyOpenAPIPetstore.Core, OpenAPIPetstore
paramsBodyLOpenAPIPetstore.Core, OpenAPIPetstore
paramsHeadersOpenAPIPetstore.Core, OpenAPIPetstore
paramsHeadersLOpenAPIPetstore.Core, OpenAPIPetstore
paramsQueryOpenAPIPetstore.Core, OpenAPIPetstore
paramsQueryLOpenAPIPetstore.Core, OpenAPIPetstore
ParamString 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Password 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
PatternWithoutDelimiter 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
Pet 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
petCategoryOpenAPIPetstore.Model, OpenAPIPetstore
petCategoryLOpenAPIPetstore.ModelLens, OpenAPIPetstore
PetId 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
petIdOpenAPIPetstore.Model, OpenAPIPetstore
petIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
petNameOpenAPIPetstore.Model, OpenAPIPetstore
petNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
petPhotoUrlsOpenAPIPetstore.Model, OpenAPIPetstore
petPhotoUrlsLOpenAPIPetstore.ModelLens, OpenAPIPetstore
petStatusOpenAPIPetstore.Model, OpenAPIPetstore
petStatusLOpenAPIPetstore.ModelLens, OpenAPIPetstore
petTagsOpenAPIPetstore.Model, OpenAPIPetstore
petTagsLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Pipe 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
PipeSeparatedOpenAPIPetstore.Core, OpenAPIPetstore
PlaceOrderOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
placeOrderOpenAPIPetstore.API.Store, OpenAPIPetstore.API, OpenAPIPetstore
ProducesOpenAPIPetstore.MimeTypes, OpenAPIPetstore
Query 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
rAuthTypesOpenAPIPetstore.Core, OpenAPIPetstore
rAuthTypesLOpenAPIPetstore.Core, OpenAPIPetstore
ReadOnlyFirst 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
readOnlyFirstBarOpenAPIPetstore.Model, OpenAPIPetstore
readOnlyFirstBarLOpenAPIPetstore.ModelLens, OpenAPIPetstore
readOnlyFirstBazOpenAPIPetstore.Model, OpenAPIPetstore
readOnlyFirstBazLOpenAPIPetstore.ModelLens, OpenAPIPetstore
removeHeaderOpenAPIPetstore.Core, OpenAPIPetstore
RequiredBooleanGroup 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
RequiredFile 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
RequiredInt64Group 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
RequiredStringGroup 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
rMethodOpenAPIPetstore.Core, OpenAPIPetstore
rMethodLOpenAPIPetstore.Core, OpenAPIPetstore
rParamsOpenAPIPetstore.Core, OpenAPIPetstore
rParamsLOpenAPIPetstore.Core, OpenAPIPetstore
runConfigLogOpenAPIPetstore.Client, OpenAPIPetstore
runConfigLogWithExceptionsOpenAPIPetstore.Client, OpenAPIPetstore
runDefaultLogExecWithContextOpenAPIPetstore.Logging, OpenAPIPetstore
runNullLogExecOpenAPIPetstore.Logging, OpenAPIPetstore
rUrlPathOpenAPIPetstore.Core, OpenAPIPetstore
rUrlPathLOpenAPIPetstore.Core, OpenAPIPetstore
setBodyParamOpenAPIPetstore.Core, OpenAPIPetstore
setHeaderOpenAPIPetstore.Core, OpenAPIPetstore
setQueryOpenAPIPetstore.Core, OpenAPIPetstore
SpaceSeparatedOpenAPIPetstore.Core, OpenAPIPetstore
SpecialModelName 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
specialModelNameSpecialPropertyNameOpenAPIPetstore.Model, OpenAPIPetstore
specialModelNameSpecialPropertyNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Status 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
StatusText 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
stderrLoggingContextOpenAPIPetstore.Logging, OpenAPIPetstore
stderrLoggingExecOpenAPIPetstore.Logging, OpenAPIPetstore
stdoutLoggingContextOpenAPIPetstore.Logging, OpenAPIPetstore
stdoutLoggingExecOpenAPIPetstore.Logging, OpenAPIPetstore
StringGroup 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
TabSeparatedOpenAPIPetstore.Core, OpenAPIPetstore
Tag 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
tagIdOpenAPIPetstore.Model, OpenAPIPetstore
tagIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
tagNameOpenAPIPetstore.Model, OpenAPIPetstore
tagNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Tags 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
TestBodyWithFileSchemaOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testBodyWithFileSchemaOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestBodyWithQueryParamsOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testBodyWithQueryParamsOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestClassnameOpenAPIPetstore.API.FakeClassnameTags123, OpenAPIPetstore.API, OpenAPIPetstore
testClassnameOpenAPIPetstore.API.FakeClassnameTags123, OpenAPIPetstore.API, OpenAPIPetstore
TestClientModelOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testClientModelOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestEndpointParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testEndpointParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestEnumParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testEnumParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestGroupParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testGroupParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestInlineAdditionalPropertiesOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testInlineAdditionalPropertiesOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestJsonFormDataOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testJsonFormDataOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestQueryParameterCollectionFormatOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testQueryParameterCollectionFormatOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
toE'ArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumStringOpenAPIPetstore.Model, OpenAPIPetstore
toE'InnerOpenAPIPetstore.Model, OpenAPIPetstore
toE'JustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
toE'StatusOpenAPIPetstore.Model, OpenAPIPetstore
toE'Status2OpenAPIPetstore.Model, OpenAPIPetstore
toEnumClassOpenAPIPetstore.Model, OpenAPIPetstore
toFormOpenAPIPetstore.Core, OpenAPIPetstore
toFormCollOpenAPIPetstore.Core, OpenAPIPetstore
toHeaderOpenAPIPetstore.Core, OpenAPIPetstore
toHeaderCollOpenAPIPetstore.Core, OpenAPIPetstore
toOuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
toPathOpenAPIPetstore.Core, OpenAPIPetstore
toQueryOpenAPIPetstore.Core, OpenAPIPetstore
toQueryCollOpenAPIPetstore.Core, OpenAPIPetstore
TypeHolderDefault 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultArrayItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultArrayItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultBoolItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultBoolItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultIntegerItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultIntegerItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultNumberItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultNumberItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultStringItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultStringItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
TypeHolderExample 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleArrayItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleArrayItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleBoolItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleBoolItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleFloatItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleFloatItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleIntegerItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleIntegerItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleNumberItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleNumberItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleStringItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleStringItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
unAcceptOpenAPIPetstore.MimeTypes, OpenAPIPetstore
unAdditionalMetadataOpenAPIPetstore.Model, OpenAPIPetstore
unApiKeyOpenAPIPetstore.Model, OpenAPIPetstore
unBinaryOpenAPIPetstore.Core, OpenAPIPetstore
unBodyOpenAPIPetstore.Model, OpenAPIPetstore
unBodyBoolOpenAPIPetstore.Model, OpenAPIPetstore
unBodyDoubleOpenAPIPetstore.Model, OpenAPIPetstore
unBodyTextOpenAPIPetstore.Model, OpenAPIPetstore
unBooleanGroupOpenAPIPetstore.Model, OpenAPIPetstore
unByteOpenAPIPetstore.Model, OpenAPIPetstore
unByteArrayOpenAPIPetstore.Core, OpenAPIPetstore
unCallbackOpenAPIPetstore.Model, OpenAPIPetstore
unContentTypeOpenAPIPetstore.MimeTypes, OpenAPIPetstore
unContextOpenAPIPetstore.Model, OpenAPIPetstore
unDateOpenAPIPetstore.Core, OpenAPIPetstore
unDateTimeOpenAPIPetstore.Core, OpenAPIPetstore
unEnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
unEnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
unEnumHeaderStringOpenAPIPetstore.Model, OpenAPIPetstore
unEnumHeaderStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
unEnumQueryDoubleOpenAPIPetstore.Model, OpenAPIPetstore
unEnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
unEnumQueryStringOpenAPIPetstore.Model, OpenAPIPetstore
unEnumQueryStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
unFile2OpenAPIPetstore.Model, OpenAPIPetstore
unHttpOpenAPIPetstore.Model, OpenAPIPetstore
unInitRequestOpenAPIPetstore.Client, OpenAPIPetstore
unInt32OpenAPIPetstore.Model, OpenAPIPetstore
unInt64OpenAPIPetstore.Model, OpenAPIPetstore
unInt64GroupOpenAPIPetstore.Model, OpenAPIPetstore
unIoutilOpenAPIPetstore.Model, OpenAPIPetstore
unName2OpenAPIPetstore.Model, OpenAPIPetstore
unNumberOpenAPIPetstore.Model, OpenAPIPetstore
unOrderIdOpenAPIPetstore.Model, OpenAPIPetstore
unOrderIdTextOpenAPIPetstore.Model, OpenAPIPetstore
unParamOpenAPIPetstore.Model, OpenAPIPetstore
unParam2OpenAPIPetstore.Model, OpenAPIPetstore
unParamBinaryOpenAPIPetstore.Model, OpenAPIPetstore
unParamDateOpenAPIPetstore.Model, OpenAPIPetstore
unParamDateTimeOpenAPIPetstore.Model, OpenAPIPetstore
unParamDoubleOpenAPIPetstore.Model, OpenAPIPetstore
unParamFloatOpenAPIPetstore.Model, OpenAPIPetstore
unParamIntegerOpenAPIPetstore.Model, OpenAPIPetstore
unParamMapMapStringTextOpenAPIPetstore.Model, OpenAPIPetstore
unParamStringOpenAPIPetstore.Model, OpenAPIPetstore
unPasswordOpenAPIPetstore.Model, OpenAPIPetstore
unPatternWithoutDelimiterOpenAPIPetstore.Model, OpenAPIPetstore
unPetIdOpenAPIPetstore.Model, OpenAPIPetstore
unPipeOpenAPIPetstore.Model, OpenAPIPetstore
unQueryOpenAPIPetstore.Model, OpenAPIPetstore
unRequiredBooleanGroupOpenAPIPetstore.Model, OpenAPIPetstore
unRequiredFileOpenAPIPetstore.Model, OpenAPIPetstore
unRequiredInt64GroupOpenAPIPetstore.Model, OpenAPIPetstore
unRequiredStringGroupOpenAPIPetstore.Model, OpenAPIPetstore
unStatusOpenAPIPetstore.Model, OpenAPIPetstore
unStatusTextOpenAPIPetstore.Model, OpenAPIPetstore
unStringGroupOpenAPIPetstore.Model, OpenAPIPetstore
unTagsOpenAPIPetstore.Model, OpenAPIPetstore
unUrlOpenAPIPetstore.Model, OpenAPIPetstore
unUsernameOpenAPIPetstore.Model, OpenAPIPetstore
UpdatePetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
updatePetOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
UpdatePetWithFormOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
updatePetWithFormOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
UpdateUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
updateUserOpenAPIPetstore.API.User, OpenAPIPetstore.API, OpenAPIPetstore
UploadFileOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
uploadFileOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
UploadFileWithRequiredFileOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
uploadFileWithRequiredFileOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
Url 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
User 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
userEmailOpenAPIPetstore.Model, OpenAPIPetstore
userEmailLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userFirstNameOpenAPIPetstore.Model, OpenAPIPetstore
userFirstNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userIdOpenAPIPetstore.Model, OpenAPIPetstore
userIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userLastNameOpenAPIPetstore.Model, OpenAPIPetstore
userLastNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Username 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
userPasswordOpenAPIPetstore.Model, OpenAPIPetstore
userPasswordLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userPhoneOpenAPIPetstore.Model, OpenAPIPetstore
userPhoneLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userUsernameOpenAPIPetstore.Model, OpenAPIPetstore
userUsernameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
userUserStatusOpenAPIPetstore.Model, OpenAPIPetstore
userUserStatusLOpenAPIPetstore.ModelLens, OpenAPIPetstore
withNoLoggingOpenAPIPetstore.Core, OpenAPIPetstore
withStderrLoggingOpenAPIPetstore.Core, OpenAPIPetstore
withStdoutLoggingOpenAPIPetstore.Core, OpenAPIPetstore
XmlItem 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
xmlItemAttributeBooleanOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemAttributeBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemAttributeIntegerOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemAttributeIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemAttributeNumberOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemAttributeNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemAttributeStringOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemAttributeStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameBooleanOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameIntegerOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameNumberOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceBooleanOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceIntegerOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceNumberOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceStringOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNamespaceWrappedArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNamespaceWrappedArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameStringOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemNameWrappedArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemNameWrappedArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixBooleanOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixIntegerOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsBooleanOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsBooleanLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsIntegerOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsNumberOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsStringOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNsWrappedArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNsWrappedArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixNumberOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixStringOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemPrefixWrappedArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemPrefixWrappedArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
xmlItemWrappedArrayOpenAPIPetstore.Model, OpenAPIPetstore
xmlItemWrappedArrayLOpenAPIPetstore.ModelLens, OpenAPIPetstore
_addMultiFormPartOpenAPIPetstore.Core, OpenAPIPetstore
_applyAuthMethodsOpenAPIPetstore.Core, OpenAPIPetstore
_emptyToNothingOpenAPIPetstore.Core, OpenAPIPetstore
_hasAuthTypeOpenAPIPetstore.Core, OpenAPIPetstore
_logOpenAPIPetstore.Logging, OpenAPIPetstore
_memptyToNothingOpenAPIPetstore.Core, OpenAPIPetstore
_mkParamsOpenAPIPetstore.Core, OpenAPIPetstore
_mkRequestOpenAPIPetstore.Core, OpenAPIPetstore
_omitNullsOpenAPIPetstore.Core, OpenAPIPetstore
_parseISO8601OpenAPIPetstore.Core, OpenAPIPetstore
_readBinaryBase64OpenAPIPetstore.Core, OpenAPIPetstore
_readByteArrayOpenAPIPetstore.Core, OpenAPIPetstore
_readDateOpenAPIPetstore.Core, OpenAPIPetstore
_readDateTimeOpenAPIPetstore.Core, OpenAPIPetstore
_setAcceptHeaderOpenAPIPetstore.Core, OpenAPIPetstore
_setBodyBSOpenAPIPetstore.Core, OpenAPIPetstore
_setBodyLBSOpenAPIPetstore.Core, OpenAPIPetstore
_setContentTypeHeaderOpenAPIPetstore.Core, OpenAPIPetstore
_showBinaryBase64OpenAPIPetstore.Core, OpenAPIPetstore
_showByteArrayOpenAPIPetstore.Core, OpenAPIPetstore
_showDateOpenAPIPetstore.Core, OpenAPIPetstore
_showDateTimeOpenAPIPetstore.Core, OpenAPIPetstore
_toCollOpenAPIPetstore.Core, OpenAPIPetstore
_toCollAOpenAPIPetstore.Core, OpenAPIPetstore
_toCollA'OpenAPIPetstore.Core, OpenAPIPetstore
_toFormItemOpenAPIPetstore.Core, OpenAPIPetstore
_toInitRequestOpenAPIPetstore.Client, OpenAPIPetstore
\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/doc-index-F.html b/samples/client/petstore/haskell-http-client/docs/doc-index-F.html index 74e3f8971e..cce7a2f193 100644 --- a/samples/client/petstore/haskell-http-client/docs/doc-index-F.html +++ b/samples/client/petstore/haskell-http-client/docs/doc-index-F.html @@ -1 +1 @@ -openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client (Index - F)

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Index - F

FakeOuterBooleanSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterBooleanSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterCompositeSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterCompositeSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterNumberSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterNumberSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterStringSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterStringSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
File 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
File2 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
FileSchemaTestClass 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFileOpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFileLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fileSchemaTestClassFilesOpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFilesLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fileSourceUriOpenAPIPetstore.Model, OpenAPIPetstore
fileSourceUriLOpenAPIPetstore.ModelLens, OpenAPIPetstore
FindPetsByStatusOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
findPetsByStatusOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
FindPetsByTagsOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
findPetsByTagsOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
FormatTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
formatTestBinaryOpenAPIPetstore.Model, OpenAPIPetstore
formatTestBinaryLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestByteOpenAPIPetstore.Model, OpenAPIPetstore
formatTestByteLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDateOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDateLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDateTimeOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDateTimeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDoubleOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDoubleLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestFloatOpenAPIPetstore.Model, OpenAPIPetstore
formatTestFloatLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestInt32OpenAPIPetstore.Model, OpenAPIPetstore
formatTestInt32LOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestInt64OpenAPIPetstore.Model, OpenAPIPetstore
formatTestInt64LOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestIntegerOpenAPIPetstore.Model, OpenAPIPetstore
formatTestIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestNumberOpenAPIPetstore.Model, OpenAPIPetstore
formatTestNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestPasswordOpenAPIPetstore.Model, OpenAPIPetstore
formatTestPasswordLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestStringOpenAPIPetstore.Model, OpenAPIPetstore
formatTestStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestUuidOpenAPIPetstore.Model, OpenAPIPetstore
formatTestUuidLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fromE'ArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumStringOpenAPIPetstore.Model, OpenAPIPetstore
fromE'InnerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'JustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
fromE'StatusOpenAPIPetstore.Model, OpenAPIPetstore
fromE'Status2OpenAPIPetstore.Model, OpenAPIPetstore
fromEnumClassOpenAPIPetstore.Model, OpenAPIPetstore
fromOuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
\ No newline at end of file +openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client (Index - F)

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Index - F

FakeOuterBooleanSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterBooleanSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterCompositeSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterCompositeSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterNumberSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterNumberSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
FakeOuterStringSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
fakeOuterStringSerializeOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
File 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
File2 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
FileSchemaTestClass 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFileOpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFileLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fileSchemaTestClassFilesOpenAPIPetstore.Model, OpenAPIPetstore
fileSchemaTestClassFilesLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fileSourceUriOpenAPIPetstore.Model, OpenAPIPetstore
fileSourceUriLOpenAPIPetstore.ModelLens, OpenAPIPetstore
FindPetsByStatusOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
findPetsByStatusOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
FindPetsByTagsOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
findPetsByTagsOpenAPIPetstore.API.Pet, OpenAPIPetstore.API, OpenAPIPetstore
FormatTest 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
formatTestBigDecimalOpenAPIPetstore.Model, OpenAPIPetstore
formatTestBigDecimalLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestBinaryOpenAPIPetstore.Model, OpenAPIPetstore
formatTestBinaryLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestByteOpenAPIPetstore.Model, OpenAPIPetstore
formatTestByteLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDateOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDateLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDateTimeOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDateTimeLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestDoubleOpenAPIPetstore.Model, OpenAPIPetstore
formatTestDoubleLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestFloatOpenAPIPetstore.Model, OpenAPIPetstore
formatTestFloatLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestInt32OpenAPIPetstore.Model, OpenAPIPetstore
formatTestInt32LOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestInt64OpenAPIPetstore.Model, OpenAPIPetstore
formatTestInt64LOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestIntegerOpenAPIPetstore.Model, OpenAPIPetstore
formatTestIntegerLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestNumberOpenAPIPetstore.Model, OpenAPIPetstore
formatTestNumberLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestPasswordOpenAPIPetstore.Model, OpenAPIPetstore
formatTestPasswordLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestStringOpenAPIPetstore.Model, OpenAPIPetstore
formatTestStringLOpenAPIPetstore.ModelLens, OpenAPIPetstore
formatTestUuidOpenAPIPetstore.Model, OpenAPIPetstore
formatTestUuidLOpenAPIPetstore.ModelLens, OpenAPIPetstore
fromE'ArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'EnumStringOpenAPIPetstore.Model, OpenAPIPetstore
fromE'InnerOpenAPIPetstore.Model, OpenAPIPetstore
fromE'JustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
fromE'StatusOpenAPIPetstore.Model, OpenAPIPetstore
fromE'Status2OpenAPIPetstore.Model, OpenAPIPetstore
fromEnumClassOpenAPIPetstore.Model, OpenAPIPetstore
fromOuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/doc-index-T.html b/samples/client/petstore/haskell-http-client/docs/doc-index-T.html index c7f75eb8c8..00654333bb 100644 --- a/samples/client/petstore/haskell-http-client/docs/doc-index-T.html +++ b/samples/client/petstore/haskell-http-client/docs/doc-index-T.html @@ -1 +1 @@ -openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client (Index - T)

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Index - T

TabSeparatedOpenAPIPetstore.Core, OpenAPIPetstore
Tag 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
tagIdOpenAPIPetstore.Model, OpenAPIPetstore
tagIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
tagNameOpenAPIPetstore.Model, OpenAPIPetstore
tagNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Tags 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
TestBodyWithFileSchemaOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testBodyWithFileSchemaOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestBodyWithQueryParamsOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testBodyWithQueryParamsOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestClassnameOpenAPIPetstore.API.FakeClassnameTags123, OpenAPIPetstore.API, OpenAPIPetstore
testClassnameOpenAPIPetstore.API.FakeClassnameTags123, OpenAPIPetstore.API, OpenAPIPetstore
TestClientModelOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testClientModelOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestEndpointParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testEndpointParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestEnumParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testEnumParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestGroupParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testGroupParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestInlineAdditionalPropertiesOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testInlineAdditionalPropertiesOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestJsonFormDataOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testJsonFormDataOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestQueryParameterCollectionFormatOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testQueryParameterCollectionFormatOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
toE'ArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumStringOpenAPIPetstore.Model, OpenAPIPetstore
toE'InnerOpenAPIPetstore.Model, OpenAPIPetstore
toE'JustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
toE'StatusOpenAPIPetstore.Model, OpenAPIPetstore
toE'Status2OpenAPIPetstore.Model, OpenAPIPetstore
toEnumClassOpenAPIPetstore.Model, OpenAPIPetstore
toFormOpenAPIPetstore.Core, OpenAPIPetstore
toFormCollOpenAPIPetstore.Core, OpenAPIPetstore
toHeaderOpenAPIPetstore.Core, OpenAPIPetstore
toHeaderCollOpenAPIPetstore.Core, OpenAPIPetstore
toOuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
toPathOpenAPIPetstore.Core, OpenAPIPetstore
toQueryOpenAPIPetstore.Core, OpenAPIPetstore
toQueryCollOpenAPIPetstore.Core, OpenAPIPetstore
TypeHolderDefault 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultArrayItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultArrayItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultBoolItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultBoolItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultIntegerItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultIntegerItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultNumberItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultNumberItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultStringItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultStringItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
TypeHolderExample 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleArrayItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleArrayItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleBoolItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleBoolItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleIntegerItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleIntegerItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleNumberItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleNumberItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleStringItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleStringItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
\ No newline at end of file +openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client (Index - T)

openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Index - T

TabSeparatedOpenAPIPetstore.Core, OpenAPIPetstore
Tag 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
tagIdOpenAPIPetstore.Model, OpenAPIPetstore
tagIdLOpenAPIPetstore.ModelLens, OpenAPIPetstore
tagNameOpenAPIPetstore.Model, OpenAPIPetstore
tagNameLOpenAPIPetstore.ModelLens, OpenAPIPetstore
Tags 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
TestBodyWithFileSchemaOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testBodyWithFileSchemaOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestBodyWithQueryParamsOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testBodyWithQueryParamsOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestClassnameOpenAPIPetstore.API.FakeClassnameTags123, OpenAPIPetstore.API, OpenAPIPetstore
testClassnameOpenAPIPetstore.API.FakeClassnameTags123, OpenAPIPetstore.API, OpenAPIPetstore
TestClientModelOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testClientModelOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestEndpointParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testEndpointParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestEnumParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testEnumParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestGroupParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testGroupParametersOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestInlineAdditionalPropertiesOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testInlineAdditionalPropertiesOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestJsonFormDataOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testJsonFormDataOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
TestQueryParameterCollectionFormatOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
testQueryParameterCollectionFormatOpenAPIPetstore.API.Fake, OpenAPIPetstore.API, OpenAPIPetstore
toE'ArrayEnumOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumFormStringOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumFormStringArrayOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumIntegerOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumNumberOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumQueryIntegerOpenAPIPetstore.Model, OpenAPIPetstore
toE'EnumStringOpenAPIPetstore.Model, OpenAPIPetstore
toE'InnerOpenAPIPetstore.Model, OpenAPIPetstore
toE'JustSymbolOpenAPIPetstore.Model, OpenAPIPetstore
toE'StatusOpenAPIPetstore.Model, OpenAPIPetstore
toE'Status2OpenAPIPetstore.Model, OpenAPIPetstore
toEnumClassOpenAPIPetstore.Model, OpenAPIPetstore
toFormOpenAPIPetstore.Core, OpenAPIPetstore
toFormCollOpenAPIPetstore.Core, OpenAPIPetstore
toHeaderOpenAPIPetstore.Core, OpenAPIPetstore
toHeaderCollOpenAPIPetstore.Core, OpenAPIPetstore
toOuterEnumOpenAPIPetstore.Model, OpenAPIPetstore
toPathOpenAPIPetstore.Core, OpenAPIPetstore
toQueryOpenAPIPetstore.Core, OpenAPIPetstore
toQueryCollOpenAPIPetstore.Core, OpenAPIPetstore
TypeHolderDefault 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultArrayItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultArrayItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultBoolItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultBoolItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultIntegerItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultIntegerItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultNumberItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultNumberItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderDefaultStringItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderDefaultStringItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
TypeHolderExample 
1 (Type/Class)OpenAPIPetstore.Model, OpenAPIPetstore
2 (Data Constructor)OpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleArrayItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleArrayItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleBoolItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleBoolItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleFloatItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleFloatItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleIntegerItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleIntegerItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleNumberItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleNumberItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
typeHolderExampleStringItemOpenAPIPetstore.Model, OpenAPIPetstore
typeHolderExampleStringItemLOpenAPIPetstore.ModelLens, OpenAPIPetstore
\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/doc-index.json b/samples/client/petstore/haskell-http-client/docs/doc-index.json index 5c9d017a51..06be00cf8f 100644 --- a/samples/client/petstore/haskell-http-client/docs/doc-index.json +++ b/samples/client/petstore/haskell-http-client/docs/doc-index.json @@ -1 +1 @@ -[{"display_html":"type LogExecWithContext = forall m. MonadIO m => LogContext -> LogExec m","name":"LogExecWithContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#t:LogExecWithContext"},{"display_html":"type LogExec m = forall a. KatipT m a -> m a","name":"LogExec","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#t:LogExec"},{"display_html":"type LogContext = LogEnv","name":"LogContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#t:LogContext"},{"display_html":"type LogLevel = Severity","name":"LogLevel","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#t:LogLevel"},{"display_html":"initLogContext :: IO LogContext","name":"initLogContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:initLogContext"},{"display_html":"runDefaultLogExecWithContext :: LogExecWithContext","name":"runDefaultLogExecWithContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:runDefaultLogExecWithContext"},{"display_html":"stdoutLoggingExec :: LogExecWithContext","name":"stdoutLoggingExec","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:stdoutLoggingExec"},{"display_html":"stdoutLoggingContext :: LogContext -> IO LogContext","name":"stdoutLoggingContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:stdoutLoggingContext"},{"display_html":"stderrLoggingExec :: LogExecWithContext","name":"stderrLoggingExec","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:stderrLoggingExec"},{"display_html":"stderrLoggingContext :: LogContext -> IO LogContext","name":"stderrLoggingContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:stderrLoggingContext"},{"display_html":"runNullLogExec :: LogExecWithContext","name":"runNullLogExec","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:runNullLogExec"},{"display_html":"_log :: (Applicative m, Katip m) => Text -> LogLevel -> Text -> m ()","name":"_log","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:_log"},{"display_html":"logExceptions :: (Katip m, MonadCatch m, Applicative m) => Text -> m a -> m a","name":"logExceptions","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:logExceptions"},{"display_html":"levelInfo :: LogLevel","name":"levelInfo","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:levelInfo"},{"display_html":"levelError :: LogLevel","name":"levelError","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:levelError"},{"display_html":"levelDebug :: LogLevel","name":"levelDebug","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:levelDebug"},{"display_html":"data ContentType a = MimeType a => ContentType {}","name":"ContentType ContentType unContentType","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:ContentType"},{"display_html":"data Accept a = MimeType a => Accept {}","name":"Accept Accept unAccept","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:Accept"},{"display_html":"class MimeType mtype => Consumes req mtype","name":"Consumes","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:Consumes"},{"display_html":"class MimeType mtype => Produces req mtype","name":"Produces","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:Produces"},{"display_html":"data MimeJSON = MimeJSON","name":"MimeJSON MimeJSON","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeJSON"},{"display_html":"data MimeXML = MimeXML","name":"MimeXML MimeXML","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeXML"},{"display_html":"data MimePlainText = MimePlainText","name":"MimePlainText MimePlainText","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimePlainText"},{"display_html":"data MimeFormUrlEncoded = MimeFormUrlEncoded","name":"MimeFormUrlEncoded MimeFormUrlEncoded","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeFormUrlEncoded"},{"display_html":"data MimeMultipartFormData = MimeMultipartFormData","name":"MimeMultipartFormData MimeMultipartFormData","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeMultipartFormData"},{"display_html":"data MimeOctetStream = MimeOctetStream","name":"MimeOctetStream MimeOctetStream","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeOctetStream"},{"display_html":"data MimeNoContent = MimeNoContent","name":"MimeNoContent MimeNoContent","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeNoContent"},{"display_html":"data MimeAny = MimeAny","name":"MimeAny MimeAny","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeAny"},{"display_html":"data NoContent = NoContent","name":"NoContent NoContent","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:NoContent"},{"display_html":"class Typeable mtype => MimeType mtype where","name":"MimeType mimeTypes' mimeType' mimeTypes mimeType","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeType"},{"display_html":"class MimeType mtype => MimeRender mtype x where","name":"MimeRender mimeRender' mimeRender","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeRender"},{"display_html":"mimeRenderDefaultMultipartFormData :: ToHttpApiData a => a -> ByteString","name":"mimeRenderDefaultMultipartFormData","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#v:mimeRenderDefaultMultipartFormData"},{"display_html":"class MimeType mtype => MimeUnrender mtype o where","name":"MimeUnrender mimeUnrender' mimeUnrender","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeUnrender"},{"display_html":"data MimeXmlCharsetutf16 = MimeXmlCharsetutf16","name":"MimeXmlCharsetutf16 MimeXmlCharsetutf16","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeXmlCharsetutf16"},{"display_html":"data MimeXmlCharsetutf8 = MimeXmlCharsetutf8","name":"MimeXmlCharsetutf8 MimeXmlCharsetutf8","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeXmlCharsetutf8"},{"display_html":"data MimeTextXml = MimeTextXml","name":"MimeTextXml MimeTextXml","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeTextXml"},{"display_html":"data MimeTextXmlCharsetutf16 = MimeTextXmlCharsetutf16","name":"MimeTextXmlCharsetutf16 MimeTextXmlCharsetutf16","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeTextXmlCharsetutf16"},{"display_html":"data MimeTextXmlCharsetutf8 = MimeTextXmlCharsetutf8","name":"MimeTextXmlCharsetutf8 MimeTextXmlCharsetutf8","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeTextXmlCharsetutf8"},{"display_html":"data OpenAPIPetstoreConfig = OpenAPIPetstoreConfig {}","name":"OpenAPIPetstoreConfig OpenAPIPetstoreConfig configValidateAuthMethods configAuthMethods configLogContext configLogExecWithContext configUserAgent configHost","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:OpenAPIPetstoreConfig"},{"display_html":"newConfig :: IO OpenAPIPetstoreConfig","name":"newConfig","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:newConfig"},{"display_html":"addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig","name":"addAuthMethod","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:addAuthMethod"},{"display_html":"withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig","name":"withStdoutLogging","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:withStdoutLogging"},{"display_html":"withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig","name":"withStderrLogging","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:withStderrLogging"},{"display_html":"withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig","name":"withNoLogging","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:withNoLogging"},{"display_html":"data OpenAPIPetstoreRequest req contentType res accept = OpenAPIPetstoreRequest {}","name":"OpenAPIPetstoreRequest OpenAPIPetstoreRequest rAuthTypes rParams rUrlPath rMethod","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:OpenAPIPetstoreRequest"},{"display_html":"rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Method","name":"rMethodL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:rMethodL"},{"display_html":"rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [ByteString]","name":"rUrlPathL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:rUrlPathL"},{"display_html":"rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params","name":"rParamsL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:rParamsL"},{"display_html":"rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [TypeRep]","name":"rAuthTypesL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:rAuthTypesL"},{"display_html":"class HasBodyParam req param where","name":"HasBodyParam setBodyParam","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:HasBodyParam"},{"display_html":"class HasOptionalParam req param where","name":"HasOptionalParam -&- applyOptionalParam","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:HasOptionalParam"},{"display_html":"data Params = Params {}","name":"Params Params paramsBody paramsHeaders paramsQuery","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:Params"},{"display_html":"paramsQueryL :: Lens_' Params Query","name":"paramsQueryL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:paramsQueryL"},{"display_html":"paramsHeadersL :: Lens_' Params RequestHeaders","name":"paramsHeadersL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:paramsHeadersL"},{"display_html":"paramsBodyL :: Lens_' Params ParamBody","name":"paramsBodyL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:paramsBodyL"},{"display_html":"data ParamBody","name":"ParamBody ParamBodyMultipartFormData ParamBodyFormUrlEncoded ParamBodyBL ParamBodyB ParamBodyNone","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:ParamBody"},{"display_html":"_mkRequest :: Method -> [ByteString] -> OpenAPIPetstoreRequest req contentType res accept","name":"_mkRequest","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_mkRequest"},{"display_html":"_mkParams :: Params","name":"_mkParams","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_mkParams"},{"display_html":"setHeader :: OpenAPIPetstoreRequest req contentType res accept -> [Header] -> OpenAPIPetstoreRequest req contentType res accept","name":"setHeader","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:setHeader"},{"display_html":"removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [HeaderName] -> OpenAPIPetstoreRequest req contentType res accept","name":"removeHeader","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:removeHeader"},{"display_html":"_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept","name":"_setContentTypeHeader","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_setContentTypeHeader"},{"display_html":"_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept","name":"_setAcceptHeader","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_setAcceptHeader"},{"display_html":"setQuery :: OpenAPIPetstoreRequest req contentType res accept -> [QueryItem] -> OpenAPIPetstoreRequest req contentType res accept","name":"setQuery","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:setQuery"},{"display_html":"addForm :: OpenAPIPetstoreRequest req contentType res accept -> Form -> OpenAPIPetstoreRequest req contentType res accept","name":"addForm","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:addForm"},{"display_html":"_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> Part -> OpenAPIPetstoreRequest req contentType res accept","name":"_addMultiFormPart","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_addMultiFormPart"},{"display_html":"_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept","name":"_setBodyBS","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_setBodyBS"},{"display_html":"_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept","name":"_setBodyLBS","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_setBodyLBS"},{"display_html":"_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept","name":"_hasAuthType","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_hasAuthType"},{"display_html":"toPath :: ToHttpApiData a => a -> ByteString","name":"toPath","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toPath"},{"display_html":"toHeader :: ToHttpApiData a => (HeaderName, a) -> [Header]","name":"toHeader","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toHeader"},{"display_html":"toForm :: ToHttpApiData v => (ByteString, v) -> Form","name":"toForm","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toForm"},{"display_html":"toQuery :: ToHttpApiData a => (ByteString, Maybe a) -> [QueryItem]","name":"toQuery","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toQuery"},{"display_html":"data CollectionFormat","name":"CollectionFormat MultiParamArray PipeSeparated TabSeparated SpaceSeparated CommaSeparated","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:CollectionFormat"},{"display_html":"toHeaderColl :: ToHttpApiData a => CollectionFormat -> (HeaderName, [a]) -> [Header]","name":"toHeaderColl","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toHeaderColl"},{"display_html":"toFormColl :: ToHttpApiData v => CollectionFormat -> (ByteString, [v]) -> Form","name":"toFormColl","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toFormColl"},{"display_html":"toQueryColl :: ToHttpApiData a => CollectionFormat -> (ByteString, Maybe [a]) -> Query","name":"toQueryColl","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toQueryColl"},{"display_html":"_toColl :: Traversable f => CollectionFormat -> (f a -> [(b, ByteString)]) -> f [a] -> [(b, ByteString)]","name":"_toColl","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_toColl"},{"display_html":"_toCollA :: (Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t ByteString)]) -> f (t [a]) -> [(b, t ByteString)]","name":"_toCollA","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_toCollA"},{"display_html":"_toCollA' :: (Monoid c, Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)]","name":"_toCollA'","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_toCollA-39-"},{"display_html":"class Typeable a => AuthMethod a where","name":"AuthMethod applyAuthMethod","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:AuthMethod"},{"display_html":"data AnyAuthMethod = AuthMethod a => AnyAuthMethod a","name":"AnyAuthMethod AnyAuthMethod","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:AnyAuthMethod"},{"display_html":"data AuthMethodException = AuthMethodException String","name":"AuthMethodException AuthMethodException","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:AuthMethodException"},{"display_html":"_applyAuthMethods :: OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreConfig -> IO (OpenAPIPetstoreRequest req contentType res accept)","name":"_applyAuthMethods","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_applyAuthMethods"},{"display_html":"_omitNulls :: [(Text, Value)] -> Value","name":"_omitNulls","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_omitNulls"},{"display_html":"_toFormItem :: (ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text])","name":"_toFormItem","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_toFormItem"},{"display_html":"_emptyToNothing :: Maybe String -> Maybe String","name":"_emptyToNothing","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_emptyToNothing"},{"display_html":"_memptyToNothing :: (Monoid a, Eq a) => Maybe a -> Maybe a","name":"_memptyToNothing","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_memptyToNothing"},{"display_html":"newtype DateTime = DateTime {}","name":"DateTime DateTime unDateTime","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:DateTime"},{"display_html":"_readDateTime :: (ParseTime t, Monad m, Alternative m) => String -> m t","name":"_readDateTime","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_readDateTime"},{"display_html":"_showDateTime :: (t ~ UTCTime, FormatTime t) => t -> String","name":"_showDateTime","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_showDateTime"},{"display_html":"_parseISO8601 :: (ParseTime t, Monad m, Alternative m) => String -> m t","name":"_parseISO8601","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_parseISO8601"},{"display_html":"newtype Date = Date {}","name":"Date Date unDate","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:Date"},{"display_html":"_readDate :: (ParseTime t, Monad m) => String -> m t","name":"_readDate","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_readDate"},{"display_html":"_showDate :: FormatTime t => t -> String","name":"_showDate","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_showDate"},{"display_html":"newtype ByteArray = ByteArray {}","name":"ByteArray ByteArray unByteArray","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:ByteArray"},{"display_html":"_readByteArray :: Monad m => Text -> m ByteArray","name":"_readByteArray","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_readByteArray"},{"display_html":"_showByteArray :: ByteArray -> Text","name":"_showByteArray","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_showByteArray"},{"display_html":"newtype Binary = Binary {}","name":"Binary Binary unBinary","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:Binary"},{"display_html":"_readBinaryBase64 :: Monad m => Text -> m Binary","name":"_readBinaryBase64","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_readBinaryBase64"},{"display_html":"_showBinaryBase64 :: Binary -> Text","name":"_showBinaryBase64","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_showBinaryBase64"},{"display_html":"type Lens_' s a = Lens_ s s a a","name":"Lens_'","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:Lens_-39-"},{"display_html":"type Lens_ s t a b = forall (f :: * -> *). Functor f => (a -> f b) -> s -> f t","name":"Lens_","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:Lens_"},{"display_html":"dispatchLbs :: (Produces req accept, MimeType contentType) => Manager -> OpenAPIPetstoreConfig -> OpenAPIPetstoreRequest req contentType res accept -> IO (Response ByteString)","name":"dispatchLbs","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:dispatchLbs"},{"display_html":"data MimeResult res = MimeResult {}","name":"MimeResult MimeResult mimeResultResponse mimeResult","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#t:MimeResult"},{"display_html":"data MimeError = MimeError {}","name":"MimeError MimeError mimeErrorResponse mimeError","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#t:MimeError"},{"display_html":"dispatchMime :: forall req contentType res accept. (Produces req accept, MimeUnrender accept res, MimeType contentType) => Manager -> OpenAPIPetstoreConfig -> OpenAPIPetstoreRequest req contentType res accept -> IO (MimeResult res)","name":"dispatchMime","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:dispatchMime"},{"display_html":"dispatchMime' :: (Produces req accept, MimeUnrender accept res, MimeType contentType) => Manager -> OpenAPIPetstoreConfig -> OpenAPIPetstoreRequest req contentType res accept -> IO (Either MimeError res)","name":"dispatchMime'","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:dispatchMime-39-"},{"display_html":"dispatchLbsUnsafe :: (MimeType accept, MimeType contentType) => Manager -> OpenAPIPetstoreConfig -> OpenAPIPetstoreRequest req contentType res accept -> IO (Response ByteString)","name":"dispatchLbsUnsafe","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:dispatchLbsUnsafe"},{"display_html":"dispatchInitUnsafe :: Manager -> OpenAPIPetstoreConfig -> InitRequest req contentType res accept -> IO (Response ByteString)","name":"dispatchInitUnsafe","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:dispatchInitUnsafe"},{"display_html":"newtype InitRequest req contentType res accept = InitRequest {}","name":"InitRequest InitRequest unInitRequest","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#t:InitRequest"},{"display_html":"_toInitRequest :: (MimeType accept, MimeType contentType) => OpenAPIPetstoreConfig -> OpenAPIPetstoreRequest req contentType res accept -> IO (InitRequest req contentType res accept)","name":"_toInitRequest","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:_toInitRequest"},{"display_html":"modifyInitRequest :: InitRequest req contentType res accept -> (Request -> Request) -> InitRequest req contentType res accept","name":"modifyInitRequest","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:modifyInitRequest"},{"display_html":"modifyInitRequestM :: Monad m => InitRequest req contentType res accept -> (Request -> m Request) -> m (InitRequest req contentType res accept)","name":"modifyInitRequestM","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:modifyInitRequestM"},{"display_html":"runConfigLog :: MonadIO m => OpenAPIPetstoreConfig -> LogExec m","name":"runConfigLog","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:runConfigLog"},{"display_html":"runConfigLogWithExceptions :: (MonadCatch m, MonadIO m) => Text -> OpenAPIPetstoreConfig -> LogExec m","name":"runConfigLogWithExceptions","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:runConfigLogWithExceptions"},{"display_html":"newtype AdditionalMetadata = AdditionalMetadata {}","name":"AdditionalMetadata AdditionalMetadata unAdditionalMetadata","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalMetadata"},{"display_html":"newtype ApiKey = ApiKey {}","name":"ApiKey ApiKey unApiKey","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ApiKey"},{"display_html":"newtype Body = Body {}","name":"Body Body unBody","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Body"},{"display_html":"newtype BodyBool = BodyBool {}","name":"BodyBool BodyBool unBodyBool","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:BodyBool"},{"display_html":"newtype BodyDouble = BodyDouble {}","name":"BodyDouble BodyDouble unBodyDouble","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:BodyDouble"},{"display_html":"newtype BodyText = BodyText {}","name":"BodyText BodyText unBodyText","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:BodyText"},{"display_html":"newtype BooleanGroup = BooleanGroup {}","name":"BooleanGroup BooleanGroup unBooleanGroup","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:BooleanGroup"},{"display_html":"newtype Byte = Byte {}","name":"Byte Byte unByte","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Byte"},{"display_html":"newtype Callback = Callback {}","name":"Callback Callback unCallback","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Callback"},{"display_html":"newtype Context = Context {}","name":"Context Context unContext","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Context"},{"display_html":"newtype EnumFormString = EnumFormString {}","name":"EnumFormString EnumFormString unEnumFormString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumFormString"},{"display_html":"newtype EnumFormStringArray = EnumFormStringArray {}","name":"EnumFormStringArray EnumFormStringArray unEnumFormStringArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumFormStringArray"},{"display_html":"newtype EnumHeaderString = EnumHeaderString {}","name":"EnumHeaderString EnumHeaderString unEnumHeaderString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumHeaderString"},{"display_html":"newtype EnumHeaderStringArray = EnumHeaderStringArray {}","name":"EnumHeaderStringArray EnumHeaderStringArray unEnumHeaderStringArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumHeaderStringArray"},{"display_html":"newtype EnumQueryDouble = EnumQueryDouble {}","name":"EnumQueryDouble EnumQueryDouble unEnumQueryDouble","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumQueryDouble"},{"display_html":"newtype EnumQueryInteger = EnumQueryInteger {}","name":"EnumQueryInteger EnumQueryInteger unEnumQueryInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumQueryInteger"},{"display_html":"newtype EnumQueryString = EnumQueryString {}","name":"EnumQueryString EnumQueryString unEnumQueryString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumQueryString"},{"display_html":"newtype EnumQueryStringArray = EnumQueryStringArray {}","name":"EnumQueryStringArray EnumQueryStringArray unEnumQueryStringArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumQueryStringArray"},{"display_html":"newtype File2 = File2 {}","name":"File2 File2 unFile2","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:File2"},{"display_html":"newtype Http = Http {}","name":"Http Http unHttp","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Http"},{"display_html":"newtype Int32 = Int32 {}","name":"Int32 Int32 unInt32","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Int32"},{"display_html":"newtype Int64 = Int64 {}","name":"Int64 Int64 unInt64","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Int64"},{"display_html":"newtype Int64Group = Int64Group {}","name":"Int64Group Int64Group unInt64Group","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Int64Group"},{"display_html":"newtype Ioutil = Ioutil {}","name":"Ioutil Ioutil unIoutil","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Ioutil"},{"display_html":"newtype Name2 = Name2 {}","name":"Name2 Name2 unName2","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Name2"},{"display_html":"newtype Number = Number {}","name":"Number Number unNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Number"},{"display_html":"newtype OrderId = OrderId {}","name":"OrderId OrderId unOrderId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:OrderId"},{"display_html":"newtype OrderIdText = OrderIdText {}","name":"OrderIdText OrderIdText unOrderIdText","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:OrderIdText"},{"display_html":"newtype Param = Param {}","name":"Param Param unParam","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Param"},{"display_html":"newtype Param2 = Param2 {}","name":"Param2 Param2 unParam2","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Param2"},{"display_html":"newtype ParamBinary = ParamBinary {}","name":"ParamBinary ParamBinary unParamBinary","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamBinary"},{"display_html":"newtype ParamDate = ParamDate {}","name":"ParamDate ParamDate unParamDate","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamDate"},{"display_html":"newtype ParamDateTime = ParamDateTime {}","name":"ParamDateTime ParamDateTime unParamDateTime","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamDateTime"},{"display_html":"newtype ParamDouble = ParamDouble {}","name":"ParamDouble ParamDouble unParamDouble","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamDouble"},{"display_html":"newtype ParamFloat = ParamFloat {}","name":"ParamFloat ParamFloat unParamFloat","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamFloat"},{"display_html":"newtype ParamInteger = ParamInteger {}","name":"ParamInteger ParamInteger unParamInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamInteger"},{"display_html":"newtype ParamMapMapStringText = ParamMapMapStringText {}","name":"ParamMapMapStringText ParamMapMapStringText unParamMapMapStringText","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamMapMapStringText"},{"display_html":"newtype ParamString = ParamString {}","name":"ParamString ParamString unParamString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamString"},{"display_html":"newtype Password = Password {}","name":"Password Password unPassword","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Password"},{"display_html":"newtype PatternWithoutDelimiter = PatternWithoutDelimiter {}","name":"PatternWithoutDelimiter PatternWithoutDelimiter unPatternWithoutDelimiter","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:PatternWithoutDelimiter"},{"display_html":"newtype PetId = PetId {}","name":"PetId PetId unPetId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:PetId"},{"display_html":"newtype Pipe = Pipe {}","name":"Pipe Pipe unPipe","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Pipe"},{"display_html":"newtype Query = Query {}","name":"Query Query unQuery","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Query"},{"display_html":"newtype RequiredBooleanGroup = RequiredBooleanGroup {}","name":"RequiredBooleanGroup RequiredBooleanGroup unRequiredBooleanGroup","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:RequiredBooleanGroup"},{"display_html":"newtype RequiredFile = RequiredFile {}","name":"RequiredFile RequiredFile unRequiredFile","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:RequiredFile"},{"display_html":"newtype RequiredInt64Group = RequiredInt64Group {}","name":"RequiredInt64Group RequiredInt64Group unRequiredInt64Group","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:RequiredInt64Group"},{"display_html":"newtype RequiredStringGroup = RequiredStringGroup {}","name":"RequiredStringGroup RequiredStringGroup unRequiredStringGroup","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:RequiredStringGroup"},{"display_html":"newtype Status = Status {}","name":"Status Status unStatus","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Status"},{"display_html":"newtype StatusText = StatusText {}","name":"StatusText StatusText unStatusText","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:StatusText"},{"display_html":"newtype StringGroup = StringGroup {}","name":"StringGroup StringGroup unStringGroup","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:StringGroup"},{"display_html":"newtype Tags = Tags {}","name":"Tags Tags unTags","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Tags"},{"display_html":"newtype Url = Url {}","name":"Url Url unUrl","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Url"},{"display_html":"newtype Username = Username {}","name":"Username Username unUsername","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Username"},{"display_html":"data AdditionalPropertiesAnyType = AdditionalPropertiesAnyType {}","name":"AdditionalPropertiesAnyType AdditionalPropertiesAnyType additionalPropertiesAnyTypeName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesAnyType"},{"display_html":"mkAdditionalPropertiesAnyType :: AdditionalPropertiesAnyType","name":"mkAdditionalPropertiesAnyType","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesAnyType"},{"display_html":"data AdditionalPropertiesArray = AdditionalPropertiesArray {}","name":"AdditionalPropertiesArray AdditionalPropertiesArray additionalPropertiesArrayName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesArray"},{"display_html":"mkAdditionalPropertiesArray :: AdditionalPropertiesArray","name":"mkAdditionalPropertiesArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesArray"},{"display_html":"data AdditionalPropertiesBoolean = AdditionalPropertiesBoolean {}","name":"AdditionalPropertiesBoolean AdditionalPropertiesBoolean additionalPropertiesBooleanName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesBoolean"},{"display_html":"mkAdditionalPropertiesBoolean :: AdditionalPropertiesBoolean","name":"mkAdditionalPropertiesBoolean","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesBoolean"},{"display_html":"data AdditionalPropertiesClass = AdditionalPropertiesClass {}","name":"AdditionalPropertiesClass AdditionalPropertiesClass additionalPropertiesClassAnytype3 additionalPropertiesClassAnytype2 additionalPropertiesClassAnytype1 additionalPropertiesClassMapMapAnytype additionalPropertiesClassMapMapString additionalPropertiesClassMapArrayAnytype additionalPropertiesClassMapArrayInteger additionalPropertiesClassMapBoolean additionalPropertiesClassMapInteger additionalPropertiesClassMapNumber additionalPropertiesClassMapString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesClass"},{"display_html":"mkAdditionalPropertiesClass :: AdditionalPropertiesClass","name":"mkAdditionalPropertiesClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesClass"},{"display_html":"data AdditionalPropertiesInteger = AdditionalPropertiesInteger {}","name":"AdditionalPropertiesInteger AdditionalPropertiesInteger additionalPropertiesIntegerName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesInteger"},{"display_html":"mkAdditionalPropertiesInteger :: AdditionalPropertiesInteger","name":"mkAdditionalPropertiesInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesInteger"},{"display_html":"data AdditionalPropertiesNumber = AdditionalPropertiesNumber {}","name":"AdditionalPropertiesNumber AdditionalPropertiesNumber additionalPropertiesNumberName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesNumber"},{"display_html":"mkAdditionalPropertiesNumber :: AdditionalPropertiesNumber","name":"mkAdditionalPropertiesNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesNumber"},{"display_html":"data AdditionalPropertiesObject = AdditionalPropertiesObject {}","name":"AdditionalPropertiesObject AdditionalPropertiesObject additionalPropertiesObjectName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesObject"},{"display_html":"mkAdditionalPropertiesObject :: AdditionalPropertiesObject","name":"mkAdditionalPropertiesObject","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesObject"},{"display_html":"data AdditionalPropertiesString = AdditionalPropertiesString {}","name":"AdditionalPropertiesString AdditionalPropertiesString additionalPropertiesStringName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesString"},{"display_html":"mkAdditionalPropertiesString :: AdditionalPropertiesString","name":"mkAdditionalPropertiesString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesString"},{"display_html":"data Animal = Animal {}","name":"Animal Animal animalColor animalClassName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Animal"},{"display_html":"mkAnimal :: Text -> Animal","name":"mkAnimal","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAnimal"},{"display_html":"data ApiResponse = ApiResponse {}","name":"ApiResponse ApiResponse apiResponseMessage apiResponseType apiResponseCode","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ApiResponse"},{"display_html":"mkApiResponse :: ApiResponse","name":"mkApiResponse","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkApiResponse"},{"display_html":"data ArrayOfArrayOfNumberOnly = ArrayOfArrayOfNumberOnly {}","name":"ArrayOfArrayOfNumberOnly ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnlyArrayArrayNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ArrayOfArrayOfNumberOnly"},{"display_html":"mkArrayOfArrayOfNumberOnly :: ArrayOfArrayOfNumberOnly","name":"mkArrayOfArrayOfNumberOnly","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkArrayOfArrayOfNumberOnly"},{"display_html":"data ArrayOfNumberOnly = ArrayOfNumberOnly {}","name":"ArrayOfNumberOnly ArrayOfNumberOnly arrayOfNumberOnlyArrayNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ArrayOfNumberOnly"},{"display_html":"mkArrayOfNumberOnly :: ArrayOfNumberOnly","name":"mkArrayOfNumberOnly","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkArrayOfNumberOnly"},{"display_html":"data ArrayTest = ArrayTest {}","name":"ArrayTest ArrayTest arrayTestArrayArrayOfModel arrayTestArrayArrayOfInteger arrayTestArrayOfString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ArrayTest"},{"display_html":"mkArrayTest :: ArrayTest","name":"mkArrayTest","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkArrayTest"},{"display_html":"data Capitalization = Capitalization {}","name":"Capitalization Capitalization capitalizationAttName capitalizationScaEthFlowPoints capitalizationCapitalSnake capitalizationSmallSnake capitalizationCapitalCamel capitalizationSmallCamel","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Capitalization"},{"display_html":"mkCapitalization :: Capitalization","name":"mkCapitalization","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkCapitalization"},{"display_html":"data Cat = Cat {}","name":"Cat Cat catDeclawed catColor catClassName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Cat"},{"display_html":"mkCat :: Text -> Cat","name":"mkCat","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkCat"},{"display_html":"data CatAllOf = CatAllOf {}","name":"CatAllOf CatAllOf catAllOfDeclawed","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:CatAllOf"},{"display_html":"mkCatAllOf :: CatAllOf","name":"mkCatAllOf","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkCatAllOf"},{"display_html":"data Category = Category {}","name":"Category Category categoryName categoryId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Category"},{"display_html":"mkCategory :: Text -> Category","name":"mkCategory","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkCategory"},{"display_html":"data ClassModel = ClassModel {}","name":"ClassModel ClassModel classModelClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ClassModel"},{"display_html":"mkClassModel :: ClassModel","name":"mkClassModel","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkClassModel"},{"display_html":"data Client = Client {}","name":"Client Client clientClient","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Client"},{"display_html":"mkClient :: Client","name":"mkClient","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkClient"},{"display_html":"data Dog = Dog {}","name":"Dog Dog dogBreed dogColor dogClassName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Dog"},{"display_html":"mkDog :: Text -> Dog","name":"mkDog","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkDog"},{"display_html":"data DogAllOf = DogAllOf {}","name":"DogAllOf DogAllOf dogAllOfBreed","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:DogAllOf"},{"display_html":"mkDogAllOf :: DogAllOf","name":"mkDogAllOf","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkDogAllOf"},{"display_html":"data EnumArrays = EnumArrays {}","name":"EnumArrays EnumArrays enumArraysArrayEnum enumArraysJustSymbol","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumArrays"},{"display_html":"mkEnumArrays :: EnumArrays","name":"mkEnumArrays","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkEnumArrays"},{"display_html":"data EnumTest = EnumTest {}","name":"EnumTest EnumTest enumTestOuterEnum enumTestEnumNumber enumTestEnumInteger enumTestEnumStringRequired enumTestEnumString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumTest"},{"display_html":"mkEnumTest :: E'EnumString -> EnumTest","name":"mkEnumTest","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkEnumTest"},{"display_html":"data File = File {}","name":"File File fileSourceUri","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:File"},{"display_html":"mkFile :: File","name":"mkFile","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkFile"},{"display_html":"data FileSchemaTestClass = FileSchemaTestClass {}","name":"FileSchemaTestClass FileSchemaTestClass fileSchemaTestClassFiles fileSchemaTestClassFile","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:FileSchemaTestClass"},{"display_html":"mkFileSchemaTestClass :: FileSchemaTestClass","name":"mkFileSchemaTestClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkFileSchemaTestClass"},{"display_html":"data FormatTest = FormatTest {}","name":"FormatTest FormatTest formatTestPassword formatTestUuid formatTestDateTime formatTestDate formatTestBinary formatTestByte formatTestString formatTestDouble formatTestFloat formatTestNumber formatTestInt64 formatTestInt32 formatTestInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:FormatTest"},{"display_html":"mkFormatTest :: Double -> ByteArray -> Date -> Text -> FormatTest","name":"mkFormatTest","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkFormatTest"},{"display_html":"data HasOnlyReadOnly = HasOnlyReadOnly {}","name":"HasOnlyReadOnly HasOnlyReadOnly hasOnlyReadOnlyFoo hasOnlyReadOnlyBar","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:HasOnlyReadOnly"},{"display_html":"mkHasOnlyReadOnly :: HasOnlyReadOnly","name":"mkHasOnlyReadOnly","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkHasOnlyReadOnly"},{"display_html":"data MapTest = MapTest {}","name":"MapTest MapTest mapTestIndirectMap mapTestDirectMap mapTestMapOfEnumString mapTestMapMapOfString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:MapTest"},{"display_html":"mkMapTest :: MapTest","name":"mkMapTest","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkMapTest"},{"display_html":"data MixedPropertiesAndAdditionalPropertiesClass = MixedPropertiesAndAdditionalPropertiesClass {}","name":"MixedPropertiesAndAdditionalPropertiesClass MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClassMap mixedPropertiesAndAdditionalPropertiesClassDateTime mixedPropertiesAndAdditionalPropertiesClassUuid","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:MixedPropertiesAndAdditionalPropertiesClass"},{"display_html":"mkMixedPropertiesAndAdditionalPropertiesClass :: MixedPropertiesAndAdditionalPropertiesClass","name":"mkMixedPropertiesAndAdditionalPropertiesClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkMixedPropertiesAndAdditionalPropertiesClass"},{"display_html":"data Model200Response = Model200Response {}","name":"Model200Response Model200Response model200ResponseClass model200ResponseName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Model200Response"},{"display_html":"mkModel200Response :: Model200Response","name":"mkModel200Response","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkModel200Response"},{"display_html":"data ModelList = ModelList {}","name":"ModelList ModelList modelList123list","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ModelList"},{"display_html":"mkModelList :: ModelList","name":"mkModelList","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkModelList"},{"display_html":"data ModelReturn = ModelReturn {}","name":"ModelReturn ModelReturn modelReturnReturn","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ModelReturn"},{"display_html":"mkModelReturn :: ModelReturn","name":"mkModelReturn","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkModelReturn"},{"display_html":"data Name = Name {}","name":"Name Name name123number nameProperty nameSnakeCase nameName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Name"},{"display_html":"mkName :: Int -> Name","name":"mkName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkName"},{"display_html":"data NumberOnly = NumberOnly {}","name":"NumberOnly NumberOnly numberOnlyJustNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:NumberOnly"},{"display_html":"mkNumberOnly :: NumberOnly","name":"mkNumberOnly","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkNumberOnly"},{"display_html":"data Order = Order {}","name":"Order Order orderComplete orderStatus orderShipDate orderQuantity orderPetId orderId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Order"},{"display_html":"mkOrder :: Order","name":"mkOrder","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkOrder"},{"display_html":"data OuterComposite = OuterComposite {}","name":"OuterComposite OuterComposite outerCompositeMyBoolean outerCompositeMyString outerCompositeMyNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:OuterComposite"},{"display_html":"mkOuterComposite :: OuterComposite","name":"mkOuterComposite","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkOuterComposite"},{"display_html":"data Pet = Pet {}","name":"Pet Pet petStatus petTags petPhotoUrls petName petCategory petId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Pet"},{"display_html":"mkPet :: Text -> [Text] -> Pet","name":"mkPet","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkPet"},{"display_html":"data ReadOnlyFirst = ReadOnlyFirst {}","name":"ReadOnlyFirst ReadOnlyFirst readOnlyFirstBaz readOnlyFirstBar","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ReadOnlyFirst"},{"display_html":"mkReadOnlyFirst :: ReadOnlyFirst","name":"mkReadOnlyFirst","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkReadOnlyFirst"},{"display_html":"data SpecialModelName = SpecialModelName {}","name":"SpecialModelName SpecialModelName specialModelNameSpecialPropertyName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:SpecialModelName"},{"display_html":"mkSpecialModelName :: SpecialModelName","name":"mkSpecialModelName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkSpecialModelName"},{"display_html":"data Tag = Tag {}","name":"Tag Tag tagName tagId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Tag"},{"display_html":"mkTag :: Tag","name":"mkTag","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkTag"},{"display_html":"data TypeHolderDefault = TypeHolderDefault {}","name":"TypeHolderDefault TypeHolderDefault typeHolderDefaultArrayItem typeHolderDefaultBoolItem typeHolderDefaultIntegerItem typeHolderDefaultNumberItem typeHolderDefaultStringItem","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:TypeHolderDefault"},{"display_html":"mkTypeHolderDefault :: Text -> Double -> Int -> Bool -> [Int] -> TypeHolderDefault","name":"mkTypeHolderDefault","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkTypeHolderDefault"},{"display_html":"data TypeHolderExample = TypeHolderExample {}","name":"TypeHolderExample TypeHolderExample typeHolderExampleArrayItem typeHolderExampleBoolItem typeHolderExampleIntegerItem typeHolderExampleNumberItem typeHolderExampleStringItem","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:TypeHolderExample"},{"display_html":"mkTypeHolderExample :: Text -> Double -> Int -> Bool -> [Int] -> TypeHolderExample","name":"mkTypeHolderExample","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkTypeHolderExample"},{"display_html":"data User = User {}","name":"User User userUserStatus userPhone userEmail userLastName userFirstName userUsername userId userPassword","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:User"},{"display_html":"mkUser :: User","name":"mkUser","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkUser"},{"display_html":"data XmlItem = XmlItem {}","name":"XmlItem XmlItem xmlItemPrefixNsWrappedArray xmlItemPrefixNsArray xmlItemPrefixNsBoolean xmlItemPrefixNsInteger xmlItemPrefixNsNumber xmlItemPrefixNsString xmlItemNamespaceWrappedArray xmlItemNamespaceArray xmlItemNamespaceBoolean xmlItemNamespaceInteger xmlItemNamespaceNumber xmlItemNamespaceString xmlItemPrefixWrappedArray xmlItemPrefixArray xmlItemPrefixBoolean xmlItemPrefixInteger xmlItemPrefixNumber xmlItemPrefixString xmlItemNameWrappedArray xmlItemNameArray xmlItemNameBoolean xmlItemNameInteger xmlItemNameNumber xmlItemNameString xmlItemWrappedArray xmlItemAttributeBoolean xmlItemAttributeInteger xmlItemAttributeNumber xmlItemAttributeString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:XmlItem"},{"display_html":"mkXmlItem :: XmlItem","name":"mkXmlItem","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkXmlItem"},{"display_html":"data E'ArrayEnum","name":"E'ArrayEnum E'ArrayEnum'Crab E'ArrayEnum'Fish","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-ArrayEnum"},{"display_html":"fromE'ArrayEnum :: E'ArrayEnum -> Text","name":"fromE'ArrayEnum","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-ArrayEnum"},{"display_html":"toE'ArrayEnum :: Text -> Either String E'ArrayEnum","name":"toE'ArrayEnum","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-ArrayEnum"},{"display_html":"data E'EnumFormString","name":"E'EnumFormString E'EnumFormString'_xyz E'EnumFormString'_efg E'EnumFormString'_abc","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumFormString"},{"display_html":"fromE'EnumFormString :: E'EnumFormString -> Text","name":"fromE'EnumFormString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumFormString"},{"display_html":"toE'EnumFormString :: Text -> Either String E'EnumFormString","name":"toE'EnumFormString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumFormString"},{"display_html":"data E'EnumFormStringArray","name":"E'EnumFormStringArray E'EnumFormStringArray'Dollar E'EnumFormStringArray'GreaterThan","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumFormStringArray"},{"display_html":"fromE'EnumFormStringArray :: E'EnumFormStringArray -> Text","name":"fromE'EnumFormStringArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumFormStringArray"},{"display_html":"toE'EnumFormStringArray :: Text -> Either String E'EnumFormStringArray","name":"toE'EnumFormStringArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumFormStringArray"},{"display_html":"data E'EnumInteger","name":"E'EnumInteger E'EnumInteger'NumMinus_1 E'EnumInteger'Num1","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumInteger"},{"display_html":"fromE'EnumInteger :: E'EnumInteger -> Int","name":"fromE'EnumInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumInteger"},{"display_html":"toE'EnumInteger :: Int -> Either String E'EnumInteger","name":"toE'EnumInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumInteger"},{"display_html":"data E'EnumNumber","name":"E'EnumNumber E'EnumNumber'NumMinus_1_Dot_2 E'EnumNumber'Num1_Dot_1","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumNumber"},{"display_html":"fromE'EnumNumber :: E'EnumNumber -> Double","name":"fromE'EnumNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumNumber"},{"display_html":"toE'EnumNumber :: Double -> Either String E'EnumNumber","name":"toE'EnumNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumNumber"},{"display_html":"data E'EnumQueryInteger","name":"E'EnumQueryInteger E'EnumQueryInteger'NumMinus_2 E'EnumQueryInteger'Num1","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumQueryInteger"},{"display_html":"fromE'EnumQueryInteger :: E'EnumQueryInteger -> Int","name":"fromE'EnumQueryInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumQueryInteger"},{"display_html":"toE'EnumQueryInteger :: Int -> Either String E'EnumQueryInteger","name":"toE'EnumQueryInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumQueryInteger"},{"display_html":"data E'EnumString","name":"E'EnumString E'EnumString'Empty E'EnumString'Lower E'EnumString'UPPER","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumString"},{"display_html":"fromE'EnumString :: E'EnumString -> Text","name":"fromE'EnumString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumString"},{"display_html":"toE'EnumString :: Text -> Either String E'EnumString","name":"toE'EnumString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumString"},{"display_html":"data E'Inner","name":"E'Inner E'Inner'Lower E'Inner'UPPER","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-Inner"},{"display_html":"fromE'Inner :: E'Inner -> Text","name":"fromE'Inner","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-Inner"},{"display_html":"toE'Inner :: Text -> Either String E'Inner","name":"toE'Inner","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-Inner"},{"display_html":"data E'JustSymbol","name":"E'JustSymbol E'JustSymbol'Dollar E'JustSymbol'Greater_Than_Or_Equal_To","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-JustSymbol"},{"display_html":"fromE'JustSymbol :: E'JustSymbol -> Text","name":"fromE'JustSymbol","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-JustSymbol"},{"display_html":"toE'JustSymbol :: Text -> Either String E'JustSymbol","name":"toE'JustSymbol","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-JustSymbol"},{"display_html":"data E'Status","name":"E'Status E'Status'Delivered E'Status'Approved E'Status'Placed","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-Status"},{"display_html":"fromE'Status :: E'Status -> Text","name":"fromE'Status","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-Status"},{"display_html":"toE'Status :: Text -> Either String E'Status","name":"toE'Status","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-Status"},{"display_html":"data E'Status2","name":"E'Status2 E'Status2'Sold E'Status2'Pending E'Status2'Available","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-Status2"},{"display_html":"fromE'Status2 :: E'Status2 -> Text","name":"fromE'Status2","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-Status2"},{"display_html":"toE'Status2 :: Text -> Either String E'Status2","name":"toE'Status2","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-Status2"},{"display_html":"data EnumClass","name":"EnumClass EnumClass'_xyz EnumClass'_efg EnumClass'_abc","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumClass"},{"display_html":"fromEnumClass :: EnumClass -> Text","name":"fromEnumClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromEnumClass"},{"display_html":"toEnumClass :: Text -> Either String EnumClass","name":"toEnumClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toEnumClass"},{"display_html":"data OuterEnum","name":"OuterEnum OuterEnum'Delivered OuterEnum'Approved OuterEnum'Placed","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:OuterEnum"},{"display_html":"fromOuterEnum :: OuterEnum -> Text","name":"fromOuterEnum","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromOuterEnum"},{"display_html":"toOuterEnum :: Text -> Either String OuterEnum","name":"toOuterEnum","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toOuterEnum"},{"display_html":"data AuthApiKeyApiKey = AuthApiKeyApiKey Text","name":"AuthApiKeyApiKey AuthApiKeyApiKey","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AuthApiKeyApiKey"},{"display_html":"data AuthApiKeyApiKeyQuery = AuthApiKeyApiKeyQuery Text","name":"AuthApiKeyApiKeyQuery AuthApiKeyApiKeyQuery","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AuthApiKeyApiKeyQuery"},{"display_html":"data AuthBasicHttpBasicTest = AuthBasicHttpBasicTest ByteString ByteString","name":"AuthBasicHttpBasicTest AuthBasicHttpBasicTest","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AuthBasicHttpBasicTest"},{"display_html":"data AuthOAuthPetstoreAuth = AuthOAuthPetstoreAuth Text","name":"AuthOAuthPetstoreAuth AuthOAuthPetstoreAuth","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AuthOAuthPetstoreAuth"},{"display_html":"createUser :: (Consumes CreateUser contentType, MimeRender contentType User) => ContentType contentType -> User -> OpenAPIPetstoreRequest CreateUser contentType NoContent MimeNoContent","name":"createUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:createUser"},{"display_html":"data CreateUser","name":"CreateUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:CreateUser"},{"display_html":"createUsersWithArrayInput :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType Body) => ContentType contentType -> Body -> OpenAPIPetstoreRequest CreateUsersWithArrayInput contentType NoContent MimeNoContent","name":"createUsersWithArrayInput","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:createUsersWithArrayInput"},{"display_html":"data CreateUsersWithArrayInput","name":"CreateUsersWithArrayInput","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:CreateUsersWithArrayInput"},{"display_html":"createUsersWithListInput :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType Body) => ContentType contentType -> Body -> OpenAPIPetstoreRequest CreateUsersWithListInput contentType NoContent MimeNoContent","name":"createUsersWithListInput","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:createUsersWithListInput"},{"display_html":"data CreateUsersWithListInput","name":"CreateUsersWithListInput","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:CreateUsersWithListInput"},{"display_html":"deleteUser :: Username -> OpenAPIPetstoreRequest DeleteUser MimeNoContent NoContent MimeNoContent","name":"deleteUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:deleteUser"},{"display_html":"data DeleteUser","name":"DeleteUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:DeleteUser"},{"display_html":"getUserByName :: Accept accept -> Username -> OpenAPIPetstoreRequest GetUserByName MimeNoContent User accept","name":"getUserByName","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:getUserByName"},{"display_html":"data GetUserByName","name":"GetUserByName","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:GetUserByName"},{"display_html":"loginUser :: Accept accept -> Username -> Password -> OpenAPIPetstoreRequest LoginUser MimeNoContent Text accept","name":"loginUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:loginUser"},{"display_html":"data LoginUser","name":"LoginUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:LoginUser"},{"display_html":"logoutUser :: OpenAPIPetstoreRequest LogoutUser MimeNoContent NoContent MimeNoContent","name":"logoutUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:logoutUser"},{"display_html":"data LogoutUser","name":"LogoutUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:LogoutUser"},{"display_html":"updateUser :: (Consumes UpdateUser contentType, MimeRender contentType User) => ContentType contentType -> User -> Username -> OpenAPIPetstoreRequest UpdateUser contentType NoContent MimeNoContent","name":"updateUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:updateUser"},{"display_html":"data UpdateUser","name":"UpdateUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:UpdateUser"},{"display_html":"deleteOrder :: OrderIdText -> OpenAPIPetstoreRequest DeleteOrder MimeNoContent NoContent MimeNoContent","name":"deleteOrder","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#v:deleteOrder"},{"display_html":"data DeleteOrder","name":"DeleteOrder","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#t:DeleteOrder"},{"display_html":"getInventory :: OpenAPIPetstoreRequest GetInventory MimeNoContent (Map String Int) MimeJSON","name":"getInventory","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#v:getInventory"},{"display_html":"data GetInventory","name":"GetInventory","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#t:GetInventory"},{"display_html":"getOrderById :: Accept accept -> OrderId -> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept","name":"getOrderById","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#v:getOrderById"},{"display_html":"data GetOrderById","name":"GetOrderById","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#t:GetOrderById"},{"display_html":"placeOrder :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => ContentType contentType -> Accept accept -> Order -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept","name":"placeOrder","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#v:placeOrder"},{"display_html":"data PlaceOrder","name":"PlaceOrder","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#t:PlaceOrder"},{"display_html":"addPet :: (Consumes AddPet contentType, MimeRender contentType Pet) => ContentType contentType -> Pet -> OpenAPIPetstoreRequest AddPet contentType NoContent MimeNoContent","name":"addPet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:addPet"},{"display_html":"data AddPet","name":"AddPet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:AddPet"},{"display_html":"deletePet :: PetId -> OpenAPIPetstoreRequest DeletePet MimeNoContent NoContent MimeNoContent","name":"deletePet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:deletePet"},{"display_html":"data DeletePet","name":"DeletePet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:DeletePet"},{"display_html":"findPetsByStatus :: Accept accept -> Status -> OpenAPIPetstoreRequest FindPetsByStatus MimeNoContent [Pet] accept","name":"findPetsByStatus","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:findPetsByStatus"},{"display_html":"data FindPetsByStatus","name":"FindPetsByStatus","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:FindPetsByStatus"},{"display_html":"findPetsByTags :: Accept accept -> Tags -> OpenAPIPetstoreRequest FindPetsByTags MimeNoContent [Pet] accept","name":"findPetsByTags","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:findPetsByTags"},{"display_html":"data FindPetsByTags","name":"FindPetsByTags","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:FindPetsByTags"},{"display_html":"getPetById :: Accept accept -> PetId -> OpenAPIPetstoreRequest GetPetById MimeNoContent Pet accept","name":"getPetById","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:getPetById"},{"display_html":"data GetPetById","name":"GetPetById","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:GetPetById"},{"display_html":"updatePet :: (Consumes UpdatePet contentType, MimeRender contentType Pet) => ContentType contentType -> Pet -> OpenAPIPetstoreRequest UpdatePet contentType NoContent MimeNoContent","name":"updatePet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:updatePet"},{"display_html":"data UpdatePet","name":"UpdatePet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:UpdatePet"},{"display_html":"updatePetWithForm :: Consumes UpdatePetWithForm MimeFormUrlEncoded => PetId -> OpenAPIPetstoreRequest UpdatePetWithForm MimeFormUrlEncoded NoContent MimeNoContent","name":"updatePetWithForm","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:updatePetWithForm"},{"display_html":"data UpdatePetWithForm","name":"UpdatePetWithForm","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:UpdatePetWithForm"},{"display_html":"uploadFile :: Consumes UploadFile MimeMultipartFormData => PetId -> OpenAPIPetstoreRequest UploadFile MimeMultipartFormData ApiResponse MimeJSON","name":"uploadFile","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:uploadFile"},{"display_html":"data UploadFile","name":"UploadFile","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:UploadFile"},{"display_html":"uploadFileWithRequiredFile :: Consumes UploadFileWithRequiredFile MimeMultipartFormData => RequiredFile -> PetId -> OpenAPIPetstoreRequest UploadFileWithRequiredFile MimeMultipartFormData ApiResponse MimeJSON","name":"uploadFileWithRequiredFile","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:uploadFileWithRequiredFile"},{"display_html":"data UploadFileWithRequiredFile","name":"UploadFileWithRequiredFile","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:UploadFileWithRequiredFile"},{"display_html":"testClassname :: (Consumes TestClassname MimeJSON, MimeRender MimeJSON Client) => Client -> OpenAPIPetstoreRequest TestClassname MimeJSON Client MimeJSON","name":"testClassname","module":"OpenAPIPetstore.API.FakeClassnameTags123","link":"OpenAPIPetstore-API-FakeClassnameTags123.html#v:testClassname"},{"display_html":"data TestClassname","name":"TestClassname","module":"OpenAPIPetstore.API.FakeClassnameTags123","link":"OpenAPIPetstore-API-FakeClassnameTags123.html#t:TestClassname"},{"display_html":"createXmlItem :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) => ContentType contentType -> XmlItem -> OpenAPIPetstoreRequest CreateXmlItem contentType NoContent MimeNoContent","name":"createXmlItem","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:createXmlItem"},{"display_html":"data CreateXmlItem","name":"CreateXmlItem","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:CreateXmlItem"},{"display_html":"fakeOuterBooleanSerialize :: Consumes FakeOuterBooleanSerialize contentType => ContentType contentType -> Accept accept -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize contentType Bool accept","name":"fakeOuterBooleanSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:fakeOuterBooleanSerialize"},{"display_html":"data FakeOuterBooleanSerialize","name":"FakeOuterBooleanSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:FakeOuterBooleanSerialize"},{"display_html":"fakeOuterCompositeSerialize :: Consumes FakeOuterCompositeSerialize contentType => ContentType contentType -> Accept accept -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept","name":"fakeOuterCompositeSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:fakeOuterCompositeSerialize"},{"display_html":"data FakeOuterCompositeSerialize","name":"FakeOuterCompositeSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:FakeOuterCompositeSerialize"},{"display_html":"fakeOuterNumberSerialize :: Consumes FakeOuterNumberSerialize contentType => ContentType contentType -> Accept accept -> OpenAPIPetstoreRequest FakeOuterNumberSerialize contentType Double accept","name":"fakeOuterNumberSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:fakeOuterNumberSerialize"},{"display_html":"data FakeOuterNumberSerialize","name":"FakeOuterNumberSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:FakeOuterNumberSerialize"},{"display_html":"fakeOuterStringSerialize :: Consumes FakeOuterStringSerialize contentType => ContentType contentType -> Accept accept -> OpenAPIPetstoreRequest FakeOuterStringSerialize contentType Text accept","name":"fakeOuterStringSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:fakeOuterStringSerialize"},{"display_html":"data FakeOuterStringSerialize","name":"FakeOuterStringSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:FakeOuterStringSerialize"},{"display_html":"testBodyWithFileSchema :: (Consumes TestBodyWithFileSchema MimeJSON, MimeRender MimeJSON FileSchemaTestClass) => FileSchemaTestClass -> OpenAPIPetstoreRequest TestBodyWithFileSchema MimeJSON NoContent MimeNoContent","name":"testBodyWithFileSchema","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testBodyWithFileSchema"},{"display_html":"data TestBodyWithFileSchema","name":"TestBodyWithFileSchema","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestBodyWithFileSchema"},{"display_html":"testBodyWithQueryParams :: (Consumes TestBodyWithQueryParams MimeJSON, MimeRender MimeJSON User) => User -> Query -> OpenAPIPetstoreRequest TestBodyWithQueryParams MimeJSON NoContent MimeNoContent","name":"testBodyWithQueryParams","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testBodyWithQueryParams"},{"display_html":"data TestBodyWithQueryParams","name":"TestBodyWithQueryParams","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestBodyWithQueryParams"},{"display_html":"testClientModel :: (Consumes TestClientModel MimeJSON, MimeRender MimeJSON Client) => Client -> OpenAPIPetstoreRequest TestClientModel MimeJSON Client MimeJSON","name":"testClientModel","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testClientModel"},{"display_html":"data TestClientModel","name":"TestClientModel","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestClientModel"},{"display_html":"testEndpointParameters :: Consumes TestEndpointParameters MimeFormUrlEncoded => Number -> ParamDouble -> PatternWithoutDelimiter -> Byte -> OpenAPIPetstoreRequest TestEndpointParameters MimeFormUrlEncoded NoContent MimeNoContent","name":"testEndpointParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testEndpointParameters"},{"display_html":"data TestEndpointParameters","name":"TestEndpointParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestEndpointParameters"},{"display_html":"testEnumParameters :: Consumes TestEnumParameters MimeFormUrlEncoded => OpenAPIPetstoreRequest TestEnumParameters MimeFormUrlEncoded NoContent MimeNoContent","name":"testEnumParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testEnumParameters"},{"display_html":"data TestEnumParameters","name":"TestEnumParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestEnumParameters"},{"display_html":"testGroupParameters :: RequiredStringGroup -> RequiredBooleanGroup -> RequiredInt64Group -> OpenAPIPetstoreRequest TestGroupParameters MimeNoContent NoContent MimeNoContent","name":"testGroupParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testGroupParameters"},{"display_html":"data TestGroupParameters","name":"TestGroupParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestGroupParameters"},{"display_html":"testInlineAdditionalProperties :: (Consumes TestInlineAdditionalProperties MimeJSON, MimeRender MimeJSON ParamMapMapStringText) => ParamMapMapStringText -> OpenAPIPetstoreRequest TestInlineAdditionalProperties MimeJSON NoContent MimeNoContent","name":"testInlineAdditionalProperties","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testInlineAdditionalProperties"},{"display_html":"data TestInlineAdditionalProperties","name":"TestInlineAdditionalProperties","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestInlineAdditionalProperties"},{"display_html":"testJsonFormData :: Consumes TestJsonFormData MimeFormUrlEncoded => Param -> Param2 -> OpenAPIPetstoreRequest TestJsonFormData MimeFormUrlEncoded NoContent MimeNoContent","name":"testJsonFormData","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testJsonFormData"},{"display_html":"data TestJsonFormData","name":"TestJsonFormData","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestJsonFormData"},{"display_html":"testQueryParameterCollectionFormat :: Pipe -> Ioutil -> Http -> Url -> Context -> OpenAPIPetstoreRequest TestQueryParameterCollectionFormat MimeNoContent NoContent MimeNoContent","name":"testQueryParameterCollectionFormat","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testQueryParameterCollectionFormat"},{"display_html":"data TestQueryParameterCollectionFormat","name":"TestQueryParameterCollectionFormat","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestQueryParameterCollectionFormat"},{"display_html":"op123testSpecialTags :: (Consumes Op123testSpecialTags MimeJSON, MimeRender MimeJSON Client) => Client -> OpenAPIPetstoreRequest Op123testSpecialTags MimeJSON Client MimeJSON","name":"op123testSpecialTags","module":"OpenAPIPetstore.API.AnotherFake","link":"OpenAPIPetstore-API-AnotherFake.html#v:op123testSpecialTags"},{"display_html":"data Op123testSpecialTags","name":"Op123testSpecialTags","module":"OpenAPIPetstore.API.AnotherFake","link":"OpenAPIPetstore-API-AnotherFake.html#t:Op123testSpecialTags"},{"display_html":"module OpenAPIPetstore.API.AnotherFake","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"module OpenAPIPetstore.API.Fake","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"module OpenAPIPetstore.API.FakeClassnameTags123","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"module OpenAPIPetstore.API.Pet","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"module OpenAPIPetstore.API.Store","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"module OpenAPIPetstore.API.User","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"additionalPropertiesAnyTypeNameL :: Lens_' AdditionalPropertiesAnyType (Maybe Text)","name":"additionalPropertiesAnyTypeNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesAnyTypeNameL"},{"display_html":"additionalPropertiesArrayNameL :: Lens_' AdditionalPropertiesArray (Maybe Text)","name":"additionalPropertiesArrayNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesArrayNameL"},{"display_html":"additionalPropertiesBooleanNameL :: Lens_' AdditionalPropertiesBoolean (Maybe Text)","name":"additionalPropertiesBooleanNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesBooleanNameL"},{"display_html":"additionalPropertiesClassMapStringL :: Lens_' AdditionalPropertiesClass (Maybe (Map String Text))","name":"additionalPropertiesClassMapStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapStringL"},{"display_html":"additionalPropertiesClassMapNumberL :: Lens_' AdditionalPropertiesClass (Maybe (Map String Double))","name":"additionalPropertiesClassMapNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapNumberL"},{"display_html":"additionalPropertiesClassMapIntegerL :: Lens_' AdditionalPropertiesClass (Maybe (Map String Int))","name":"additionalPropertiesClassMapIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapIntegerL"},{"display_html":"additionalPropertiesClassMapBooleanL :: Lens_' AdditionalPropertiesClass (Maybe (Map String Bool))","name":"additionalPropertiesClassMapBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapBooleanL"},{"display_html":"additionalPropertiesClassMapArrayIntegerL :: Lens_' AdditionalPropertiesClass (Maybe (Map String [Int]))","name":"additionalPropertiesClassMapArrayIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapArrayIntegerL"},{"display_html":"additionalPropertiesClassMapArrayAnytypeL :: Lens_' AdditionalPropertiesClass (Maybe (Map String [Value]))","name":"additionalPropertiesClassMapArrayAnytypeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapArrayAnytypeL"},{"display_html":"additionalPropertiesClassMapMapStringL :: Lens_' AdditionalPropertiesClass (Maybe (Map String (Map String Text)))","name":"additionalPropertiesClassMapMapStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapMapStringL"},{"display_html":"additionalPropertiesClassMapMapAnytypeL :: Lens_' AdditionalPropertiesClass (Maybe (Map String (Map String Value)))","name":"additionalPropertiesClassMapMapAnytypeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapMapAnytypeL"},{"display_html":"additionalPropertiesClassAnytype1L :: Lens_' AdditionalPropertiesClass (Maybe Value)","name":"additionalPropertiesClassAnytype1L","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassAnytype1L"},{"display_html":"additionalPropertiesClassAnytype2L :: Lens_' AdditionalPropertiesClass (Maybe Value)","name":"additionalPropertiesClassAnytype2L","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassAnytype2L"},{"display_html":"additionalPropertiesClassAnytype3L :: Lens_' AdditionalPropertiesClass (Maybe Value)","name":"additionalPropertiesClassAnytype3L","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassAnytype3L"},{"display_html":"additionalPropertiesIntegerNameL :: Lens_' AdditionalPropertiesInteger (Maybe Text)","name":"additionalPropertiesIntegerNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesIntegerNameL"},{"display_html":"additionalPropertiesNumberNameL :: Lens_' AdditionalPropertiesNumber (Maybe Text)","name":"additionalPropertiesNumberNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesNumberNameL"},{"display_html":"additionalPropertiesObjectNameL :: Lens_' AdditionalPropertiesObject (Maybe Text)","name":"additionalPropertiesObjectNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesObjectNameL"},{"display_html":"additionalPropertiesStringNameL :: Lens_' AdditionalPropertiesString (Maybe Text)","name":"additionalPropertiesStringNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesStringNameL"},{"display_html":"animalClassNameL :: Lens_' Animal Text","name":"animalClassNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:animalClassNameL"},{"display_html":"animalColorL :: Lens_' Animal (Maybe Text)","name":"animalColorL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:animalColorL"},{"display_html":"apiResponseCodeL :: Lens_' ApiResponse (Maybe Int)","name":"apiResponseCodeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:apiResponseCodeL"},{"display_html":"apiResponseTypeL :: Lens_' ApiResponse (Maybe Text)","name":"apiResponseTypeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:apiResponseTypeL"},{"display_html":"apiResponseMessageL :: Lens_' ApiResponse (Maybe Text)","name":"apiResponseMessageL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:apiResponseMessageL"},{"display_html":"arrayOfArrayOfNumberOnlyArrayArrayNumberL :: Lens_' ArrayOfArrayOfNumberOnly (Maybe [[Double]])","name":"arrayOfArrayOfNumberOnlyArrayArrayNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:arrayOfArrayOfNumberOnlyArrayArrayNumberL"},{"display_html":"arrayOfNumberOnlyArrayNumberL :: Lens_' ArrayOfNumberOnly (Maybe [Double])","name":"arrayOfNumberOnlyArrayNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:arrayOfNumberOnlyArrayNumberL"},{"display_html":"arrayTestArrayOfStringL :: Lens_' ArrayTest (Maybe [Text])","name":"arrayTestArrayOfStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:arrayTestArrayOfStringL"},{"display_html":"arrayTestArrayArrayOfIntegerL :: Lens_' ArrayTest (Maybe [[Integer]])","name":"arrayTestArrayArrayOfIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:arrayTestArrayArrayOfIntegerL"},{"display_html":"arrayTestArrayArrayOfModelL :: Lens_' ArrayTest (Maybe [[ReadOnlyFirst]])","name":"arrayTestArrayArrayOfModelL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:arrayTestArrayArrayOfModelL"},{"display_html":"capitalizationSmallCamelL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationSmallCamelL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationSmallCamelL"},{"display_html":"capitalizationCapitalCamelL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationCapitalCamelL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationCapitalCamelL"},{"display_html":"capitalizationSmallSnakeL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationSmallSnakeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationSmallSnakeL"},{"display_html":"capitalizationCapitalSnakeL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationCapitalSnakeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationCapitalSnakeL"},{"display_html":"capitalizationScaEthFlowPointsL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationScaEthFlowPointsL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationScaEthFlowPointsL"},{"display_html":"capitalizationAttNameL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationAttNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationAttNameL"},{"display_html":"catClassNameL :: Lens_' Cat Text","name":"catClassNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:catClassNameL"},{"display_html":"catColorL :: Lens_' Cat (Maybe Text)","name":"catColorL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:catColorL"},{"display_html":"catDeclawedL :: Lens_' Cat (Maybe Bool)","name":"catDeclawedL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:catDeclawedL"},{"display_html":"catAllOfDeclawedL :: Lens_' CatAllOf (Maybe Bool)","name":"catAllOfDeclawedL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:catAllOfDeclawedL"},{"display_html":"categoryIdL :: Lens_' Category (Maybe Integer)","name":"categoryIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:categoryIdL"},{"display_html":"categoryNameL :: Lens_' Category Text","name":"categoryNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:categoryNameL"},{"display_html":"classModelClassL :: Lens_' ClassModel (Maybe Text)","name":"classModelClassL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:classModelClassL"},{"display_html":"clientClientL :: Lens_' Client (Maybe Text)","name":"clientClientL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:clientClientL"},{"display_html":"dogClassNameL :: Lens_' Dog Text","name":"dogClassNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:dogClassNameL"},{"display_html":"dogColorL :: Lens_' Dog (Maybe Text)","name":"dogColorL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:dogColorL"},{"display_html":"dogBreedL :: Lens_' Dog (Maybe Text)","name":"dogBreedL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:dogBreedL"},{"display_html":"dogAllOfBreedL :: Lens_' DogAllOf (Maybe Text)","name":"dogAllOfBreedL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:dogAllOfBreedL"},{"display_html":"enumArraysJustSymbolL :: Lens_' EnumArrays (Maybe E'JustSymbol)","name":"enumArraysJustSymbolL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumArraysJustSymbolL"},{"display_html":"enumArraysArrayEnumL :: Lens_' EnumArrays (Maybe [E'ArrayEnum])","name":"enumArraysArrayEnumL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumArraysArrayEnumL"},{"display_html":"enumTestEnumStringL :: Lens_' EnumTest (Maybe E'EnumString)","name":"enumTestEnumStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumTestEnumStringL"},{"display_html":"enumTestEnumStringRequiredL :: Lens_' EnumTest E'EnumString","name":"enumTestEnumStringRequiredL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumTestEnumStringRequiredL"},{"display_html":"enumTestEnumIntegerL :: Lens_' EnumTest (Maybe E'EnumInteger)","name":"enumTestEnumIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumTestEnumIntegerL"},{"display_html":"enumTestEnumNumberL :: Lens_' EnumTest (Maybe E'EnumNumber)","name":"enumTestEnumNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumTestEnumNumberL"},{"display_html":"enumTestOuterEnumL :: Lens_' EnumTest (Maybe OuterEnum)","name":"enumTestOuterEnumL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumTestOuterEnumL"},{"display_html":"fileSourceUriL :: Lens_' File (Maybe Text)","name":"fileSourceUriL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:fileSourceUriL"},{"display_html":"fileSchemaTestClassFileL :: Lens_' FileSchemaTestClass (Maybe File)","name":"fileSchemaTestClassFileL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:fileSchemaTestClassFileL"},{"display_html":"fileSchemaTestClassFilesL :: Lens_' FileSchemaTestClass (Maybe [File])","name":"fileSchemaTestClassFilesL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:fileSchemaTestClassFilesL"},{"display_html":"formatTestIntegerL :: Lens_' FormatTest (Maybe Int)","name":"formatTestIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestIntegerL"},{"display_html":"formatTestInt32L :: Lens_' FormatTest (Maybe Int)","name":"formatTestInt32L","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestInt32L"},{"display_html":"formatTestInt64L :: Lens_' FormatTest (Maybe Integer)","name":"formatTestInt64L","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestInt64L"},{"display_html":"formatTestNumberL :: Lens_' FormatTest Double","name":"formatTestNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestNumberL"},{"display_html":"formatTestFloatL :: Lens_' FormatTest (Maybe Float)","name":"formatTestFloatL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestFloatL"},{"display_html":"formatTestDoubleL :: Lens_' FormatTest (Maybe Double)","name":"formatTestDoubleL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestDoubleL"},{"display_html":"formatTestStringL :: Lens_' FormatTest (Maybe Text)","name":"formatTestStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestStringL"},{"display_html":"formatTestByteL :: Lens_' FormatTest ByteArray","name":"formatTestByteL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestByteL"},{"display_html":"formatTestBinaryL :: Lens_' FormatTest (Maybe FilePath)","name":"formatTestBinaryL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestBinaryL"},{"display_html":"formatTestDateL :: Lens_' FormatTest Date","name":"formatTestDateL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestDateL"},{"display_html":"formatTestDateTimeL :: Lens_' FormatTest (Maybe DateTime)","name":"formatTestDateTimeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestDateTimeL"},{"display_html":"formatTestUuidL :: Lens_' FormatTest (Maybe Text)","name":"formatTestUuidL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestUuidL"},{"display_html":"formatTestPasswordL :: Lens_' FormatTest Text","name":"formatTestPasswordL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestPasswordL"},{"display_html":"hasOnlyReadOnlyBarL :: Lens_' HasOnlyReadOnly (Maybe Text)","name":"hasOnlyReadOnlyBarL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:hasOnlyReadOnlyBarL"},{"display_html":"hasOnlyReadOnlyFooL :: Lens_' HasOnlyReadOnly (Maybe Text)","name":"hasOnlyReadOnlyFooL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:hasOnlyReadOnlyFooL"},{"display_html":"mapTestMapMapOfStringL :: Lens_' MapTest (Maybe (Map String (Map String Text)))","name":"mapTestMapMapOfStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mapTestMapMapOfStringL"},{"display_html":"mapTestMapOfEnumStringL :: Lens_' MapTest (Maybe (Map String E'Inner))","name":"mapTestMapOfEnumStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mapTestMapOfEnumStringL"},{"display_html":"mapTestDirectMapL :: Lens_' MapTest (Maybe (Map String Bool))","name":"mapTestDirectMapL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mapTestDirectMapL"},{"display_html":"mapTestIndirectMapL :: Lens_' MapTest (Maybe (Map String Bool))","name":"mapTestIndirectMapL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mapTestIndirectMapL"},{"display_html":"mixedPropertiesAndAdditionalPropertiesClassUuidL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe Text)","name":"mixedPropertiesAndAdditionalPropertiesClassUuidL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mixedPropertiesAndAdditionalPropertiesClassUuidL"},{"display_html":"mixedPropertiesAndAdditionalPropertiesClassDateTimeL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe DateTime)","name":"mixedPropertiesAndAdditionalPropertiesClassDateTimeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mixedPropertiesAndAdditionalPropertiesClassDateTimeL"},{"display_html":"mixedPropertiesAndAdditionalPropertiesClassMapL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe (Map String Animal))","name":"mixedPropertiesAndAdditionalPropertiesClassMapL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mixedPropertiesAndAdditionalPropertiesClassMapL"},{"display_html":"model200ResponseNameL :: Lens_' Model200Response (Maybe Int)","name":"model200ResponseNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:model200ResponseNameL"},{"display_html":"model200ResponseClassL :: Lens_' Model200Response (Maybe Text)","name":"model200ResponseClassL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:model200ResponseClassL"},{"display_html":"modelList123listL :: Lens_' ModelList (Maybe Text)","name":"modelList123listL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:modelList123listL"},{"display_html":"modelReturnReturnL :: Lens_' ModelReturn (Maybe Int)","name":"modelReturnReturnL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:modelReturnReturnL"},{"display_html":"nameNameL :: Lens_' Name Int","name":"nameNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:nameNameL"},{"display_html":"nameSnakeCaseL :: Lens_' Name (Maybe Int)","name":"nameSnakeCaseL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:nameSnakeCaseL"},{"display_html":"namePropertyL :: Lens_' Name (Maybe Text)","name":"namePropertyL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:namePropertyL"},{"display_html":"name123numberL :: Lens_' Name (Maybe Int)","name":"name123numberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:name123numberL"},{"display_html":"numberOnlyJustNumberL :: Lens_' NumberOnly (Maybe Double)","name":"numberOnlyJustNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:numberOnlyJustNumberL"},{"display_html":"orderIdL :: Lens_' Order (Maybe Integer)","name":"orderIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderIdL"},{"display_html":"orderPetIdL :: Lens_' Order (Maybe Integer)","name":"orderPetIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderPetIdL"},{"display_html":"orderQuantityL :: Lens_' Order (Maybe Int)","name":"orderQuantityL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderQuantityL"},{"display_html":"orderShipDateL :: Lens_' Order (Maybe DateTime)","name":"orderShipDateL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderShipDateL"},{"display_html":"orderStatusL :: Lens_' Order (Maybe E'Status)","name":"orderStatusL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderStatusL"},{"display_html":"orderCompleteL :: Lens_' Order (Maybe Bool)","name":"orderCompleteL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderCompleteL"},{"display_html":"outerCompositeMyNumberL :: Lens_' OuterComposite (Maybe Double)","name":"outerCompositeMyNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:outerCompositeMyNumberL"},{"display_html":"outerCompositeMyStringL :: Lens_' OuterComposite (Maybe Text)","name":"outerCompositeMyStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:outerCompositeMyStringL"},{"display_html":"outerCompositeMyBooleanL :: Lens_' OuterComposite (Maybe Bool)","name":"outerCompositeMyBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:outerCompositeMyBooleanL"},{"display_html":"petIdL :: Lens_' Pet (Maybe Integer)","name":"petIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petIdL"},{"display_html":"petCategoryL :: Lens_' Pet (Maybe Category)","name":"petCategoryL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petCategoryL"},{"display_html":"petNameL :: Lens_' Pet Text","name":"petNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petNameL"},{"display_html":"petPhotoUrlsL :: Lens_' Pet [Text]","name":"petPhotoUrlsL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petPhotoUrlsL"},{"display_html":"petTagsL :: Lens_' Pet (Maybe [Tag])","name":"petTagsL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petTagsL"},{"display_html":"petStatusL :: Lens_' Pet (Maybe E'Status2)","name":"petStatusL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petStatusL"},{"display_html":"readOnlyFirstBarL :: Lens_' ReadOnlyFirst (Maybe Text)","name":"readOnlyFirstBarL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:readOnlyFirstBarL"},{"display_html":"readOnlyFirstBazL :: Lens_' ReadOnlyFirst (Maybe Text)","name":"readOnlyFirstBazL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:readOnlyFirstBazL"},{"display_html":"specialModelNameSpecialPropertyNameL :: Lens_' SpecialModelName (Maybe Integer)","name":"specialModelNameSpecialPropertyNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:specialModelNameSpecialPropertyNameL"},{"display_html":"tagIdL :: Lens_' Tag (Maybe Integer)","name":"tagIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:tagIdL"},{"display_html":"tagNameL :: Lens_' Tag (Maybe Text)","name":"tagNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:tagNameL"},{"display_html":"typeHolderDefaultStringItemL :: Lens_' TypeHolderDefault Text","name":"typeHolderDefaultStringItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderDefaultStringItemL"},{"display_html":"typeHolderDefaultNumberItemL :: Lens_' TypeHolderDefault Double","name":"typeHolderDefaultNumberItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderDefaultNumberItemL"},{"display_html":"typeHolderDefaultIntegerItemL :: Lens_' TypeHolderDefault Int","name":"typeHolderDefaultIntegerItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderDefaultIntegerItemL"},{"display_html":"typeHolderDefaultBoolItemL :: Lens_' TypeHolderDefault Bool","name":"typeHolderDefaultBoolItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderDefaultBoolItemL"},{"display_html":"typeHolderDefaultArrayItemL :: Lens_' TypeHolderDefault [Int]","name":"typeHolderDefaultArrayItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderDefaultArrayItemL"},{"display_html":"typeHolderExampleStringItemL :: Lens_' TypeHolderExample Text","name":"typeHolderExampleStringItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleStringItemL"},{"display_html":"typeHolderExampleNumberItemL :: Lens_' TypeHolderExample Double","name":"typeHolderExampleNumberItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleNumberItemL"},{"display_html":"typeHolderExampleIntegerItemL :: Lens_' TypeHolderExample Int","name":"typeHolderExampleIntegerItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleIntegerItemL"},{"display_html":"typeHolderExampleBoolItemL :: Lens_' TypeHolderExample Bool","name":"typeHolderExampleBoolItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleBoolItemL"},{"display_html":"typeHolderExampleArrayItemL :: Lens_' TypeHolderExample [Int]","name":"typeHolderExampleArrayItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleArrayItemL"},{"display_html":"userIdL :: Lens_' User (Maybe Integer)","name":"userIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userIdL"},{"display_html":"userUsernameL :: Lens_' User (Maybe Text)","name":"userUsernameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userUsernameL"},{"display_html":"userFirstNameL :: Lens_' User (Maybe Text)","name":"userFirstNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userFirstNameL"},{"display_html":"userLastNameL :: Lens_' User (Maybe Text)","name":"userLastNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userLastNameL"},{"display_html":"userEmailL :: Lens_' User (Maybe Text)","name":"userEmailL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userEmailL"},{"display_html":"userPasswordL :: Lens_' User (Maybe Text)","name":"userPasswordL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userPasswordL"},{"display_html":"userPhoneL :: Lens_' User (Maybe Text)","name":"userPhoneL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userPhoneL"},{"display_html":"userUserStatusL :: Lens_' User (Maybe Int)","name":"userUserStatusL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userUserStatusL"},{"display_html":"xmlItemAttributeStringL :: Lens_' XmlItem (Maybe Text)","name":"xmlItemAttributeStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemAttributeStringL"},{"display_html":"xmlItemAttributeNumberL :: Lens_' XmlItem (Maybe Double)","name":"xmlItemAttributeNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemAttributeNumberL"},{"display_html":"xmlItemAttributeIntegerL :: Lens_' XmlItem (Maybe Int)","name":"xmlItemAttributeIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemAttributeIntegerL"},{"display_html":"xmlItemAttributeBooleanL :: Lens_' XmlItem (Maybe Bool)","name":"xmlItemAttributeBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemAttributeBooleanL"},{"display_html":"xmlItemWrappedArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemWrappedArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemWrappedArrayL"},{"display_html":"xmlItemNameStringL :: Lens_' XmlItem (Maybe Text)","name":"xmlItemNameStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameStringL"},{"display_html":"xmlItemNameNumberL :: Lens_' XmlItem (Maybe Double)","name":"xmlItemNameNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameNumberL"},{"display_html":"xmlItemNameIntegerL :: Lens_' XmlItem (Maybe Int)","name":"xmlItemNameIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameIntegerL"},{"display_html":"xmlItemNameBooleanL :: Lens_' XmlItem (Maybe Bool)","name":"xmlItemNameBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameBooleanL"},{"display_html":"xmlItemNameArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemNameArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameArrayL"},{"display_html":"xmlItemNameWrappedArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemNameWrappedArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameWrappedArrayL"},{"display_html":"xmlItemPrefixStringL :: Lens_' XmlItem (Maybe Text)","name":"xmlItemPrefixStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixStringL"},{"display_html":"xmlItemPrefixNumberL :: Lens_' XmlItem (Maybe Double)","name":"xmlItemPrefixNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNumberL"},{"display_html":"xmlItemPrefixIntegerL :: Lens_' XmlItem (Maybe Int)","name":"xmlItemPrefixIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixIntegerL"},{"display_html":"xmlItemPrefixBooleanL :: Lens_' XmlItem (Maybe Bool)","name":"xmlItemPrefixBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixBooleanL"},{"display_html":"xmlItemPrefixArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemPrefixArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixArrayL"},{"display_html":"xmlItemPrefixWrappedArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemPrefixWrappedArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixWrappedArrayL"},{"display_html":"xmlItemNamespaceStringL :: Lens_' XmlItem (Maybe Text)","name":"xmlItemNamespaceStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceStringL"},{"display_html":"xmlItemNamespaceNumberL :: Lens_' XmlItem (Maybe Double)","name":"xmlItemNamespaceNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceNumberL"},{"display_html":"xmlItemNamespaceIntegerL :: Lens_' XmlItem (Maybe Int)","name":"xmlItemNamespaceIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceIntegerL"},{"display_html":"xmlItemNamespaceBooleanL :: Lens_' XmlItem (Maybe Bool)","name":"xmlItemNamespaceBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceBooleanL"},{"display_html":"xmlItemNamespaceArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemNamespaceArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceArrayL"},{"display_html":"xmlItemNamespaceWrappedArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemNamespaceWrappedArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceWrappedArrayL"},{"display_html":"xmlItemPrefixNsStringL :: Lens_' XmlItem (Maybe Text)","name":"xmlItemPrefixNsStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsStringL"},{"display_html":"xmlItemPrefixNsNumberL :: Lens_' XmlItem (Maybe Double)","name":"xmlItemPrefixNsNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsNumberL"},{"display_html":"xmlItemPrefixNsIntegerL :: Lens_' XmlItem (Maybe Int)","name":"xmlItemPrefixNsIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsIntegerL"},{"display_html":"xmlItemPrefixNsBooleanL :: Lens_' XmlItem (Maybe Bool)","name":"xmlItemPrefixNsBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsBooleanL"},{"display_html":"xmlItemPrefixNsArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemPrefixNsArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsArrayL"},{"display_html":"xmlItemPrefixNsWrappedArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemPrefixNsWrappedArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsWrappedArrayL"},{"display_html":"module OpenAPIPetstore.API","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.Client","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.Core","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.Logging","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.MimeTypes","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.Model","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.ModelLens","name":"","module":"OpenAPIPetstore","link":""}] \ No newline at end of file +[{"display_html":"type LogExecWithContext = forall m. MonadIO m => LogContext -> LogExec m","name":"LogExecWithContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#t:LogExecWithContext"},{"display_html":"type LogExec m = forall a. KatipT m a -> m a","name":"LogExec","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#t:LogExec"},{"display_html":"type LogContext = LogEnv","name":"LogContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#t:LogContext"},{"display_html":"type LogLevel = Severity","name":"LogLevel","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#t:LogLevel"},{"display_html":"initLogContext :: IO LogContext","name":"initLogContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:initLogContext"},{"display_html":"runDefaultLogExecWithContext :: LogExecWithContext","name":"runDefaultLogExecWithContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:runDefaultLogExecWithContext"},{"display_html":"stdoutLoggingExec :: LogExecWithContext","name":"stdoutLoggingExec","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:stdoutLoggingExec"},{"display_html":"stdoutLoggingContext :: LogContext -> IO LogContext","name":"stdoutLoggingContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:stdoutLoggingContext"},{"display_html":"stderrLoggingExec :: LogExecWithContext","name":"stderrLoggingExec","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:stderrLoggingExec"},{"display_html":"stderrLoggingContext :: LogContext -> IO LogContext","name":"stderrLoggingContext","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:stderrLoggingContext"},{"display_html":"runNullLogExec :: LogExecWithContext","name":"runNullLogExec","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:runNullLogExec"},{"display_html":"_log :: (Applicative m, Katip m) => Text -> LogLevel -> Text -> m ()","name":"_log","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:_log"},{"display_html":"logExceptions :: (Katip m, MonadCatch m, Applicative m) => Text -> m a -> m a","name":"logExceptions","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:logExceptions"},{"display_html":"levelInfo :: LogLevel","name":"levelInfo","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:levelInfo"},{"display_html":"levelError :: LogLevel","name":"levelError","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:levelError"},{"display_html":"levelDebug :: LogLevel","name":"levelDebug","module":"OpenAPIPetstore.Logging","link":"OpenAPIPetstore-Logging.html#v:levelDebug"},{"display_html":"data ContentType a = MimeType a => ContentType {}","name":"ContentType ContentType unContentType","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:ContentType"},{"display_html":"data Accept a = MimeType a => Accept {}","name":"Accept Accept unAccept","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:Accept"},{"display_html":"class MimeType mtype => Consumes req mtype","name":"Consumes","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:Consumes"},{"display_html":"class MimeType mtype => Produces req mtype","name":"Produces","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:Produces"},{"display_html":"data MimeJSON = MimeJSON","name":"MimeJSON MimeJSON","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeJSON"},{"display_html":"data MimeXML = MimeXML","name":"MimeXML MimeXML","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeXML"},{"display_html":"data MimePlainText = MimePlainText","name":"MimePlainText MimePlainText","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimePlainText"},{"display_html":"data MimeFormUrlEncoded = MimeFormUrlEncoded","name":"MimeFormUrlEncoded MimeFormUrlEncoded","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeFormUrlEncoded"},{"display_html":"data MimeMultipartFormData = MimeMultipartFormData","name":"MimeMultipartFormData MimeMultipartFormData","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeMultipartFormData"},{"display_html":"data MimeOctetStream = MimeOctetStream","name":"MimeOctetStream MimeOctetStream","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeOctetStream"},{"display_html":"data MimeNoContent = MimeNoContent","name":"MimeNoContent MimeNoContent","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeNoContent"},{"display_html":"data MimeAny = MimeAny","name":"MimeAny MimeAny","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeAny"},{"display_html":"data NoContent = NoContent","name":"NoContent NoContent","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:NoContent"},{"display_html":"class Typeable mtype => MimeType mtype where","name":"MimeType mimeTypes' mimeType' mimeTypes mimeType","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeType"},{"display_html":"class MimeType mtype => MimeRender mtype x where","name":"MimeRender mimeRender' mimeRender","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeRender"},{"display_html":"mimeRenderDefaultMultipartFormData :: ToHttpApiData a => a -> ByteString","name":"mimeRenderDefaultMultipartFormData","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#v:mimeRenderDefaultMultipartFormData"},{"display_html":"class MimeType mtype => MimeUnrender mtype o where","name":"MimeUnrender mimeUnrender' mimeUnrender","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeUnrender"},{"display_html":"data MimeXmlCharsetutf16 = MimeXmlCharsetutf16","name":"MimeXmlCharsetutf16 MimeXmlCharsetutf16","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeXmlCharsetutf16"},{"display_html":"data MimeXmlCharsetutf8 = MimeXmlCharsetutf8","name":"MimeXmlCharsetutf8 MimeXmlCharsetutf8","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeXmlCharsetutf8"},{"display_html":"data MimeTextXml = MimeTextXml","name":"MimeTextXml MimeTextXml","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeTextXml"},{"display_html":"data MimeTextXmlCharsetutf16 = MimeTextXmlCharsetutf16","name":"MimeTextXmlCharsetutf16 MimeTextXmlCharsetutf16","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeTextXmlCharsetutf16"},{"display_html":"data MimeTextXmlCharsetutf8 = MimeTextXmlCharsetutf8","name":"MimeTextXmlCharsetutf8 MimeTextXmlCharsetutf8","module":"OpenAPIPetstore.MimeTypes","link":"OpenAPIPetstore-MimeTypes.html#t:MimeTextXmlCharsetutf8"},{"display_html":"data OpenAPIPetstoreConfig = OpenAPIPetstoreConfig {}","name":"OpenAPIPetstoreConfig OpenAPIPetstoreConfig configValidateAuthMethods configAuthMethods configLogContext configLogExecWithContext configUserAgent configHost","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:OpenAPIPetstoreConfig"},{"display_html":"newConfig :: IO OpenAPIPetstoreConfig","name":"newConfig","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:newConfig"},{"display_html":"addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig","name":"addAuthMethod","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:addAuthMethod"},{"display_html":"withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig","name":"withStdoutLogging","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:withStdoutLogging"},{"display_html":"withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig","name":"withStderrLogging","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:withStderrLogging"},{"display_html":"withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig","name":"withNoLogging","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:withNoLogging"},{"display_html":"data OpenAPIPetstoreRequest req contentType res accept = OpenAPIPetstoreRequest {}","name":"OpenAPIPetstoreRequest OpenAPIPetstoreRequest rAuthTypes rParams rUrlPath rMethod","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:OpenAPIPetstoreRequest"},{"display_html":"rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Method","name":"rMethodL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:rMethodL"},{"display_html":"rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [ByteString]","name":"rUrlPathL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:rUrlPathL"},{"display_html":"rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params","name":"rParamsL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:rParamsL"},{"display_html":"rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [TypeRep]","name":"rAuthTypesL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:rAuthTypesL"},{"display_html":"class HasBodyParam req param where","name":"HasBodyParam setBodyParam","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:HasBodyParam"},{"display_html":"class HasOptionalParam req param where","name":"HasOptionalParam -&- applyOptionalParam","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:HasOptionalParam"},{"display_html":"data Params = Params {}","name":"Params Params paramsBody paramsHeaders paramsQuery","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:Params"},{"display_html":"paramsQueryL :: Lens_' Params Query","name":"paramsQueryL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:paramsQueryL"},{"display_html":"paramsHeadersL :: Lens_' Params RequestHeaders","name":"paramsHeadersL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:paramsHeadersL"},{"display_html":"paramsBodyL :: Lens_' Params ParamBody","name":"paramsBodyL","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:paramsBodyL"},{"display_html":"data ParamBody","name":"ParamBody ParamBodyMultipartFormData ParamBodyFormUrlEncoded ParamBodyBL ParamBodyB ParamBodyNone","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:ParamBody"},{"display_html":"_mkRequest :: Method -> [ByteString] -> OpenAPIPetstoreRequest req contentType res accept","name":"_mkRequest","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_mkRequest"},{"display_html":"_mkParams :: Params","name":"_mkParams","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_mkParams"},{"display_html":"setHeader :: OpenAPIPetstoreRequest req contentType res accept -> [Header] -> OpenAPIPetstoreRequest req contentType res accept","name":"setHeader","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:setHeader"},{"display_html":"removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [HeaderName] -> OpenAPIPetstoreRequest req contentType res accept","name":"removeHeader","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:removeHeader"},{"display_html":"_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept","name":"_setContentTypeHeader","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_setContentTypeHeader"},{"display_html":"_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept","name":"_setAcceptHeader","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_setAcceptHeader"},{"display_html":"setQuery :: OpenAPIPetstoreRequest req contentType res accept -> [QueryItem] -> OpenAPIPetstoreRequest req contentType res accept","name":"setQuery","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:setQuery"},{"display_html":"addForm :: OpenAPIPetstoreRequest req contentType res accept -> Form -> OpenAPIPetstoreRequest req contentType res accept","name":"addForm","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:addForm"},{"display_html":"_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> Part -> OpenAPIPetstoreRequest req contentType res accept","name":"_addMultiFormPart","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_addMultiFormPart"},{"display_html":"_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept","name":"_setBodyBS","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_setBodyBS"},{"display_html":"_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept","name":"_setBodyLBS","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_setBodyLBS"},{"display_html":"_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept","name":"_hasAuthType","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_hasAuthType"},{"display_html":"toPath :: ToHttpApiData a => a -> ByteString","name":"toPath","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toPath"},{"display_html":"toHeader :: ToHttpApiData a => (HeaderName, a) -> [Header]","name":"toHeader","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toHeader"},{"display_html":"toForm :: ToHttpApiData v => (ByteString, v) -> Form","name":"toForm","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toForm"},{"display_html":"toQuery :: ToHttpApiData a => (ByteString, Maybe a) -> [QueryItem]","name":"toQuery","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toQuery"},{"display_html":"data CollectionFormat","name":"CollectionFormat MultiParamArray PipeSeparated TabSeparated SpaceSeparated CommaSeparated","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:CollectionFormat"},{"display_html":"toHeaderColl :: ToHttpApiData a => CollectionFormat -> (HeaderName, [a]) -> [Header]","name":"toHeaderColl","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toHeaderColl"},{"display_html":"toFormColl :: ToHttpApiData v => CollectionFormat -> (ByteString, [v]) -> Form","name":"toFormColl","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toFormColl"},{"display_html":"toQueryColl :: ToHttpApiData a => CollectionFormat -> (ByteString, Maybe [a]) -> Query","name":"toQueryColl","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:toQueryColl"},{"display_html":"_toColl :: Traversable f => CollectionFormat -> (f a -> [(b, ByteString)]) -> f [a] -> [(b, ByteString)]","name":"_toColl","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_toColl"},{"display_html":"_toCollA :: (Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t ByteString)]) -> f (t [a]) -> [(b, t ByteString)]","name":"_toCollA","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_toCollA"},{"display_html":"_toCollA' :: (Monoid c, Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)]","name":"_toCollA'","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_toCollA-39-"},{"display_html":"class Typeable a => AuthMethod a where","name":"AuthMethod applyAuthMethod","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:AuthMethod"},{"display_html":"data AnyAuthMethod = AuthMethod a => AnyAuthMethod a","name":"AnyAuthMethod AnyAuthMethod","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:AnyAuthMethod"},{"display_html":"data AuthMethodException = AuthMethodException String","name":"AuthMethodException AuthMethodException","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:AuthMethodException"},{"display_html":"_applyAuthMethods :: OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreConfig -> IO (OpenAPIPetstoreRequest req contentType res accept)","name":"_applyAuthMethods","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_applyAuthMethods"},{"display_html":"_omitNulls :: [(Text, Value)] -> Value","name":"_omitNulls","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_omitNulls"},{"display_html":"_toFormItem :: (ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text])","name":"_toFormItem","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_toFormItem"},{"display_html":"_emptyToNothing :: Maybe String -> Maybe String","name":"_emptyToNothing","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_emptyToNothing"},{"display_html":"_memptyToNothing :: (Monoid a, Eq a) => Maybe a -> Maybe a","name":"_memptyToNothing","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_memptyToNothing"},{"display_html":"newtype DateTime = DateTime {}","name":"DateTime DateTime unDateTime","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:DateTime"},{"display_html":"_readDateTime :: (ParseTime t, Monad m, Alternative m) => String -> m t","name":"_readDateTime","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_readDateTime"},{"display_html":"_showDateTime :: (t ~ UTCTime, FormatTime t) => t -> String","name":"_showDateTime","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_showDateTime"},{"display_html":"_parseISO8601 :: (ParseTime t, Monad m, Alternative m) => String -> m t","name":"_parseISO8601","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_parseISO8601"},{"display_html":"newtype Date = Date {}","name":"Date Date unDate","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:Date"},{"display_html":"_readDate :: (ParseTime t, Monad m) => String -> m t","name":"_readDate","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_readDate"},{"display_html":"_showDate :: FormatTime t => t -> String","name":"_showDate","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_showDate"},{"display_html":"newtype ByteArray = ByteArray {}","name":"ByteArray ByteArray unByteArray","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:ByteArray"},{"display_html":"_readByteArray :: Monad m => Text -> m ByteArray","name":"_readByteArray","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_readByteArray"},{"display_html":"_showByteArray :: ByteArray -> Text","name":"_showByteArray","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_showByteArray"},{"display_html":"newtype Binary = Binary {}","name":"Binary Binary unBinary","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:Binary"},{"display_html":"_readBinaryBase64 :: Monad m => Text -> m Binary","name":"_readBinaryBase64","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_readBinaryBase64"},{"display_html":"_showBinaryBase64 :: Binary -> Text","name":"_showBinaryBase64","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#v:_showBinaryBase64"},{"display_html":"type Lens_' s a = Lens_ s s a a","name":"Lens_'","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:Lens_-39-"},{"display_html":"type Lens_ s t a b = forall (f :: * -> *). Functor f => (a -> f b) -> s -> f t","name":"Lens_","module":"OpenAPIPetstore.Core","link":"OpenAPIPetstore-Core.html#t:Lens_"},{"display_html":"dispatchLbs :: (Produces req accept, MimeType contentType) => Manager -> OpenAPIPetstoreConfig -> OpenAPIPetstoreRequest req contentType res accept -> IO (Response ByteString)","name":"dispatchLbs","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:dispatchLbs"},{"display_html":"data MimeResult res = MimeResult {}","name":"MimeResult MimeResult mimeResultResponse mimeResult","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#t:MimeResult"},{"display_html":"data MimeError = MimeError {}","name":"MimeError MimeError mimeErrorResponse mimeError","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#t:MimeError"},{"display_html":"dispatchMime :: forall req contentType res accept. (Produces req accept, MimeUnrender accept res, MimeType contentType) => Manager -> OpenAPIPetstoreConfig -> OpenAPIPetstoreRequest req contentType res accept -> IO (MimeResult res)","name":"dispatchMime","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:dispatchMime"},{"display_html":"dispatchMime' :: (Produces req accept, MimeUnrender accept res, MimeType contentType) => Manager -> OpenAPIPetstoreConfig -> OpenAPIPetstoreRequest req contentType res accept -> IO (Either MimeError res)","name":"dispatchMime'","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:dispatchMime-39-"},{"display_html":"dispatchLbsUnsafe :: (MimeType accept, MimeType contentType) => Manager -> OpenAPIPetstoreConfig -> OpenAPIPetstoreRequest req contentType res accept -> IO (Response ByteString)","name":"dispatchLbsUnsafe","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:dispatchLbsUnsafe"},{"display_html":"dispatchInitUnsafe :: Manager -> OpenAPIPetstoreConfig -> InitRequest req contentType res accept -> IO (Response ByteString)","name":"dispatchInitUnsafe","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:dispatchInitUnsafe"},{"display_html":"newtype InitRequest req contentType res accept = InitRequest {}","name":"InitRequest InitRequest unInitRequest","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#t:InitRequest"},{"display_html":"_toInitRequest :: (MimeType accept, MimeType contentType) => OpenAPIPetstoreConfig -> OpenAPIPetstoreRequest req contentType res accept -> IO (InitRequest req contentType res accept)","name":"_toInitRequest","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:_toInitRequest"},{"display_html":"modifyInitRequest :: InitRequest req contentType res accept -> (Request -> Request) -> InitRequest req contentType res accept","name":"modifyInitRequest","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:modifyInitRequest"},{"display_html":"modifyInitRequestM :: Monad m => InitRequest req contentType res accept -> (Request -> m Request) -> m (InitRequest req contentType res accept)","name":"modifyInitRequestM","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:modifyInitRequestM"},{"display_html":"runConfigLog :: MonadIO m => OpenAPIPetstoreConfig -> LogExec m","name":"runConfigLog","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:runConfigLog"},{"display_html":"runConfigLogWithExceptions :: (MonadCatch m, MonadIO m) => Text -> OpenAPIPetstoreConfig -> LogExec m","name":"runConfigLogWithExceptions","module":"OpenAPIPetstore.Client","link":"OpenAPIPetstore-Client.html#v:runConfigLogWithExceptions"},{"display_html":"newtype AdditionalMetadata = AdditionalMetadata {}","name":"AdditionalMetadata AdditionalMetadata unAdditionalMetadata","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalMetadata"},{"display_html":"newtype ApiKey = ApiKey {}","name":"ApiKey ApiKey unApiKey","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ApiKey"},{"display_html":"newtype Body = Body {}","name":"Body Body unBody","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Body"},{"display_html":"newtype BodyBool = BodyBool {}","name":"BodyBool BodyBool unBodyBool","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:BodyBool"},{"display_html":"newtype BodyDouble = BodyDouble {}","name":"BodyDouble BodyDouble unBodyDouble","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:BodyDouble"},{"display_html":"newtype BodyText = BodyText {}","name":"BodyText BodyText unBodyText","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:BodyText"},{"display_html":"newtype BooleanGroup = BooleanGroup {}","name":"BooleanGroup BooleanGroup unBooleanGroup","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:BooleanGroup"},{"display_html":"newtype Byte = Byte {}","name":"Byte Byte unByte","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Byte"},{"display_html":"newtype Callback = Callback {}","name":"Callback Callback unCallback","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Callback"},{"display_html":"newtype Context = Context {}","name":"Context Context unContext","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Context"},{"display_html":"newtype EnumFormString = EnumFormString {}","name":"EnumFormString EnumFormString unEnumFormString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumFormString"},{"display_html":"newtype EnumFormStringArray = EnumFormStringArray {}","name":"EnumFormStringArray EnumFormStringArray unEnumFormStringArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumFormStringArray"},{"display_html":"newtype EnumHeaderString = EnumHeaderString {}","name":"EnumHeaderString EnumHeaderString unEnumHeaderString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumHeaderString"},{"display_html":"newtype EnumHeaderStringArray = EnumHeaderStringArray {}","name":"EnumHeaderStringArray EnumHeaderStringArray unEnumHeaderStringArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumHeaderStringArray"},{"display_html":"newtype EnumQueryDouble = EnumQueryDouble {}","name":"EnumQueryDouble EnumQueryDouble unEnumQueryDouble","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumQueryDouble"},{"display_html":"newtype EnumQueryInteger = EnumQueryInteger {}","name":"EnumQueryInteger EnumQueryInteger unEnumQueryInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumQueryInteger"},{"display_html":"newtype EnumQueryString = EnumQueryString {}","name":"EnumQueryString EnumQueryString unEnumQueryString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumQueryString"},{"display_html":"newtype EnumQueryStringArray = EnumQueryStringArray {}","name":"EnumQueryStringArray EnumQueryStringArray unEnumQueryStringArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumQueryStringArray"},{"display_html":"newtype File2 = File2 {}","name":"File2 File2 unFile2","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:File2"},{"display_html":"newtype Http = Http {}","name":"Http Http unHttp","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Http"},{"display_html":"newtype Int32 = Int32 {}","name":"Int32 Int32 unInt32","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Int32"},{"display_html":"newtype Int64 = Int64 {}","name":"Int64 Int64 unInt64","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Int64"},{"display_html":"newtype Int64Group = Int64Group {}","name":"Int64Group Int64Group unInt64Group","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Int64Group"},{"display_html":"newtype Ioutil = Ioutil {}","name":"Ioutil Ioutil unIoutil","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Ioutil"},{"display_html":"newtype Name2 = Name2 {}","name":"Name2 Name2 unName2","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Name2"},{"display_html":"newtype Number = Number {}","name":"Number Number unNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Number"},{"display_html":"newtype OrderId = OrderId {}","name":"OrderId OrderId unOrderId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:OrderId"},{"display_html":"newtype OrderIdText = OrderIdText {}","name":"OrderIdText OrderIdText unOrderIdText","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:OrderIdText"},{"display_html":"newtype Param = Param {}","name":"Param Param unParam","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Param"},{"display_html":"newtype Param2 = Param2 {}","name":"Param2 Param2 unParam2","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Param2"},{"display_html":"newtype ParamBinary = ParamBinary {}","name":"ParamBinary ParamBinary unParamBinary","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamBinary"},{"display_html":"newtype ParamDate = ParamDate {}","name":"ParamDate ParamDate unParamDate","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamDate"},{"display_html":"newtype ParamDateTime = ParamDateTime {}","name":"ParamDateTime ParamDateTime unParamDateTime","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamDateTime"},{"display_html":"newtype ParamDouble = ParamDouble {}","name":"ParamDouble ParamDouble unParamDouble","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamDouble"},{"display_html":"newtype ParamFloat = ParamFloat {}","name":"ParamFloat ParamFloat unParamFloat","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamFloat"},{"display_html":"newtype ParamInteger = ParamInteger {}","name":"ParamInteger ParamInteger unParamInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamInteger"},{"display_html":"newtype ParamMapMapStringText = ParamMapMapStringText {}","name":"ParamMapMapStringText ParamMapMapStringText unParamMapMapStringText","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamMapMapStringText"},{"display_html":"newtype ParamString = ParamString {}","name":"ParamString ParamString unParamString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ParamString"},{"display_html":"newtype Password = Password {}","name":"Password Password unPassword","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Password"},{"display_html":"newtype PatternWithoutDelimiter = PatternWithoutDelimiter {}","name":"PatternWithoutDelimiter PatternWithoutDelimiter unPatternWithoutDelimiter","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:PatternWithoutDelimiter"},{"display_html":"newtype PetId = PetId {}","name":"PetId PetId unPetId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:PetId"},{"display_html":"newtype Pipe = Pipe {}","name":"Pipe Pipe unPipe","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Pipe"},{"display_html":"newtype Query = Query {}","name":"Query Query unQuery","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Query"},{"display_html":"newtype RequiredBooleanGroup = RequiredBooleanGroup {}","name":"RequiredBooleanGroup RequiredBooleanGroup unRequiredBooleanGroup","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:RequiredBooleanGroup"},{"display_html":"newtype RequiredFile = RequiredFile {}","name":"RequiredFile RequiredFile unRequiredFile","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:RequiredFile"},{"display_html":"newtype RequiredInt64Group = RequiredInt64Group {}","name":"RequiredInt64Group RequiredInt64Group unRequiredInt64Group","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:RequiredInt64Group"},{"display_html":"newtype RequiredStringGroup = RequiredStringGroup {}","name":"RequiredStringGroup RequiredStringGroup unRequiredStringGroup","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:RequiredStringGroup"},{"display_html":"newtype Status = Status {}","name":"Status Status unStatus","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Status"},{"display_html":"newtype StatusText = StatusText {}","name":"StatusText StatusText unStatusText","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:StatusText"},{"display_html":"newtype StringGroup = StringGroup {}","name":"StringGroup StringGroup unStringGroup","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:StringGroup"},{"display_html":"newtype Tags = Tags {}","name":"Tags Tags unTags","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Tags"},{"display_html":"newtype Url = Url {}","name":"Url Url unUrl","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Url"},{"display_html":"newtype Username = Username {}","name":"Username Username unUsername","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Username"},{"display_html":"data AdditionalPropertiesAnyType = AdditionalPropertiesAnyType {}","name":"AdditionalPropertiesAnyType AdditionalPropertiesAnyType additionalPropertiesAnyTypeName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesAnyType"},{"display_html":"mkAdditionalPropertiesAnyType :: AdditionalPropertiesAnyType","name":"mkAdditionalPropertiesAnyType","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesAnyType"},{"display_html":"data AdditionalPropertiesArray = AdditionalPropertiesArray {}","name":"AdditionalPropertiesArray AdditionalPropertiesArray additionalPropertiesArrayName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesArray"},{"display_html":"mkAdditionalPropertiesArray :: AdditionalPropertiesArray","name":"mkAdditionalPropertiesArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesArray"},{"display_html":"data AdditionalPropertiesBoolean = AdditionalPropertiesBoolean {}","name":"AdditionalPropertiesBoolean AdditionalPropertiesBoolean additionalPropertiesBooleanName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesBoolean"},{"display_html":"mkAdditionalPropertiesBoolean :: AdditionalPropertiesBoolean","name":"mkAdditionalPropertiesBoolean","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesBoolean"},{"display_html":"data AdditionalPropertiesClass = AdditionalPropertiesClass {}","name":"AdditionalPropertiesClass AdditionalPropertiesClass additionalPropertiesClassAnytype3 additionalPropertiesClassAnytype2 additionalPropertiesClassAnytype1 additionalPropertiesClassMapMapAnytype additionalPropertiesClassMapMapString additionalPropertiesClassMapArrayAnytype additionalPropertiesClassMapArrayInteger additionalPropertiesClassMapBoolean additionalPropertiesClassMapInteger additionalPropertiesClassMapNumber additionalPropertiesClassMapString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesClass"},{"display_html":"mkAdditionalPropertiesClass :: AdditionalPropertiesClass","name":"mkAdditionalPropertiesClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesClass"},{"display_html":"data AdditionalPropertiesInteger = AdditionalPropertiesInteger {}","name":"AdditionalPropertiesInteger AdditionalPropertiesInteger additionalPropertiesIntegerName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesInteger"},{"display_html":"mkAdditionalPropertiesInteger :: AdditionalPropertiesInteger","name":"mkAdditionalPropertiesInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesInteger"},{"display_html":"data AdditionalPropertiesNumber = AdditionalPropertiesNumber {}","name":"AdditionalPropertiesNumber AdditionalPropertiesNumber additionalPropertiesNumberName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesNumber"},{"display_html":"mkAdditionalPropertiesNumber :: AdditionalPropertiesNumber","name":"mkAdditionalPropertiesNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesNumber"},{"display_html":"data AdditionalPropertiesObject = AdditionalPropertiesObject {}","name":"AdditionalPropertiesObject AdditionalPropertiesObject additionalPropertiesObjectName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesObject"},{"display_html":"mkAdditionalPropertiesObject :: AdditionalPropertiesObject","name":"mkAdditionalPropertiesObject","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesObject"},{"display_html":"data AdditionalPropertiesString = AdditionalPropertiesString {}","name":"AdditionalPropertiesString AdditionalPropertiesString additionalPropertiesStringName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AdditionalPropertiesString"},{"display_html":"mkAdditionalPropertiesString :: AdditionalPropertiesString","name":"mkAdditionalPropertiesString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAdditionalPropertiesString"},{"display_html":"data Animal = Animal {}","name":"Animal Animal animalColor animalClassName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Animal"},{"display_html":"mkAnimal :: Text -> Animal","name":"mkAnimal","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkAnimal"},{"display_html":"data ApiResponse = ApiResponse {}","name":"ApiResponse ApiResponse apiResponseMessage apiResponseType apiResponseCode","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ApiResponse"},{"display_html":"mkApiResponse :: ApiResponse","name":"mkApiResponse","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkApiResponse"},{"display_html":"data ArrayOfArrayOfNumberOnly = ArrayOfArrayOfNumberOnly {}","name":"ArrayOfArrayOfNumberOnly ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnlyArrayArrayNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ArrayOfArrayOfNumberOnly"},{"display_html":"mkArrayOfArrayOfNumberOnly :: ArrayOfArrayOfNumberOnly","name":"mkArrayOfArrayOfNumberOnly","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkArrayOfArrayOfNumberOnly"},{"display_html":"data ArrayOfNumberOnly = ArrayOfNumberOnly {}","name":"ArrayOfNumberOnly ArrayOfNumberOnly arrayOfNumberOnlyArrayNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ArrayOfNumberOnly"},{"display_html":"mkArrayOfNumberOnly :: ArrayOfNumberOnly","name":"mkArrayOfNumberOnly","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkArrayOfNumberOnly"},{"display_html":"data ArrayTest = ArrayTest {}","name":"ArrayTest ArrayTest arrayTestArrayArrayOfModel arrayTestArrayArrayOfInteger arrayTestArrayOfString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ArrayTest"},{"display_html":"mkArrayTest :: ArrayTest","name":"mkArrayTest","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkArrayTest"},{"display_html":"data Capitalization = Capitalization {}","name":"Capitalization Capitalization capitalizationAttName capitalizationScaEthFlowPoints capitalizationCapitalSnake capitalizationSmallSnake capitalizationCapitalCamel capitalizationSmallCamel","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Capitalization"},{"display_html":"mkCapitalization :: Capitalization","name":"mkCapitalization","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkCapitalization"},{"display_html":"data Cat = Cat {}","name":"Cat Cat catDeclawed catColor catClassName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Cat"},{"display_html":"mkCat :: Text -> Cat","name":"mkCat","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkCat"},{"display_html":"data CatAllOf = CatAllOf {}","name":"CatAllOf CatAllOf catAllOfDeclawed","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:CatAllOf"},{"display_html":"mkCatAllOf :: CatAllOf","name":"mkCatAllOf","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkCatAllOf"},{"display_html":"data Category = Category {}","name":"Category Category categoryName categoryId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Category"},{"display_html":"mkCategory :: Text -> Category","name":"mkCategory","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkCategory"},{"display_html":"data ClassModel = ClassModel {}","name":"ClassModel ClassModel classModelClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ClassModel"},{"display_html":"mkClassModel :: ClassModel","name":"mkClassModel","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkClassModel"},{"display_html":"data Client = Client {}","name":"Client Client clientClient","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Client"},{"display_html":"mkClient :: Client","name":"mkClient","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkClient"},{"display_html":"data Dog = Dog {}","name":"Dog Dog dogBreed dogColor dogClassName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Dog"},{"display_html":"mkDog :: Text -> Dog","name":"mkDog","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkDog"},{"display_html":"data DogAllOf = DogAllOf {}","name":"DogAllOf DogAllOf dogAllOfBreed","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:DogAllOf"},{"display_html":"mkDogAllOf :: DogAllOf","name":"mkDogAllOf","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkDogAllOf"},{"display_html":"data EnumArrays = EnumArrays {}","name":"EnumArrays EnumArrays enumArraysArrayEnum enumArraysJustSymbol","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumArrays"},{"display_html":"mkEnumArrays :: EnumArrays","name":"mkEnumArrays","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkEnumArrays"},{"display_html":"data EnumTest = EnumTest {}","name":"EnumTest EnumTest enumTestOuterEnum enumTestEnumNumber enumTestEnumInteger enumTestEnumStringRequired enumTestEnumString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumTest"},{"display_html":"mkEnumTest :: E'EnumString -> EnumTest","name":"mkEnumTest","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkEnumTest"},{"display_html":"data File = File {}","name":"File File fileSourceUri","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:File"},{"display_html":"mkFile :: File","name":"mkFile","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkFile"},{"display_html":"data FileSchemaTestClass = FileSchemaTestClass {}","name":"FileSchemaTestClass FileSchemaTestClass fileSchemaTestClassFiles fileSchemaTestClassFile","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:FileSchemaTestClass"},{"display_html":"mkFileSchemaTestClass :: FileSchemaTestClass","name":"mkFileSchemaTestClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkFileSchemaTestClass"},{"display_html":"data FormatTest = FormatTest {}","name":"FormatTest FormatTest formatTestBigDecimal formatTestPassword formatTestUuid formatTestDateTime formatTestDate formatTestBinary formatTestByte formatTestString formatTestDouble formatTestFloat formatTestNumber formatTestInt64 formatTestInt32 formatTestInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:FormatTest"},{"display_html":"mkFormatTest :: Double -> ByteArray -> Date -> Text -> FormatTest","name":"mkFormatTest","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkFormatTest"},{"display_html":"data HasOnlyReadOnly = HasOnlyReadOnly {}","name":"HasOnlyReadOnly HasOnlyReadOnly hasOnlyReadOnlyFoo hasOnlyReadOnlyBar","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:HasOnlyReadOnly"},{"display_html":"mkHasOnlyReadOnly :: HasOnlyReadOnly","name":"mkHasOnlyReadOnly","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkHasOnlyReadOnly"},{"display_html":"data MapTest = MapTest {}","name":"MapTest MapTest mapTestIndirectMap mapTestDirectMap mapTestMapOfEnumString mapTestMapMapOfString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:MapTest"},{"display_html":"mkMapTest :: MapTest","name":"mkMapTest","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkMapTest"},{"display_html":"data MixedPropertiesAndAdditionalPropertiesClass = MixedPropertiesAndAdditionalPropertiesClass {}","name":"MixedPropertiesAndAdditionalPropertiesClass MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClassMap mixedPropertiesAndAdditionalPropertiesClassDateTime mixedPropertiesAndAdditionalPropertiesClassUuid","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:MixedPropertiesAndAdditionalPropertiesClass"},{"display_html":"mkMixedPropertiesAndAdditionalPropertiesClass :: MixedPropertiesAndAdditionalPropertiesClass","name":"mkMixedPropertiesAndAdditionalPropertiesClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkMixedPropertiesAndAdditionalPropertiesClass"},{"display_html":"data Model200Response = Model200Response {}","name":"Model200Response Model200Response model200ResponseClass model200ResponseName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Model200Response"},{"display_html":"mkModel200Response :: Model200Response","name":"mkModel200Response","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkModel200Response"},{"display_html":"data ModelList = ModelList {}","name":"ModelList ModelList modelList123list","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ModelList"},{"display_html":"mkModelList :: ModelList","name":"mkModelList","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkModelList"},{"display_html":"data ModelReturn = ModelReturn {}","name":"ModelReturn ModelReturn modelReturnReturn","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ModelReturn"},{"display_html":"mkModelReturn :: ModelReturn","name":"mkModelReturn","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkModelReturn"},{"display_html":"data Name = Name {}","name":"Name Name name123number nameProperty nameSnakeCase nameName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Name"},{"display_html":"mkName :: Int -> Name","name":"mkName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkName"},{"display_html":"data NumberOnly = NumberOnly {}","name":"NumberOnly NumberOnly numberOnlyJustNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:NumberOnly"},{"display_html":"mkNumberOnly :: NumberOnly","name":"mkNumberOnly","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkNumberOnly"},{"display_html":"data Order = Order {}","name":"Order Order orderComplete orderStatus orderShipDate orderQuantity orderPetId orderId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Order"},{"display_html":"mkOrder :: Order","name":"mkOrder","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkOrder"},{"display_html":"data OuterComposite = OuterComposite {}","name":"OuterComposite OuterComposite outerCompositeMyBoolean outerCompositeMyString outerCompositeMyNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:OuterComposite"},{"display_html":"mkOuterComposite :: OuterComposite","name":"mkOuterComposite","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkOuterComposite"},{"display_html":"data Pet = Pet {}","name":"Pet Pet petStatus petTags petPhotoUrls petName petCategory petId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Pet"},{"display_html":"mkPet :: Text -> [Text] -> Pet","name":"mkPet","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkPet"},{"display_html":"data ReadOnlyFirst = ReadOnlyFirst {}","name":"ReadOnlyFirst ReadOnlyFirst readOnlyFirstBaz readOnlyFirstBar","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:ReadOnlyFirst"},{"display_html":"mkReadOnlyFirst :: ReadOnlyFirst","name":"mkReadOnlyFirst","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkReadOnlyFirst"},{"display_html":"data SpecialModelName = SpecialModelName {}","name":"SpecialModelName SpecialModelName specialModelNameSpecialPropertyName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:SpecialModelName"},{"display_html":"mkSpecialModelName :: SpecialModelName","name":"mkSpecialModelName","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkSpecialModelName"},{"display_html":"data Tag = Tag {}","name":"Tag Tag tagName tagId","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:Tag"},{"display_html":"mkTag :: Tag","name":"mkTag","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkTag"},{"display_html":"data TypeHolderDefault = TypeHolderDefault {}","name":"TypeHolderDefault TypeHolderDefault typeHolderDefaultArrayItem typeHolderDefaultBoolItem typeHolderDefaultIntegerItem typeHolderDefaultNumberItem typeHolderDefaultStringItem","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:TypeHolderDefault"},{"display_html":"mkTypeHolderDefault :: Text -> Double -> Int -> Bool -> [Int] -> TypeHolderDefault","name":"mkTypeHolderDefault","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkTypeHolderDefault"},{"display_html":"data TypeHolderExample = TypeHolderExample {}","name":"TypeHolderExample TypeHolderExample typeHolderExampleArrayItem typeHolderExampleBoolItem typeHolderExampleIntegerItem typeHolderExampleFloatItem typeHolderExampleNumberItem typeHolderExampleStringItem","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:TypeHolderExample"},{"display_html":"mkTypeHolderExample :: Text -> Double -> Float -> Int -> Bool -> [Int] -> TypeHolderExample","name":"mkTypeHolderExample","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkTypeHolderExample"},{"display_html":"data User = User {}","name":"User User userUserStatus userPhone userEmail userLastName userFirstName userUsername userId userPassword","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:User"},{"display_html":"mkUser :: User","name":"mkUser","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkUser"},{"display_html":"data XmlItem = XmlItem {}","name":"XmlItem XmlItem xmlItemPrefixNsWrappedArray xmlItemPrefixNsArray xmlItemPrefixNsBoolean xmlItemPrefixNsInteger xmlItemPrefixNsNumber xmlItemPrefixNsString xmlItemNamespaceWrappedArray xmlItemNamespaceArray xmlItemNamespaceBoolean xmlItemNamespaceInteger xmlItemNamespaceNumber xmlItemNamespaceString xmlItemPrefixWrappedArray xmlItemPrefixArray xmlItemPrefixBoolean xmlItemPrefixInteger xmlItemPrefixNumber xmlItemPrefixString xmlItemNameWrappedArray xmlItemNameArray xmlItemNameBoolean xmlItemNameInteger xmlItemNameNumber xmlItemNameString xmlItemWrappedArray xmlItemAttributeBoolean xmlItemAttributeInteger xmlItemAttributeNumber xmlItemAttributeString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:XmlItem"},{"display_html":"mkXmlItem :: XmlItem","name":"mkXmlItem","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:mkXmlItem"},{"display_html":"data E'ArrayEnum","name":"E'ArrayEnum E'ArrayEnum'Crab E'ArrayEnum'Fish","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-ArrayEnum"},{"display_html":"fromE'ArrayEnum :: E'ArrayEnum -> Text","name":"fromE'ArrayEnum","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-ArrayEnum"},{"display_html":"toE'ArrayEnum :: Text -> Either String E'ArrayEnum","name":"toE'ArrayEnum","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-ArrayEnum"},{"display_html":"data E'EnumFormString","name":"E'EnumFormString E'EnumFormString'_xyz E'EnumFormString'_efg E'EnumFormString'_abc","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumFormString"},{"display_html":"fromE'EnumFormString :: E'EnumFormString -> Text","name":"fromE'EnumFormString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumFormString"},{"display_html":"toE'EnumFormString :: Text -> Either String E'EnumFormString","name":"toE'EnumFormString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumFormString"},{"display_html":"data E'EnumFormStringArray","name":"E'EnumFormStringArray E'EnumFormStringArray'Dollar E'EnumFormStringArray'GreaterThan","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumFormStringArray"},{"display_html":"fromE'EnumFormStringArray :: E'EnumFormStringArray -> Text","name":"fromE'EnumFormStringArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumFormStringArray"},{"display_html":"toE'EnumFormStringArray :: Text -> Either String E'EnumFormStringArray","name":"toE'EnumFormStringArray","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumFormStringArray"},{"display_html":"data E'EnumInteger","name":"E'EnumInteger E'EnumInteger'NumMinus_1 E'EnumInteger'Num1","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumInteger"},{"display_html":"fromE'EnumInteger :: E'EnumInteger -> Int","name":"fromE'EnumInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumInteger"},{"display_html":"toE'EnumInteger :: Int -> Either String E'EnumInteger","name":"toE'EnumInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumInteger"},{"display_html":"data E'EnumNumber","name":"E'EnumNumber E'EnumNumber'NumMinus_1_Dot_2 E'EnumNumber'Num1_Dot_1","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumNumber"},{"display_html":"fromE'EnumNumber :: E'EnumNumber -> Double","name":"fromE'EnumNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumNumber"},{"display_html":"toE'EnumNumber :: Double -> Either String E'EnumNumber","name":"toE'EnumNumber","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumNumber"},{"display_html":"data E'EnumQueryInteger","name":"E'EnumQueryInteger E'EnumQueryInteger'NumMinus_2 E'EnumQueryInteger'Num1","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumQueryInteger"},{"display_html":"fromE'EnumQueryInteger :: E'EnumQueryInteger -> Int","name":"fromE'EnumQueryInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumQueryInteger"},{"display_html":"toE'EnumQueryInteger :: Int -> Either String E'EnumQueryInteger","name":"toE'EnumQueryInteger","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumQueryInteger"},{"display_html":"data E'EnumString","name":"E'EnumString E'EnumString'Empty E'EnumString'Lower E'EnumString'UPPER","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-EnumString"},{"display_html":"fromE'EnumString :: E'EnumString -> Text","name":"fromE'EnumString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-EnumString"},{"display_html":"toE'EnumString :: Text -> Either String E'EnumString","name":"toE'EnumString","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-EnumString"},{"display_html":"data E'Inner","name":"E'Inner E'Inner'Lower E'Inner'UPPER","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-Inner"},{"display_html":"fromE'Inner :: E'Inner -> Text","name":"fromE'Inner","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-Inner"},{"display_html":"toE'Inner :: Text -> Either String E'Inner","name":"toE'Inner","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-Inner"},{"display_html":"data E'JustSymbol","name":"E'JustSymbol E'JustSymbol'Dollar E'JustSymbol'Greater_Than_Or_Equal_To","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-JustSymbol"},{"display_html":"fromE'JustSymbol :: E'JustSymbol -> Text","name":"fromE'JustSymbol","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-JustSymbol"},{"display_html":"toE'JustSymbol :: Text -> Either String E'JustSymbol","name":"toE'JustSymbol","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-JustSymbol"},{"display_html":"data E'Status","name":"E'Status E'Status'Delivered E'Status'Approved E'Status'Placed","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-Status"},{"display_html":"fromE'Status :: E'Status -> Text","name":"fromE'Status","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-Status"},{"display_html":"toE'Status :: Text -> Either String E'Status","name":"toE'Status","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-Status"},{"display_html":"data E'Status2","name":"E'Status2 E'Status2'Sold E'Status2'Pending E'Status2'Available","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:E-39-Status2"},{"display_html":"fromE'Status2 :: E'Status2 -> Text","name":"fromE'Status2","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromE-39-Status2"},{"display_html":"toE'Status2 :: Text -> Either String E'Status2","name":"toE'Status2","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toE-39-Status2"},{"display_html":"data EnumClass","name":"EnumClass EnumClass'_xyz EnumClass'_efg EnumClass'_abc","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:EnumClass"},{"display_html":"fromEnumClass :: EnumClass -> Text","name":"fromEnumClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromEnumClass"},{"display_html":"toEnumClass :: Text -> Either String EnumClass","name":"toEnumClass","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toEnumClass"},{"display_html":"data OuterEnum","name":"OuterEnum OuterEnum'Delivered OuterEnum'Approved OuterEnum'Placed","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:OuterEnum"},{"display_html":"fromOuterEnum :: OuterEnum -> Text","name":"fromOuterEnum","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:fromOuterEnum"},{"display_html":"toOuterEnum :: Text -> Either String OuterEnum","name":"toOuterEnum","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#v:toOuterEnum"},{"display_html":"data AuthApiKeyApiKey = AuthApiKeyApiKey Text","name":"AuthApiKeyApiKey AuthApiKeyApiKey","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AuthApiKeyApiKey"},{"display_html":"data AuthApiKeyApiKeyQuery = AuthApiKeyApiKeyQuery Text","name":"AuthApiKeyApiKeyQuery AuthApiKeyApiKeyQuery","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AuthApiKeyApiKeyQuery"},{"display_html":"data AuthBasicHttpBasicTest = AuthBasicHttpBasicTest ByteString ByteString","name":"AuthBasicHttpBasicTest AuthBasicHttpBasicTest","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AuthBasicHttpBasicTest"},{"display_html":"data AuthOAuthPetstoreAuth = AuthOAuthPetstoreAuth Text","name":"AuthOAuthPetstoreAuth AuthOAuthPetstoreAuth","module":"OpenAPIPetstore.Model","link":"OpenAPIPetstore-Model.html#t:AuthOAuthPetstoreAuth"},{"display_html":"createUser :: (Consumes CreateUser contentType, MimeRender contentType User) => ContentType contentType -> User -> OpenAPIPetstoreRequest CreateUser contentType NoContent MimeNoContent","name":"createUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:createUser"},{"display_html":"data CreateUser","name":"CreateUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:CreateUser"},{"display_html":"createUsersWithArrayInput :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType Body) => ContentType contentType -> Body -> OpenAPIPetstoreRequest CreateUsersWithArrayInput contentType NoContent MimeNoContent","name":"createUsersWithArrayInput","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:createUsersWithArrayInput"},{"display_html":"data CreateUsersWithArrayInput","name":"CreateUsersWithArrayInput","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:CreateUsersWithArrayInput"},{"display_html":"createUsersWithListInput :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType Body) => ContentType contentType -> Body -> OpenAPIPetstoreRequest CreateUsersWithListInput contentType NoContent MimeNoContent","name":"createUsersWithListInput","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:createUsersWithListInput"},{"display_html":"data CreateUsersWithListInput","name":"CreateUsersWithListInput","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:CreateUsersWithListInput"},{"display_html":"deleteUser :: Username -> OpenAPIPetstoreRequest DeleteUser MimeNoContent NoContent MimeNoContent","name":"deleteUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:deleteUser"},{"display_html":"data DeleteUser","name":"DeleteUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:DeleteUser"},{"display_html":"getUserByName :: Accept accept -> Username -> OpenAPIPetstoreRequest GetUserByName MimeNoContent User accept","name":"getUserByName","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:getUserByName"},{"display_html":"data GetUserByName","name":"GetUserByName","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:GetUserByName"},{"display_html":"loginUser :: Accept accept -> Username -> Password -> OpenAPIPetstoreRequest LoginUser MimeNoContent Text accept","name":"loginUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:loginUser"},{"display_html":"data LoginUser","name":"LoginUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:LoginUser"},{"display_html":"logoutUser :: OpenAPIPetstoreRequest LogoutUser MimeNoContent NoContent MimeNoContent","name":"logoutUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:logoutUser"},{"display_html":"data LogoutUser","name":"LogoutUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:LogoutUser"},{"display_html":"updateUser :: (Consumes UpdateUser contentType, MimeRender contentType User) => ContentType contentType -> User -> Username -> OpenAPIPetstoreRequest UpdateUser contentType NoContent MimeNoContent","name":"updateUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#v:updateUser"},{"display_html":"data UpdateUser","name":"UpdateUser","module":"OpenAPIPetstore.API.User","link":"OpenAPIPetstore-API-User.html#t:UpdateUser"},{"display_html":"deleteOrder :: OrderIdText -> OpenAPIPetstoreRequest DeleteOrder MimeNoContent NoContent MimeNoContent","name":"deleteOrder","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#v:deleteOrder"},{"display_html":"data DeleteOrder","name":"DeleteOrder","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#t:DeleteOrder"},{"display_html":"getInventory :: OpenAPIPetstoreRequest GetInventory MimeNoContent (Map String Int) MimeJSON","name":"getInventory","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#v:getInventory"},{"display_html":"data GetInventory","name":"GetInventory","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#t:GetInventory"},{"display_html":"getOrderById :: Accept accept -> OrderId -> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept","name":"getOrderById","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#v:getOrderById"},{"display_html":"data GetOrderById","name":"GetOrderById","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#t:GetOrderById"},{"display_html":"placeOrder :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => ContentType contentType -> Accept accept -> Order -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept","name":"placeOrder","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#v:placeOrder"},{"display_html":"data PlaceOrder","name":"PlaceOrder","module":"OpenAPIPetstore.API.Store","link":"OpenAPIPetstore-API-Store.html#t:PlaceOrder"},{"display_html":"addPet :: (Consumes AddPet contentType, MimeRender contentType Pet) => ContentType contentType -> Pet -> OpenAPIPetstoreRequest AddPet contentType NoContent MimeNoContent","name":"addPet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:addPet"},{"display_html":"data AddPet","name":"AddPet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:AddPet"},{"display_html":"deletePet :: PetId -> OpenAPIPetstoreRequest DeletePet MimeNoContent NoContent MimeNoContent","name":"deletePet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:deletePet"},{"display_html":"data DeletePet","name":"DeletePet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:DeletePet"},{"display_html":"findPetsByStatus :: Accept accept -> Status -> OpenAPIPetstoreRequest FindPetsByStatus MimeNoContent [Pet] accept","name":"findPetsByStatus","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:findPetsByStatus"},{"display_html":"data FindPetsByStatus","name":"FindPetsByStatus","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:FindPetsByStatus"},{"display_html":"findPetsByTags :: Accept accept -> Tags -> OpenAPIPetstoreRequest FindPetsByTags MimeNoContent [Pet] accept","name":"findPetsByTags","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:findPetsByTags"},{"display_html":"data FindPetsByTags","name":"FindPetsByTags","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:FindPetsByTags"},{"display_html":"getPetById :: Accept accept -> PetId -> OpenAPIPetstoreRequest GetPetById MimeNoContent Pet accept","name":"getPetById","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:getPetById"},{"display_html":"data GetPetById","name":"GetPetById","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:GetPetById"},{"display_html":"updatePet :: (Consumes UpdatePet contentType, MimeRender contentType Pet) => ContentType contentType -> Pet -> OpenAPIPetstoreRequest UpdatePet contentType NoContent MimeNoContent","name":"updatePet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:updatePet"},{"display_html":"data UpdatePet","name":"UpdatePet","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:UpdatePet"},{"display_html":"updatePetWithForm :: Consumes UpdatePetWithForm MimeFormUrlEncoded => PetId -> OpenAPIPetstoreRequest UpdatePetWithForm MimeFormUrlEncoded NoContent MimeNoContent","name":"updatePetWithForm","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:updatePetWithForm"},{"display_html":"data UpdatePetWithForm","name":"UpdatePetWithForm","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:UpdatePetWithForm"},{"display_html":"uploadFile :: Consumes UploadFile MimeMultipartFormData => PetId -> OpenAPIPetstoreRequest UploadFile MimeMultipartFormData ApiResponse MimeJSON","name":"uploadFile","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:uploadFile"},{"display_html":"data UploadFile","name":"UploadFile","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:UploadFile"},{"display_html":"uploadFileWithRequiredFile :: Consumes UploadFileWithRequiredFile MimeMultipartFormData => RequiredFile -> PetId -> OpenAPIPetstoreRequest UploadFileWithRequiredFile MimeMultipartFormData ApiResponse MimeJSON","name":"uploadFileWithRequiredFile","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#v:uploadFileWithRequiredFile"},{"display_html":"data UploadFileWithRequiredFile","name":"UploadFileWithRequiredFile","module":"OpenAPIPetstore.API.Pet","link":"OpenAPIPetstore-API-Pet.html#t:UploadFileWithRequiredFile"},{"display_html":"testClassname :: (Consumes TestClassname MimeJSON, MimeRender MimeJSON Client) => Client -> OpenAPIPetstoreRequest TestClassname MimeJSON Client MimeJSON","name":"testClassname","module":"OpenAPIPetstore.API.FakeClassnameTags123","link":"OpenAPIPetstore-API-FakeClassnameTags123.html#v:testClassname"},{"display_html":"data TestClassname","name":"TestClassname","module":"OpenAPIPetstore.API.FakeClassnameTags123","link":"OpenAPIPetstore-API-FakeClassnameTags123.html#t:TestClassname"},{"display_html":"createXmlItem :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) => ContentType contentType -> XmlItem -> OpenAPIPetstoreRequest CreateXmlItem contentType NoContent MimeNoContent","name":"createXmlItem","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:createXmlItem"},{"display_html":"data CreateXmlItem","name":"CreateXmlItem","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:CreateXmlItem"},{"display_html":"fakeOuterBooleanSerialize :: Consumes FakeOuterBooleanSerialize contentType => ContentType contentType -> Accept accept -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize contentType Bool accept","name":"fakeOuterBooleanSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:fakeOuterBooleanSerialize"},{"display_html":"data FakeOuterBooleanSerialize","name":"FakeOuterBooleanSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:FakeOuterBooleanSerialize"},{"display_html":"fakeOuterCompositeSerialize :: Consumes FakeOuterCompositeSerialize contentType => ContentType contentType -> Accept accept -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept","name":"fakeOuterCompositeSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:fakeOuterCompositeSerialize"},{"display_html":"data FakeOuterCompositeSerialize","name":"FakeOuterCompositeSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:FakeOuterCompositeSerialize"},{"display_html":"fakeOuterNumberSerialize :: Consumes FakeOuterNumberSerialize contentType => ContentType contentType -> Accept accept -> OpenAPIPetstoreRequest FakeOuterNumberSerialize contentType Double accept","name":"fakeOuterNumberSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:fakeOuterNumberSerialize"},{"display_html":"data FakeOuterNumberSerialize","name":"FakeOuterNumberSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:FakeOuterNumberSerialize"},{"display_html":"fakeOuterStringSerialize :: Consumes FakeOuterStringSerialize contentType => ContentType contentType -> Accept accept -> OpenAPIPetstoreRequest FakeOuterStringSerialize contentType Text accept","name":"fakeOuterStringSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:fakeOuterStringSerialize"},{"display_html":"data FakeOuterStringSerialize","name":"FakeOuterStringSerialize","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:FakeOuterStringSerialize"},{"display_html":"testBodyWithFileSchema :: (Consumes TestBodyWithFileSchema MimeJSON, MimeRender MimeJSON FileSchemaTestClass) => FileSchemaTestClass -> OpenAPIPetstoreRequest TestBodyWithFileSchema MimeJSON NoContent MimeNoContent","name":"testBodyWithFileSchema","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testBodyWithFileSchema"},{"display_html":"data TestBodyWithFileSchema","name":"TestBodyWithFileSchema","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestBodyWithFileSchema"},{"display_html":"testBodyWithQueryParams :: (Consumes TestBodyWithQueryParams MimeJSON, MimeRender MimeJSON User) => User -> Query -> OpenAPIPetstoreRequest TestBodyWithQueryParams MimeJSON NoContent MimeNoContent","name":"testBodyWithQueryParams","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testBodyWithQueryParams"},{"display_html":"data TestBodyWithQueryParams","name":"TestBodyWithQueryParams","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestBodyWithQueryParams"},{"display_html":"testClientModel :: (Consumes TestClientModel MimeJSON, MimeRender MimeJSON Client) => Client -> OpenAPIPetstoreRequest TestClientModel MimeJSON Client MimeJSON","name":"testClientModel","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testClientModel"},{"display_html":"data TestClientModel","name":"TestClientModel","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestClientModel"},{"display_html":"testEndpointParameters :: Consumes TestEndpointParameters MimeFormUrlEncoded => Number -> ParamDouble -> PatternWithoutDelimiter -> Byte -> OpenAPIPetstoreRequest TestEndpointParameters MimeFormUrlEncoded NoContent MimeNoContent","name":"testEndpointParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testEndpointParameters"},{"display_html":"data TestEndpointParameters","name":"TestEndpointParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestEndpointParameters"},{"display_html":"testEnumParameters :: Consumes TestEnumParameters MimeFormUrlEncoded => OpenAPIPetstoreRequest TestEnumParameters MimeFormUrlEncoded NoContent MimeNoContent","name":"testEnumParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testEnumParameters"},{"display_html":"data TestEnumParameters","name":"TestEnumParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestEnumParameters"},{"display_html":"testGroupParameters :: RequiredStringGroup -> RequiredBooleanGroup -> RequiredInt64Group -> OpenAPIPetstoreRequest TestGroupParameters MimeNoContent NoContent MimeNoContent","name":"testGroupParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testGroupParameters"},{"display_html":"data TestGroupParameters","name":"TestGroupParameters","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestGroupParameters"},{"display_html":"testInlineAdditionalProperties :: (Consumes TestInlineAdditionalProperties MimeJSON, MimeRender MimeJSON ParamMapMapStringText) => ParamMapMapStringText -> OpenAPIPetstoreRequest TestInlineAdditionalProperties MimeJSON NoContent MimeNoContent","name":"testInlineAdditionalProperties","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testInlineAdditionalProperties"},{"display_html":"data TestInlineAdditionalProperties","name":"TestInlineAdditionalProperties","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestInlineAdditionalProperties"},{"display_html":"testJsonFormData :: Consumes TestJsonFormData MimeFormUrlEncoded => Param -> Param2 -> OpenAPIPetstoreRequest TestJsonFormData MimeFormUrlEncoded NoContent MimeNoContent","name":"testJsonFormData","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testJsonFormData"},{"display_html":"data TestJsonFormData","name":"TestJsonFormData","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestJsonFormData"},{"display_html":"testQueryParameterCollectionFormat :: Pipe -> Ioutil -> Http -> Url -> Context -> OpenAPIPetstoreRequest TestQueryParameterCollectionFormat MimeNoContent NoContent MimeNoContent","name":"testQueryParameterCollectionFormat","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#v:testQueryParameterCollectionFormat"},{"display_html":"data TestQueryParameterCollectionFormat","name":"TestQueryParameterCollectionFormat","module":"OpenAPIPetstore.API.Fake","link":"OpenAPIPetstore-API-Fake.html#t:TestQueryParameterCollectionFormat"},{"display_html":"op123testSpecialTags :: (Consumes Op123testSpecialTags MimeJSON, MimeRender MimeJSON Client) => Client -> OpenAPIPetstoreRequest Op123testSpecialTags MimeJSON Client MimeJSON","name":"op123testSpecialTags","module":"OpenAPIPetstore.API.AnotherFake","link":"OpenAPIPetstore-API-AnotherFake.html#v:op123testSpecialTags"},{"display_html":"data Op123testSpecialTags","name":"Op123testSpecialTags","module":"OpenAPIPetstore.API.AnotherFake","link":"OpenAPIPetstore-API-AnotherFake.html#t:Op123testSpecialTags"},{"display_html":"module OpenAPIPetstore.API.AnotherFake","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"module OpenAPIPetstore.API.Fake","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"module OpenAPIPetstore.API.FakeClassnameTags123","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"module OpenAPIPetstore.API.Pet","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"module OpenAPIPetstore.API.Store","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"module OpenAPIPetstore.API.User","name":"","module":"OpenAPIPetstore.API","link":""},{"display_html":"additionalPropertiesAnyTypeNameL :: Lens_' AdditionalPropertiesAnyType (Maybe Text)","name":"additionalPropertiesAnyTypeNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesAnyTypeNameL"},{"display_html":"additionalPropertiesArrayNameL :: Lens_' AdditionalPropertiesArray (Maybe Text)","name":"additionalPropertiesArrayNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesArrayNameL"},{"display_html":"additionalPropertiesBooleanNameL :: Lens_' AdditionalPropertiesBoolean (Maybe Text)","name":"additionalPropertiesBooleanNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesBooleanNameL"},{"display_html":"additionalPropertiesClassMapStringL :: Lens_' AdditionalPropertiesClass (Maybe (Map String Text))","name":"additionalPropertiesClassMapStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapStringL"},{"display_html":"additionalPropertiesClassMapNumberL :: Lens_' AdditionalPropertiesClass (Maybe (Map String Double))","name":"additionalPropertiesClassMapNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapNumberL"},{"display_html":"additionalPropertiesClassMapIntegerL :: Lens_' AdditionalPropertiesClass (Maybe (Map String Int))","name":"additionalPropertiesClassMapIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapIntegerL"},{"display_html":"additionalPropertiesClassMapBooleanL :: Lens_' AdditionalPropertiesClass (Maybe (Map String Bool))","name":"additionalPropertiesClassMapBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapBooleanL"},{"display_html":"additionalPropertiesClassMapArrayIntegerL :: Lens_' AdditionalPropertiesClass (Maybe (Map String [Int]))","name":"additionalPropertiesClassMapArrayIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapArrayIntegerL"},{"display_html":"additionalPropertiesClassMapArrayAnytypeL :: Lens_' AdditionalPropertiesClass (Maybe (Map String [Value]))","name":"additionalPropertiesClassMapArrayAnytypeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapArrayAnytypeL"},{"display_html":"additionalPropertiesClassMapMapStringL :: Lens_' AdditionalPropertiesClass (Maybe (Map String (Map String Text)))","name":"additionalPropertiesClassMapMapStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapMapStringL"},{"display_html":"additionalPropertiesClassMapMapAnytypeL :: Lens_' AdditionalPropertiesClass (Maybe (Map String (Map String Value)))","name":"additionalPropertiesClassMapMapAnytypeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassMapMapAnytypeL"},{"display_html":"additionalPropertiesClassAnytype1L :: Lens_' AdditionalPropertiesClass (Maybe Value)","name":"additionalPropertiesClassAnytype1L","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassAnytype1L"},{"display_html":"additionalPropertiesClassAnytype2L :: Lens_' AdditionalPropertiesClass (Maybe Value)","name":"additionalPropertiesClassAnytype2L","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassAnytype2L"},{"display_html":"additionalPropertiesClassAnytype3L :: Lens_' AdditionalPropertiesClass (Maybe Value)","name":"additionalPropertiesClassAnytype3L","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesClassAnytype3L"},{"display_html":"additionalPropertiesIntegerNameL :: Lens_' AdditionalPropertiesInteger (Maybe Text)","name":"additionalPropertiesIntegerNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesIntegerNameL"},{"display_html":"additionalPropertiesNumberNameL :: Lens_' AdditionalPropertiesNumber (Maybe Text)","name":"additionalPropertiesNumberNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesNumberNameL"},{"display_html":"additionalPropertiesObjectNameL :: Lens_' AdditionalPropertiesObject (Maybe Text)","name":"additionalPropertiesObjectNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesObjectNameL"},{"display_html":"additionalPropertiesStringNameL :: Lens_' AdditionalPropertiesString (Maybe Text)","name":"additionalPropertiesStringNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:additionalPropertiesStringNameL"},{"display_html":"animalClassNameL :: Lens_' Animal Text","name":"animalClassNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:animalClassNameL"},{"display_html":"animalColorL :: Lens_' Animal (Maybe Text)","name":"animalColorL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:animalColorL"},{"display_html":"apiResponseCodeL :: Lens_' ApiResponse (Maybe Int)","name":"apiResponseCodeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:apiResponseCodeL"},{"display_html":"apiResponseTypeL :: Lens_' ApiResponse (Maybe Text)","name":"apiResponseTypeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:apiResponseTypeL"},{"display_html":"apiResponseMessageL :: Lens_' ApiResponse (Maybe Text)","name":"apiResponseMessageL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:apiResponseMessageL"},{"display_html":"arrayOfArrayOfNumberOnlyArrayArrayNumberL :: Lens_' ArrayOfArrayOfNumberOnly (Maybe [[Double]])","name":"arrayOfArrayOfNumberOnlyArrayArrayNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:arrayOfArrayOfNumberOnlyArrayArrayNumberL"},{"display_html":"arrayOfNumberOnlyArrayNumberL :: Lens_' ArrayOfNumberOnly (Maybe [Double])","name":"arrayOfNumberOnlyArrayNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:arrayOfNumberOnlyArrayNumberL"},{"display_html":"arrayTestArrayOfStringL :: Lens_' ArrayTest (Maybe [Text])","name":"arrayTestArrayOfStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:arrayTestArrayOfStringL"},{"display_html":"arrayTestArrayArrayOfIntegerL :: Lens_' ArrayTest (Maybe [[Integer]])","name":"arrayTestArrayArrayOfIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:arrayTestArrayArrayOfIntegerL"},{"display_html":"arrayTestArrayArrayOfModelL :: Lens_' ArrayTest (Maybe [[ReadOnlyFirst]])","name":"arrayTestArrayArrayOfModelL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:arrayTestArrayArrayOfModelL"},{"display_html":"capitalizationSmallCamelL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationSmallCamelL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationSmallCamelL"},{"display_html":"capitalizationCapitalCamelL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationCapitalCamelL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationCapitalCamelL"},{"display_html":"capitalizationSmallSnakeL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationSmallSnakeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationSmallSnakeL"},{"display_html":"capitalizationCapitalSnakeL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationCapitalSnakeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationCapitalSnakeL"},{"display_html":"capitalizationScaEthFlowPointsL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationScaEthFlowPointsL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationScaEthFlowPointsL"},{"display_html":"capitalizationAttNameL :: Lens_' Capitalization (Maybe Text)","name":"capitalizationAttNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:capitalizationAttNameL"},{"display_html":"catClassNameL :: Lens_' Cat Text","name":"catClassNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:catClassNameL"},{"display_html":"catColorL :: Lens_' Cat (Maybe Text)","name":"catColorL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:catColorL"},{"display_html":"catDeclawedL :: Lens_' Cat (Maybe Bool)","name":"catDeclawedL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:catDeclawedL"},{"display_html":"catAllOfDeclawedL :: Lens_' CatAllOf (Maybe Bool)","name":"catAllOfDeclawedL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:catAllOfDeclawedL"},{"display_html":"categoryIdL :: Lens_' Category (Maybe Integer)","name":"categoryIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:categoryIdL"},{"display_html":"categoryNameL :: Lens_' Category Text","name":"categoryNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:categoryNameL"},{"display_html":"classModelClassL :: Lens_' ClassModel (Maybe Text)","name":"classModelClassL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:classModelClassL"},{"display_html":"clientClientL :: Lens_' Client (Maybe Text)","name":"clientClientL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:clientClientL"},{"display_html":"dogClassNameL :: Lens_' Dog Text","name":"dogClassNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:dogClassNameL"},{"display_html":"dogColorL :: Lens_' Dog (Maybe Text)","name":"dogColorL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:dogColorL"},{"display_html":"dogBreedL :: Lens_' Dog (Maybe Text)","name":"dogBreedL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:dogBreedL"},{"display_html":"dogAllOfBreedL :: Lens_' DogAllOf (Maybe Text)","name":"dogAllOfBreedL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:dogAllOfBreedL"},{"display_html":"enumArraysJustSymbolL :: Lens_' EnumArrays (Maybe E'JustSymbol)","name":"enumArraysJustSymbolL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumArraysJustSymbolL"},{"display_html":"enumArraysArrayEnumL :: Lens_' EnumArrays (Maybe [E'ArrayEnum])","name":"enumArraysArrayEnumL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumArraysArrayEnumL"},{"display_html":"enumTestEnumStringL :: Lens_' EnumTest (Maybe E'EnumString)","name":"enumTestEnumStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumTestEnumStringL"},{"display_html":"enumTestEnumStringRequiredL :: Lens_' EnumTest E'EnumString","name":"enumTestEnumStringRequiredL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumTestEnumStringRequiredL"},{"display_html":"enumTestEnumIntegerL :: Lens_' EnumTest (Maybe E'EnumInteger)","name":"enumTestEnumIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumTestEnumIntegerL"},{"display_html":"enumTestEnumNumberL :: Lens_' EnumTest (Maybe E'EnumNumber)","name":"enumTestEnumNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumTestEnumNumberL"},{"display_html":"enumTestOuterEnumL :: Lens_' EnumTest (Maybe OuterEnum)","name":"enumTestOuterEnumL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:enumTestOuterEnumL"},{"display_html":"fileSourceUriL :: Lens_' File (Maybe Text)","name":"fileSourceUriL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:fileSourceUriL"},{"display_html":"fileSchemaTestClassFileL :: Lens_' FileSchemaTestClass (Maybe File)","name":"fileSchemaTestClassFileL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:fileSchemaTestClassFileL"},{"display_html":"fileSchemaTestClassFilesL :: Lens_' FileSchemaTestClass (Maybe [File])","name":"fileSchemaTestClassFilesL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:fileSchemaTestClassFilesL"},{"display_html":"formatTestIntegerL :: Lens_' FormatTest (Maybe Int)","name":"formatTestIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestIntegerL"},{"display_html":"formatTestInt32L :: Lens_' FormatTest (Maybe Int)","name":"formatTestInt32L","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestInt32L"},{"display_html":"formatTestInt64L :: Lens_' FormatTest (Maybe Integer)","name":"formatTestInt64L","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestInt64L"},{"display_html":"formatTestNumberL :: Lens_' FormatTest Double","name":"formatTestNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestNumberL"},{"display_html":"formatTestFloatL :: Lens_' FormatTest (Maybe Float)","name":"formatTestFloatL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestFloatL"},{"display_html":"formatTestDoubleL :: Lens_' FormatTest (Maybe Double)","name":"formatTestDoubleL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestDoubleL"},{"display_html":"formatTestStringL :: Lens_' FormatTest (Maybe Text)","name":"formatTestStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestStringL"},{"display_html":"formatTestByteL :: Lens_' FormatTest ByteArray","name":"formatTestByteL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestByteL"},{"display_html":"formatTestBinaryL :: Lens_' FormatTest (Maybe FilePath)","name":"formatTestBinaryL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestBinaryL"},{"display_html":"formatTestDateL :: Lens_' FormatTest Date","name":"formatTestDateL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestDateL"},{"display_html":"formatTestDateTimeL :: Lens_' FormatTest (Maybe DateTime)","name":"formatTestDateTimeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestDateTimeL"},{"display_html":"formatTestUuidL :: Lens_' FormatTest (Maybe Text)","name":"formatTestUuidL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestUuidL"},{"display_html":"formatTestPasswordL :: Lens_' FormatTest Text","name":"formatTestPasswordL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestPasswordL"},{"display_html":"formatTestBigDecimalL :: Lens_' FormatTest (Maybe Double)","name":"formatTestBigDecimalL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:formatTestBigDecimalL"},{"display_html":"hasOnlyReadOnlyBarL :: Lens_' HasOnlyReadOnly (Maybe Text)","name":"hasOnlyReadOnlyBarL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:hasOnlyReadOnlyBarL"},{"display_html":"hasOnlyReadOnlyFooL :: Lens_' HasOnlyReadOnly (Maybe Text)","name":"hasOnlyReadOnlyFooL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:hasOnlyReadOnlyFooL"},{"display_html":"mapTestMapMapOfStringL :: Lens_' MapTest (Maybe (Map String (Map String Text)))","name":"mapTestMapMapOfStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mapTestMapMapOfStringL"},{"display_html":"mapTestMapOfEnumStringL :: Lens_' MapTest (Maybe (Map String E'Inner))","name":"mapTestMapOfEnumStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mapTestMapOfEnumStringL"},{"display_html":"mapTestDirectMapL :: Lens_' MapTest (Maybe (Map String Bool))","name":"mapTestDirectMapL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mapTestDirectMapL"},{"display_html":"mapTestIndirectMapL :: Lens_' MapTest (Maybe (Map String Bool))","name":"mapTestIndirectMapL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mapTestIndirectMapL"},{"display_html":"mixedPropertiesAndAdditionalPropertiesClassUuidL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe Text)","name":"mixedPropertiesAndAdditionalPropertiesClassUuidL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mixedPropertiesAndAdditionalPropertiesClassUuidL"},{"display_html":"mixedPropertiesAndAdditionalPropertiesClassDateTimeL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe DateTime)","name":"mixedPropertiesAndAdditionalPropertiesClassDateTimeL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mixedPropertiesAndAdditionalPropertiesClassDateTimeL"},{"display_html":"mixedPropertiesAndAdditionalPropertiesClassMapL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe (Map String Animal))","name":"mixedPropertiesAndAdditionalPropertiesClassMapL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:mixedPropertiesAndAdditionalPropertiesClassMapL"},{"display_html":"model200ResponseNameL :: Lens_' Model200Response (Maybe Int)","name":"model200ResponseNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:model200ResponseNameL"},{"display_html":"model200ResponseClassL :: Lens_' Model200Response (Maybe Text)","name":"model200ResponseClassL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:model200ResponseClassL"},{"display_html":"modelList123listL :: Lens_' ModelList (Maybe Text)","name":"modelList123listL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:modelList123listL"},{"display_html":"modelReturnReturnL :: Lens_' ModelReturn (Maybe Int)","name":"modelReturnReturnL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:modelReturnReturnL"},{"display_html":"nameNameL :: Lens_' Name Int","name":"nameNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:nameNameL"},{"display_html":"nameSnakeCaseL :: Lens_' Name (Maybe Int)","name":"nameSnakeCaseL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:nameSnakeCaseL"},{"display_html":"namePropertyL :: Lens_' Name (Maybe Text)","name":"namePropertyL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:namePropertyL"},{"display_html":"name123numberL :: Lens_' Name (Maybe Int)","name":"name123numberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:name123numberL"},{"display_html":"numberOnlyJustNumberL :: Lens_' NumberOnly (Maybe Double)","name":"numberOnlyJustNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:numberOnlyJustNumberL"},{"display_html":"orderIdL :: Lens_' Order (Maybe Integer)","name":"orderIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderIdL"},{"display_html":"orderPetIdL :: Lens_' Order (Maybe Integer)","name":"orderPetIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderPetIdL"},{"display_html":"orderQuantityL :: Lens_' Order (Maybe Int)","name":"orderQuantityL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderQuantityL"},{"display_html":"orderShipDateL :: Lens_' Order (Maybe DateTime)","name":"orderShipDateL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderShipDateL"},{"display_html":"orderStatusL :: Lens_' Order (Maybe E'Status)","name":"orderStatusL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderStatusL"},{"display_html":"orderCompleteL :: Lens_' Order (Maybe Bool)","name":"orderCompleteL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:orderCompleteL"},{"display_html":"outerCompositeMyNumberL :: Lens_' OuterComposite (Maybe Double)","name":"outerCompositeMyNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:outerCompositeMyNumberL"},{"display_html":"outerCompositeMyStringL :: Lens_' OuterComposite (Maybe Text)","name":"outerCompositeMyStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:outerCompositeMyStringL"},{"display_html":"outerCompositeMyBooleanL :: Lens_' OuterComposite (Maybe Bool)","name":"outerCompositeMyBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:outerCompositeMyBooleanL"},{"display_html":"petIdL :: Lens_' Pet (Maybe Integer)","name":"petIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petIdL"},{"display_html":"petCategoryL :: Lens_' Pet (Maybe Category)","name":"petCategoryL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petCategoryL"},{"display_html":"petNameL :: Lens_' Pet Text","name":"petNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petNameL"},{"display_html":"petPhotoUrlsL :: Lens_' Pet [Text]","name":"petPhotoUrlsL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petPhotoUrlsL"},{"display_html":"petTagsL :: Lens_' Pet (Maybe [Tag])","name":"petTagsL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petTagsL"},{"display_html":"petStatusL :: Lens_' Pet (Maybe E'Status2)","name":"petStatusL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:petStatusL"},{"display_html":"readOnlyFirstBarL :: Lens_' ReadOnlyFirst (Maybe Text)","name":"readOnlyFirstBarL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:readOnlyFirstBarL"},{"display_html":"readOnlyFirstBazL :: Lens_' ReadOnlyFirst (Maybe Text)","name":"readOnlyFirstBazL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:readOnlyFirstBazL"},{"display_html":"specialModelNameSpecialPropertyNameL :: Lens_' SpecialModelName (Maybe Integer)","name":"specialModelNameSpecialPropertyNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:specialModelNameSpecialPropertyNameL"},{"display_html":"tagIdL :: Lens_' Tag (Maybe Integer)","name":"tagIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:tagIdL"},{"display_html":"tagNameL :: Lens_' Tag (Maybe Text)","name":"tagNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:tagNameL"},{"display_html":"typeHolderDefaultStringItemL :: Lens_' TypeHolderDefault Text","name":"typeHolderDefaultStringItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderDefaultStringItemL"},{"display_html":"typeHolderDefaultNumberItemL :: Lens_' TypeHolderDefault Double","name":"typeHolderDefaultNumberItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderDefaultNumberItemL"},{"display_html":"typeHolderDefaultIntegerItemL :: Lens_' TypeHolderDefault Int","name":"typeHolderDefaultIntegerItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderDefaultIntegerItemL"},{"display_html":"typeHolderDefaultBoolItemL :: Lens_' TypeHolderDefault Bool","name":"typeHolderDefaultBoolItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderDefaultBoolItemL"},{"display_html":"typeHolderDefaultArrayItemL :: Lens_' TypeHolderDefault [Int]","name":"typeHolderDefaultArrayItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderDefaultArrayItemL"},{"display_html":"typeHolderExampleStringItemL :: Lens_' TypeHolderExample Text","name":"typeHolderExampleStringItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleStringItemL"},{"display_html":"typeHolderExampleNumberItemL :: Lens_' TypeHolderExample Double","name":"typeHolderExampleNumberItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleNumberItemL"},{"display_html":"typeHolderExampleFloatItemL :: Lens_' TypeHolderExample Float","name":"typeHolderExampleFloatItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleFloatItemL"},{"display_html":"typeHolderExampleIntegerItemL :: Lens_' TypeHolderExample Int","name":"typeHolderExampleIntegerItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleIntegerItemL"},{"display_html":"typeHolderExampleBoolItemL :: Lens_' TypeHolderExample Bool","name":"typeHolderExampleBoolItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleBoolItemL"},{"display_html":"typeHolderExampleArrayItemL :: Lens_' TypeHolderExample [Int]","name":"typeHolderExampleArrayItemL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:typeHolderExampleArrayItemL"},{"display_html":"userIdL :: Lens_' User (Maybe Integer)","name":"userIdL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userIdL"},{"display_html":"userUsernameL :: Lens_' User (Maybe Text)","name":"userUsernameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userUsernameL"},{"display_html":"userFirstNameL :: Lens_' User (Maybe Text)","name":"userFirstNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userFirstNameL"},{"display_html":"userLastNameL :: Lens_' User (Maybe Text)","name":"userLastNameL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userLastNameL"},{"display_html":"userEmailL :: Lens_' User (Maybe Text)","name":"userEmailL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userEmailL"},{"display_html":"userPasswordL :: Lens_' User (Maybe Text)","name":"userPasswordL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userPasswordL"},{"display_html":"userPhoneL :: Lens_' User (Maybe Text)","name":"userPhoneL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userPhoneL"},{"display_html":"userUserStatusL :: Lens_' User (Maybe Int)","name":"userUserStatusL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:userUserStatusL"},{"display_html":"xmlItemAttributeStringL :: Lens_' XmlItem (Maybe Text)","name":"xmlItemAttributeStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemAttributeStringL"},{"display_html":"xmlItemAttributeNumberL :: Lens_' XmlItem (Maybe Double)","name":"xmlItemAttributeNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemAttributeNumberL"},{"display_html":"xmlItemAttributeIntegerL :: Lens_' XmlItem (Maybe Int)","name":"xmlItemAttributeIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemAttributeIntegerL"},{"display_html":"xmlItemAttributeBooleanL :: Lens_' XmlItem (Maybe Bool)","name":"xmlItemAttributeBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemAttributeBooleanL"},{"display_html":"xmlItemWrappedArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemWrappedArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemWrappedArrayL"},{"display_html":"xmlItemNameStringL :: Lens_' XmlItem (Maybe Text)","name":"xmlItemNameStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameStringL"},{"display_html":"xmlItemNameNumberL :: Lens_' XmlItem (Maybe Double)","name":"xmlItemNameNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameNumberL"},{"display_html":"xmlItemNameIntegerL :: Lens_' XmlItem (Maybe Int)","name":"xmlItemNameIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameIntegerL"},{"display_html":"xmlItemNameBooleanL :: Lens_' XmlItem (Maybe Bool)","name":"xmlItemNameBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameBooleanL"},{"display_html":"xmlItemNameArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemNameArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameArrayL"},{"display_html":"xmlItemNameWrappedArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemNameWrappedArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNameWrappedArrayL"},{"display_html":"xmlItemPrefixStringL :: Lens_' XmlItem (Maybe Text)","name":"xmlItemPrefixStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixStringL"},{"display_html":"xmlItemPrefixNumberL :: Lens_' XmlItem (Maybe Double)","name":"xmlItemPrefixNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNumberL"},{"display_html":"xmlItemPrefixIntegerL :: Lens_' XmlItem (Maybe Int)","name":"xmlItemPrefixIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixIntegerL"},{"display_html":"xmlItemPrefixBooleanL :: Lens_' XmlItem (Maybe Bool)","name":"xmlItemPrefixBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixBooleanL"},{"display_html":"xmlItemPrefixArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemPrefixArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixArrayL"},{"display_html":"xmlItemPrefixWrappedArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemPrefixWrappedArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixWrappedArrayL"},{"display_html":"xmlItemNamespaceStringL :: Lens_' XmlItem (Maybe Text)","name":"xmlItemNamespaceStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceStringL"},{"display_html":"xmlItemNamespaceNumberL :: Lens_' XmlItem (Maybe Double)","name":"xmlItemNamespaceNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceNumberL"},{"display_html":"xmlItemNamespaceIntegerL :: Lens_' XmlItem (Maybe Int)","name":"xmlItemNamespaceIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceIntegerL"},{"display_html":"xmlItemNamespaceBooleanL :: Lens_' XmlItem (Maybe Bool)","name":"xmlItemNamespaceBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceBooleanL"},{"display_html":"xmlItemNamespaceArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemNamespaceArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceArrayL"},{"display_html":"xmlItemNamespaceWrappedArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemNamespaceWrappedArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemNamespaceWrappedArrayL"},{"display_html":"xmlItemPrefixNsStringL :: Lens_' XmlItem (Maybe Text)","name":"xmlItemPrefixNsStringL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsStringL"},{"display_html":"xmlItemPrefixNsNumberL :: Lens_' XmlItem (Maybe Double)","name":"xmlItemPrefixNsNumberL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsNumberL"},{"display_html":"xmlItemPrefixNsIntegerL :: Lens_' XmlItem (Maybe Int)","name":"xmlItemPrefixNsIntegerL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsIntegerL"},{"display_html":"xmlItemPrefixNsBooleanL :: Lens_' XmlItem (Maybe Bool)","name":"xmlItemPrefixNsBooleanL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsBooleanL"},{"display_html":"xmlItemPrefixNsArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemPrefixNsArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsArrayL"},{"display_html":"xmlItemPrefixNsWrappedArrayL :: Lens_' XmlItem (Maybe [Int])","name":"xmlItemPrefixNsWrappedArrayL","module":"OpenAPIPetstore.ModelLens","link":"OpenAPIPetstore-ModelLens.html#v:xmlItemPrefixNsWrappedArrayL"},{"display_html":"module OpenAPIPetstore.API","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.Client","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.Core","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.Logging","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.MimeTypes","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.Model","name":"","module":"OpenAPIPetstore","link":""},{"display_html":"module OpenAPIPetstore.ModelLens","name":"","module":"OpenAPIPetstore","link":""}] \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/openapi-petstore.txt b/samples/client/petstore/haskell-http-client/docs/openapi-petstore.txt index b447ed9a56..ff79812116 100644 --- a/samples/client/petstore/haskell-http-client/docs/openapi-petstore.txt +++ b/samples/client/petstore/haskell-http-client/docs/openapi-petstore.txt @@ -1057,7 +1057,7 @@ mkFileSchemaTestClass :: FileSchemaTestClass -- | FormatTest data FormatTest -FormatTest :: !Maybe Int -> !Maybe Int -> !Maybe Integer -> !Double -> !Maybe Float -> !Maybe Double -> !Maybe Text -> !ByteArray -> !Maybe FilePath -> !Date -> !Maybe DateTime -> !Maybe Text -> !Text -> FormatTest +FormatTest :: !Maybe Int -> !Maybe Int -> !Maybe Integer -> !Double -> !Maybe Float -> !Maybe Double -> !Maybe Text -> !ByteArray -> !Maybe FilePath -> !Date -> !Maybe DateTime -> !Maybe Text -> !Text -> !Maybe Double -> FormatTest -- | "integer" [formatTestInteger] :: FormatTest -> !Maybe Int @@ -1098,6 +1098,9 @@ FormatTest :: !Maybe Int -> !Maybe Int -> !Maybe Integer -> !Double -> !Maybe Fl -- | Required "password" [formatTestPassword] :: FormatTest -> !Text +-- | BigDecimal +[formatTestBigDecimal] :: FormatTest -> !Maybe Double + -- | Construct a value of type FormatTest (by applying it's required -- fields, if any) mkFormatTest :: Double -> ByteArray -> Date -> Text -> FormatTest @@ -1354,7 +1357,7 @@ mkTypeHolderDefault :: Text -> Double -> Int -> Bool -> [Int] -> TypeHolderDefau -- | TypeHolderExample data TypeHolderExample -TypeHolderExample :: !Text -> !Double -> !Int -> !Bool -> ![Int] -> TypeHolderExample +TypeHolderExample :: !Text -> !Double -> !Float -> !Int -> !Bool -> ![Int] -> TypeHolderExample -- | Required "string_item" [typeHolderExampleStringItem] :: TypeHolderExample -> !Text @@ -1362,6 +1365,9 @@ TypeHolderExample :: !Text -> !Double -> !Int -> !Bool -> ![Int] -> TypeHolderEx -- | Required "number_item" [typeHolderExampleNumberItem] :: TypeHolderExample -> !Double +-- | Required "float_item" +[typeHolderExampleFloatItem] :: TypeHolderExample -> !Float + -- | Required "integer_item" [typeHolderExampleIntegerItem] :: TypeHolderExample -> !Int @@ -1373,7 +1379,7 @@ TypeHolderExample :: !Text -> !Double -> !Int -> !Bool -> ![Int] -> TypeHolderEx -- | Construct a value of type TypeHolderExample (by applying it's -- required fields, if any) -mkTypeHolderExample :: Text -> Double -> Int -> Bool -> [Int] -> TypeHolderExample +mkTypeHolderExample :: Text -> Double -> Float -> Int -> Bool -> [Int] -> TypeHolderExample -- | User data User @@ -2931,6 +2937,9 @@ formatTestUuidL :: Lens_' FormatTest (Maybe Text) -- | formatTestPassword Lens formatTestPasswordL :: Lens_' FormatTest Text +-- | formatTestBigDecimal Lens +formatTestBigDecimalL :: Lens_' FormatTest (Maybe Double) + -- | hasOnlyReadOnlyBar Lens hasOnlyReadOnlyBarL :: Lens_' HasOnlyReadOnly (Maybe Text) @@ -3066,6 +3075,9 @@ typeHolderExampleStringItemL :: Lens_' TypeHolderExample Text -- | typeHolderExampleNumberItem Lens typeHolderExampleNumberItemL :: Lens_' TypeHolderExample Double +-- | typeHolderExampleFloatItem Lens +typeHolderExampleFloatItemL :: Lens_' TypeHolderExample Float + -- | typeHolderExampleIntegerItem Lens typeHolderExampleIntegerItemL :: Lens_' TypeHolderExample Int diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.AnotherFake.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.AnotherFake.html index 23b3b23213..d083885bbc 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.AnotherFake.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.AnotherFake.html @@ -69,9 +69,9 @@ Module : OpenAPIPetstore.API.AnotherFake :: (Consumes Op123testSpecialTags MimeJSON, MimeRender MimeJSON Client) => Client -- ^ "body" - client model -> OpenAPIPetstoreRequest Op123testSpecialTags MimeJSON Client MimeJSON -op123testSpecialTags body = +op123testSpecialTags body = _mkRequest "PATCH" ["/another-fake/dummy"] - `setBodyParam` body + `setBodyParam` body data Op123testSpecialTags diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Fake.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Fake.html index 076f4c46f3..0051e0950a 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Fake.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Fake.html @@ -66,13 +66,13 @@ Module : OpenAPIPetstore.API.Fake -- this route creates an XmlItem -- createXmlItem - :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) - => ContentType contentType -- ^ request content-type ('MimeType') + :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) + => ContentType contentType -- ^ request content-type ('MimeType') -> XmlItem -- ^ "xmlItem" - XmlItem Body - -> OpenAPIPetstoreRequest CreateXmlItem contentType NoContent MimeNoContent -createXmlItem _ xmlItem = + -> OpenAPIPetstoreRequest CreateXmlItem contentType NoContent MimeNoContent +createXmlItem _ xmlItem = _mkRequest "POST" ["/fake/create_xml_item"] - `setBodyParam` xmlItem + `setBodyParam` xmlItem data CreateXmlItem @@ -102,10 +102,10 @@ Module : OpenAPIPetstore.API.Fake -- Test serialization of outer boolean types -- fakeOuterBooleanSerialize - :: (Consumes FakeOuterBooleanSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize contentType Bool accept + :: (Consumes FakeOuterBooleanSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize contentType Bool accept fakeOuterBooleanSerialize _ _ = _mkRequest "POST" ["/fake/outer/boolean"] @@ -115,10 +115,10 @@ Module : OpenAPIPetstore.API.Fake instance HasBodyParam FakeOuterBooleanSerialize BodyBool -- | @*/*@ -instance MimeType mtype => Consumes FakeOuterBooleanSerialize mtype +instance MimeType mtype => Consumes FakeOuterBooleanSerialize mtype -- | @*/*@ -instance MimeType mtype => Produces FakeOuterBooleanSerialize mtype +instance MimeType mtype => Produces FakeOuterBooleanSerialize mtype -- *** fakeOuterCompositeSerialize @@ -128,10 +128,10 @@ Module : OpenAPIPetstore.API.Fake -- Test serialization of object with outer number type -- fakeOuterCompositeSerialize - :: (Consumes FakeOuterCompositeSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept + :: (Consumes FakeOuterCompositeSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept fakeOuterCompositeSerialize _ _ = _mkRequest "POST" ["/fake/outer/composite"] @@ -141,10 +141,10 @@ Module : OpenAPIPetstore.API.Fake instance HasBodyParam FakeOuterCompositeSerialize OuterComposite -- | @*/*@ -instance MimeType mtype => Consumes FakeOuterCompositeSerialize mtype +instance MimeType mtype => Consumes FakeOuterCompositeSerialize mtype -- | @*/*@ -instance MimeType mtype => Produces FakeOuterCompositeSerialize mtype +instance MimeType mtype => Produces FakeOuterCompositeSerialize mtype -- *** fakeOuterNumberSerialize @@ -154,10 +154,10 @@ Module : OpenAPIPetstore.API.Fake -- Test serialization of outer number types -- fakeOuterNumberSerialize - :: (Consumes FakeOuterNumberSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterNumberSerialize contentType Double accept + :: (Consumes FakeOuterNumberSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterNumberSerialize contentType Double accept fakeOuterNumberSerialize _ _ = _mkRequest "POST" ["/fake/outer/number"] @@ -167,10 +167,10 @@ Module : OpenAPIPetstore.API.Fake instance HasBodyParam FakeOuterNumberSerialize BodyDouble -- | @*/*@ -instance MimeType mtype => Consumes FakeOuterNumberSerialize mtype +instance MimeType mtype => Consumes FakeOuterNumberSerialize mtype -- | @*/*@ -instance MimeType mtype => Produces FakeOuterNumberSerialize mtype +instance MimeType mtype => Produces FakeOuterNumberSerialize mtype -- *** fakeOuterStringSerialize @@ -180,10 +180,10 @@ Module : OpenAPIPetstore.API.Fake -- Test serialization of outer string types -- fakeOuterStringSerialize - :: (Consumes FakeOuterStringSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterStringSerialize contentType Text accept + :: (Consumes FakeOuterStringSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterStringSerialize contentType Text accept fakeOuterStringSerialize _ _ = _mkRequest "POST" ["/fake/outer/string"] @@ -193,10 +193,10 @@ Module : OpenAPIPetstore.API.Fake instance HasBodyParam FakeOuterStringSerialize BodyText -- | @*/*@ -instance MimeType mtype => Consumes FakeOuterStringSerialize mtype +instance MimeType mtype => Consumes FakeOuterStringSerialize mtype -- | @*/*@ -instance MimeType mtype => Produces FakeOuterStringSerialize mtype +instance MimeType mtype => Produces FakeOuterStringSerialize mtype -- *** testBodyWithFileSchema @@ -209,9 +209,9 @@ Module : OpenAPIPetstore.API.Fake :: (Consumes TestBodyWithFileSchema MimeJSON, MimeRender MimeJSON FileSchemaTestClass) => FileSchemaTestClass -- ^ "body" -> OpenAPIPetstoreRequest TestBodyWithFileSchema MimeJSON NoContent MimeNoContent -testBodyWithFileSchema body = +testBodyWithFileSchema body = _mkRequest "PUT" ["/fake/body-with-file-schema"] - `setBodyParam` body + `setBodyParam` body data TestBodyWithFileSchema instance HasBodyParam TestBodyWithFileSchema FileSchemaTestClass @@ -231,10 +231,10 @@ Module : OpenAPIPetstore.API.Fake => User -- ^ "body" -> Query -- ^ "query" -> OpenAPIPetstoreRequest TestBodyWithQueryParams MimeJSON NoContent MimeNoContent -testBodyWithQueryParams body (Query query) = +testBodyWithQueryParams body (Query query) = _mkRequest "PUT" ["/fake/body-with-query-params"] - `setBodyParam` body - `setQuery` toQuery ("query", Just query) + `setBodyParam` body + `setQuery` toQuery ("query", Just query) data TestBodyWithQueryParams instance HasBodyParam TestBodyWithQueryParams User @@ -257,9 +257,9 @@ Module : OpenAPIPetstore.API.Fake :: (Consumes TestClientModel MimeJSON, MimeRender MimeJSON Client) => Client -- ^ "body" - client model -> OpenAPIPetstoreRequest TestClientModel MimeJSON Client MimeJSON -testClientModel body = +testClientModel body = _mkRequest "PATCH" ["/fake"] - `setBodyParam` body + `setBodyParam` body data TestClientModel @@ -290,65 +290,65 @@ Module : OpenAPIPetstore.API.Fake -> PatternWithoutDelimiter -- ^ "patternWithoutDelimiter" - None -> Byte -- ^ "byte" - None -> OpenAPIPetstoreRequest TestEndpointParameters MimeFormUrlEncoded NoContent MimeNoContent -testEndpointParameters (Number number) (ParamDouble double) (PatternWithoutDelimiter patternWithoutDelimiter) (Byte byte) = +testEndpointParameters (Number number) (ParamDouble double) (PatternWithoutDelimiter patternWithoutDelimiter) (Byte byte) = _mkRequest "POST" ["/fake"] `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicHttpBasicTest) - `addForm` toForm ("number", number) - `addForm` toForm ("double", double) - `addForm` toForm ("pattern_without_delimiter", patternWithoutDelimiter) - `addForm` toForm ("byte", byte) + `addForm` toForm ("number", number) + `addForm` toForm ("double", double) + `addForm` toForm ("pattern_without_delimiter", patternWithoutDelimiter) + `addForm` toForm ("byte", byte) data TestEndpointParameters -- | /Optional Param/ "integer" - None instance HasOptionalParam TestEndpointParameters ParamInteger where - applyOptionalParam req (ParamInteger xs) = - req `addForm` toForm ("integer", xs) + applyOptionalParam req (ParamInteger xs) = + req `addForm` toForm ("integer", xs) -- | /Optional Param/ "int32" - None instance HasOptionalParam TestEndpointParameters Int32 where - applyOptionalParam req (Int32 xs) = - req `addForm` toForm ("int32", xs) + applyOptionalParam req (Int32 xs) = + req `addForm` toForm ("int32", xs) -- | /Optional Param/ "int64" - None instance HasOptionalParam TestEndpointParameters Int64 where - applyOptionalParam req (Int64 xs) = - req `addForm` toForm ("int64", xs) + applyOptionalParam req (Int64 xs) = + req `addForm` toForm ("int64", xs) -- | /Optional Param/ "float" - None instance HasOptionalParam TestEndpointParameters ParamFloat where - applyOptionalParam req (ParamFloat xs) = - req `addForm` toForm ("float", xs) + applyOptionalParam req (ParamFloat xs) = + req `addForm` toForm ("float", xs) -- | /Optional Param/ "string" - None instance HasOptionalParam TestEndpointParameters ParamString where - applyOptionalParam req (ParamString xs) = - req `addForm` toForm ("string", xs) + applyOptionalParam req (ParamString xs) = + req `addForm` toForm ("string", xs) -- | /Optional Param/ "binary" - None instance HasOptionalParam TestEndpointParameters ParamBinary where - applyOptionalParam req (ParamBinary xs) = - req `_addMultiFormPart` NH.partFileSource "binary" xs + applyOptionalParam req (ParamBinary xs) = + req `_addMultiFormPart` NH.partFileSource "binary" xs -- | /Optional Param/ "date" - None instance HasOptionalParam TestEndpointParameters ParamDate where - applyOptionalParam req (ParamDate xs) = - req `addForm` toForm ("date", xs) + applyOptionalParam req (ParamDate xs) = + req `addForm` toForm ("date", xs) -- | /Optional Param/ "dateTime" - None instance HasOptionalParam TestEndpointParameters ParamDateTime where - applyOptionalParam req (ParamDateTime xs) = - req `addForm` toForm ("dateTime", xs) + applyOptionalParam req (ParamDateTime xs) = + req `addForm` toForm ("dateTime", xs) -- | /Optional Param/ "password" - None instance HasOptionalParam TestEndpointParameters Password where - applyOptionalParam req (Password xs) = - req `addForm` toForm ("password", xs) + applyOptionalParam req (Password xs) = + req `addForm` toForm ("password", xs) -- | /Optional Param/ "callback" - None instance HasOptionalParam TestEndpointParameters Callback where - applyOptionalParam req (Callback xs) = - req `addForm` toForm ("callback", xs) + applyOptionalParam req (Callback xs) = + req `addForm` toForm ("callback", xs) -- | @application/x-www-form-urlencoded@ instance Consumes TestEndpointParameters MimeFormUrlEncoded @@ -374,43 +374,43 @@ Module : OpenAPIPetstore.API.Fake -- | /Optional Param/ "enum_form_string_array" - Form parameter enum test (string array) instance HasOptionalParam TestEnumParameters EnumFormStringArray where - applyOptionalParam req (EnumFormStringArray xs) = - req `addForm` toFormColl CommaSeparated ("enum_form_string_array", xs) + applyOptionalParam req (EnumFormStringArray xs) = + req `addForm` toFormColl CommaSeparated ("enum_form_string_array", xs) -- | /Optional Param/ "enum_form_string" - Form parameter enum test (string) instance HasOptionalParam TestEnumParameters EnumFormString where - applyOptionalParam req (EnumFormString xs) = - req `addForm` toForm ("enum_form_string", xs) + applyOptionalParam req (EnumFormString xs) = + req `addForm` toForm ("enum_form_string", xs) -- | /Optional Param/ "enum_header_string_array" - Header parameter enum test (string array) instance HasOptionalParam TestEnumParameters EnumHeaderStringArray where - applyOptionalParam req (EnumHeaderStringArray xs) = - req `setHeader` toHeaderColl CommaSeparated ("enum_header_string_array", xs) + applyOptionalParam req (EnumHeaderStringArray xs) = + req `setHeader` toHeaderColl CommaSeparated ("enum_header_string_array", xs) -- | /Optional Param/ "enum_header_string" - Header parameter enum test (string) instance HasOptionalParam TestEnumParameters EnumHeaderString where - applyOptionalParam req (EnumHeaderString xs) = - req `setHeader` toHeader ("enum_header_string", xs) + applyOptionalParam req (EnumHeaderString xs) = + req `setHeader` toHeader ("enum_header_string", xs) -- | /Optional Param/ "enum_query_string_array" - Query parameter enum test (string array) instance HasOptionalParam TestEnumParameters EnumQueryStringArray where - applyOptionalParam req (EnumQueryStringArray xs) = - req `setQuery` toQueryColl CommaSeparated ("enum_query_string_array", Just xs) + applyOptionalParam req (EnumQueryStringArray xs) = + req `setQuery` toQueryColl CommaSeparated ("enum_query_string_array", Just xs) -- | /Optional Param/ "enum_query_string" - Query parameter enum test (string) instance HasOptionalParam TestEnumParameters EnumQueryString where - applyOptionalParam req (EnumQueryString xs) = - req `setQuery` toQuery ("enum_query_string", Just xs) + applyOptionalParam req (EnumQueryString xs) = + req `setQuery` toQuery ("enum_query_string", Just xs) -- | /Optional Param/ "enum_query_integer" - Query parameter enum test (double) instance HasOptionalParam TestEnumParameters EnumQueryInteger where - applyOptionalParam req (EnumQueryInteger xs) = - req `setQuery` toQuery ("enum_query_integer", Just xs) + applyOptionalParam req (EnumQueryInteger xs) = + req `setQuery` toQuery ("enum_query_integer", Just xs) -- | /Optional Param/ "enum_query_double" - Query parameter enum test (double) instance HasOptionalParam TestEnumParameters EnumQueryDouble where - applyOptionalParam req (EnumQueryDouble xs) = - req `setQuery` toQuery ("enum_query_double", Just xs) + applyOptionalParam req (EnumQueryDouble xs) = + req `setQuery` toQuery ("enum_query_double", Just xs) -- | @application/x-www-form-urlencoded@ instance Consumes TestEnumParameters MimeFormUrlEncoded @@ -431,28 +431,28 @@ Module : OpenAPIPetstore.API.Fake -> RequiredBooleanGroup -- ^ "requiredBooleanGroup" - Required Boolean in group parameters -> RequiredInt64Group -- ^ "requiredInt64Group" - Required Integer in group parameters -> OpenAPIPetstoreRequest TestGroupParameters MimeNoContent NoContent MimeNoContent -testGroupParameters (RequiredStringGroup requiredStringGroup) (RequiredBooleanGroup requiredBooleanGroup) (RequiredInt64Group requiredInt64Group) = +testGroupParameters (RequiredStringGroup requiredStringGroup) (RequiredBooleanGroup requiredBooleanGroup) (RequiredInt64Group requiredInt64Group) = _mkRequest "DELETE" ["/fake"] - `setQuery` toQuery ("required_string_group", Just requiredStringGroup) - `setHeader` toHeader ("required_boolean_group", requiredBooleanGroup) - `setQuery` toQuery ("required_int64_group", Just requiredInt64Group) + `setQuery` toQuery ("required_string_group", Just requiredStringGroup) + `setHeader` toHeader ("required_boolean_group", requiredBooleanGroup) + `setQuery` toQuery ("required_int64_group", Just requiredInt64Group) 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) + 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) + 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) + applyOptionalParam req (Int64Group xs) = + req `setQuery` toQuery ("int64_group", Just xs) instance Produces TestGroupParameters MimeNoContent @@ -466,9 +466,9 @@ Module : OpenAPIPetstore.API.Fake :: (Consumes TestInlineAdditionalProperties MimeJSON, MimeRender MimeJSON ParamMapMapStringText) => ParamMapMapStringText -- ^ "param" - request body -> OpenAPIPetstoreRequest TestInlineAdditionalProperties MimeJSON NoContent MimeNoContent -testInlineAdditionalProperties param = +testInlineAdditionalProperties param = _mkRequest "POST" ["/fake/inline-additionalProperties"] - `setBodyParam` param + `setBodyParam` param data TestInlineAdditionalProperties @@ -492,10 +492,10 @@ Module : OpenAPIPetstore.API.Fake => Param -- ^ "param" - field1 -> Param2 -- ^ "param2" - field2 -> OpenAPIPetstoreRequest TestJsonFormData MimeFormUrlEncoded NoContent MimeNoContent -testJsonFormData (Param param) (Param2 param2) = +testJsonFormData (Param param) (Param2 param2) = _mkRequest "GET" ["/fake/jsonFormData"] - `addForm` toForm ("param", param) - `addForm` toForm ("param2", param2) + `addForm` toForm ("param", param) + `addForm` toForm ("param2", param2) data TestJsonFormData @@ -518,13 +518,13 @@ Module : OpenAPIPetstore.API.Fake -> Url -- ^ "url" -> Context -- ^ "context" -> OpenAPIPetstoreRequest TestQueryParameterCollectionFormat MimeNoContent NoContent MimeNoContent -testQueryParameterCollectionFormat (Pipe pipe) (Ioutil ioutil) (Http http) (Url url) (Context context) = +testQueryParameterCollectionFormat (Pipe pipe) (Ioutil ioutil) (Http http) (Url url) (Context context) = _mkRequest "PUT" ["/fake/test-query-paramters"] - `setQuery` toQueryColl CommaSeparated ("pipe", Just pipe) - `setQuery` toQueryColl CommaSeparated ("ioutil", Just ioutil) - `setQuery` toQueryColl SpaceSeparated ("http", Just http) - `setQuery` toQueryColl CommaSeparated ("url", Just url) - `setQuery` toQueryColl MultiParamArray ("context", Just context) + `setQuery` toQueryColl CommaSeparated ("pipe", Just pipe) + `setQuery` toQueryColl CommaSeparated ("ioutil", Just ioutil) + `setQuery` toQueryColl SpaceSeparated ("http", Just http) + `setQuery` toQueryColl CommaSeparated ("url", Just url) + `setQuery` toQueryColl MultiParamArray ("context", Just context) data TestQueryParameterCollectionFormat instance Produces TestQueryParameterCollectionFormat MimeNoContent diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.FakeClassnameTags123.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.FakeClassnameTags123.html index 53982b7f79..1d77d60f94 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.FakeClassnameTags123.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.FakeClassnameTags123.html @@ -71,10 +71,10 @@ Module : OpenAPIPetstore.API.FakeClassnameTags123 :: (Consumes TestClassname MimeJSON, MimeRender MimeJSON Client) => Client -- ^ "body" - client model -> OpenAPIPetstoreRequest TestClassname MimeJSON Client MimeJSON -testClassname body = +testClassname body = _mkRequest "PATCH" ["/fake_classname_test"] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKeyQuery) - `setBodyParam` body + `setBodyParam` body data TestClassname diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Pet.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Pet.html index d930d9ca0c..5ecc146058 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Pet.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Pet.html @@ -66,14 +66,14 @@ Module : OpenAPIPetstore.API.Pet -- AuthMethod: 'AuthOAuthPetstoreAuth' -- addPet - :: (Consumes AddPet contentType, MimeRender contentType Pet) - => ContentType contentType -- ^ request content-type ('MimeType') + :: (Consumes AddPet contentType, MimeRender contentType Pet) + => ContentType contentType -- ^ request content-type ('MimeType') -> Pet -- ^ "body" - Pet object that needs to be added to the store - -> OpenAPIPetstoreRequest AddPet contentType NoContent MimeNoContent -addPet _ body = + -> OpenAPIPetstoreRequest AddPet contentType NoContent MimeNoContent +addPet _ body = _mkRequest "POST" ["/pet"] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - `setBodyParam` body + `setBodyParam` body data AddPet @@ -99,14 +99,14 @@ Module : OpenAPIPetstore.API.Pet deletePet :: PetId -- ^ "petId" - Pet id to delete -> OpenAPIPetstoreRequest DeletePet MimeNoContent NoContent MimeNoContent -deletePet (PetId petId) = - _mkRequest "DELETE" ["/pet/",toPath petId] +deletePet (PetId petId) = + _mkRequest "DELETE" ["/pet/",toPath petId] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) data DeletePet instance HasOptionalParam DeletePet ApiKey where - applyOptionalParam req (ApiKey xs) = - req `setHeader` toHeader ("api_key", xs) + applyOptionalParam req (ApiKey xs) = + req `setHeader` toHeader ("api_key", xs) instance Produces DeletePet MimeNoContent @@ -121,13 +121,13 @@ Module : OpenAPIPetstore.API.Pet -- AuthMethod: 'AuthOAuthPetstoreAuth' -- findPetsByStatus - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> Status -- ^ "status" - Status values that need to be considered for filter - -> OpenAPIPetstoreRequest FindPetsByStatus MimeNoContent [Pet] accept -findPetsByStatus _ (Status status) = + -> OpenAPIPetstoreRequest FindPetsByStatus MimeNoContent [Pet] accept +findPetsByStatus _ (Status status) = _mkRequest "GET" ["/pet/findByStatus"] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - `setQuery` toQueryColl CommaSeparated ("status", Just status) + `setQuery` toQueryColl CommaSeparated ("status", Just status) data FindPetsByStatus -- | @application/xml@ @@ -147,13 +147,13 @@ Module : OpenAPIPetstore.API.Pet -- AuthMethod: 'AuthOAuthPetstoreAuth' -- findPetsByTags - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> Tags -- ^ "tags" - Tags to filter by - -> OpenAPIPetstoreRequest FindPetsByTags MimeNoContent [Pet] accept -findPetsByTags _ (Tags tags) = + -> OpenAPIPetstoreRequest FindPetsByTags MimeNoContent [Pet] accept +findPetsByTags _ (Tags tags) = _mkRequest "GET" ["/pet/findByTags"] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - `setQuery` toQueryColl CommaSeparated ("tags", Just tags) + `setQuery` toQueryColl CommaSeparated ("tags", Just tags) {-# DEPRECATED findPetsByTags "" #-} @@ -175,11 +175,11 @@ Module : OpenAPIPetstore.API.Pet -- AuthMethod: 'AuthApiKeyApiKey' -- getPetById - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> PetId -- ^ "petId" - ID of pet to return - -> OpenAPIPetstoreRequest GetPetById MimeNoContent Pet accept -getPetById _ (PetId petId) = - _mkRequest "GET" ["/pet/",toPath petId] + -> OpenAPIPetstoreRequest GetPetById MimeNoContent Pet accept +getPetById _ (PetId petId) = + _mkRequest "GET" ["/pet/",toPath petId] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey) data GetPetById @@ -198,14 +198,14 @@ Module : OpenAPIPetstore.API.Pet -- AuthMethod: 'AuthOAuthPetstoreAuth' -- updatePet - :: (Consumes UpdatePet contentType, MimeRender contentType Pet) - => ContentType contentType -- ^ request content-type ('MimeType') + :: (Consumes UpdatePet contentType, MimeRender contentType Pet) + => ContentType contentType -- ^ request content-type ('MimeType') -> Pet -- ^ "body" - Pet object that needs to be added to the store - -> OpenAPIPetstoreRequest UpdatePet contentType NoContent MimeNoContent -updatePet _ body = + -> OpenAPIPetstoreRequest UpdatePet contentType NoContent MimeNoContent +updatePet _ body = _mkRequest "PUT" ["/pet"] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - `setBodyParam` body + `setBodyParam` body data UpdatePet @@ -232,21 +232,21 @@ Module : OpenAPIPetstore.API.Pet :: (Consumes UpdatePetWithForm MimeFormUrlEncoded) => PetId -- ^ "petId" - ID of pet that needs to be updated -> OpenAPIPetstoreRequest UpdatePetWithForm MimeFormUrlEncoded NoContent MimeNoContent -updatePetWithForm (PetId petId) = - _mkRequest "POST" ["/pet/",toPath petId] +updatePetWithForm (PetId petId) = + _mkRequest "POST" ["/pet/",toPath petId] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) data UpdatePetWithForm -- | /Optional Param/ "name" - Updated name of the pet instance HasOptionalParam UpdatePetWithForm Name2 where - applyOptionalParam req (Name2 xs) = - req `addForm` toForm ("name", xs) + applyOptionalParam req (Name2 xs) = + req `addForm` toForm ("name", xs) -- | /Optional Param/ "status" - Updated status of the pet instance HasOptionalParam UpdatePetWithForm StatusText where - applyOptionalParam req (StatusText xs) = - req `addForm` toForm ("status", xs) + applyOptionalParam req (StatusText xs) = + req `addForm` toForm ("status", xs) -- | @application/x-www-form-urlencoded@ instance Consumes UpdatePetWithForm MimeFormUrlEncoded @@ -266,21 +266,21 @@ Module : OpenAPIPetstore.API.Pet :: (Consumes UploadFile MimeMultipartFormData) => PetId -- ^ "petId" - ID of pet to update -> OpenAPIPetstoreRequest UploadFile MimeMultipartFormData ApiResponse MimeJSON -uploadFile (PetId petId) = - _mkRequest "POST" ["/pet/",toPath petId,"/uploadImage"] +uploadFile (PetId petId) = + _mkRequest "POST" ["/pet/",toPath petId,"/uploadImage"] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) data UploadFile -- | /Optional Param/ "additionalMetadata" - Additional data to pass to server instance HasOptionalParam UploadFile AdditionalMetadata where - applyOptionalParam req (AdditionalMetadata xs) = - req `_addMultiFormPart` NH.partLBS "additionalMetadata" (mimeRender' MimeMultipartFormData xs) + applyOptionalParam req (AdditionalMetadata xs) = + req `_addMultiFormPart` NH.partLBS "additionalMetadata" (mimeRender' MimeMultipartFormData xs) -- | /Optional Param/ "file" - file to upload instance HasOptionalParam UploadFile File2 where - applyOptionalParam req (File2 xs) = - req `_addMultiFormPart` NH.partFileSource "file" xs + applyOptionalParam req (File2 xs) = + req `_addMultiFormPart` NH.partFileSource "file" xs -- | @multipart/form-data@ instance Consumes UploadFile MimeMultipartFormData @@ -302,17 +302,17 @@ Module : OpenAPIPetstore.API.Pet => RequiredFile -- ^ "requiredFile" - file to upload -> PetId -- ^ "petId" - ID of pet to update -> OpenAPIPetstoreRequest UploadFileWithRequiredFile MimeMultipartFormData ApiResponse MimeJSON -uploadFileWithRequiredFile (RequiredFile requiredFile) (PetId petId) = - _mkRequest "POST" ["/fake/",toPath petId,"/uploadImageWithRequiredFile"] +uploadFileWithRequiredFile (RequiredFile requiredFile) (PetId petId) = + _mkRequest "POST" ["/fake/",toPath petId,"/uploadImageWithRequiredFile"] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - `_addMultiFormPart` NH.partFileSource "requiredFile" requiredFile + `_addMultiFormPart` NH.partFileSource "requiredFile" requiredFile data UploadFileWithRequiredFile -- | /Optional Param/ "additionalMetadata" - Additional data to pass to server instance HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata where - applyOptionalParam req (AdditionalMetadata xs) = - req `_addMultiFormPart` NH.partLBS "additionalMetadata" (mimeRender' MimeMultipartFormData xs) + applyOptionalParam req (AdditionalMetadata xs) = + req `_addMultiFormPart` NH.partLBS "additionalMetadata" (mimeRender' MimeMultipartFormData xs) -- | @multipart/form-data@ instance Consumes UploadFileWithRequiredFile MimeMultipartFormData diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Store.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Store.html index 4f6cf6a607..dac941819d 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Store.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Store.html @@ -68,8 +68,8 @@ Module : OpenAPIPetstore.API.Store deleteOrder :: OrderIdText -- ^ "orderId" - ID of the order that needs to be deleted -> OpenAPIPetstoreRequest DeleteOrder MimeNoContent NoContent MimeNoContent -deleteOrder (OrderIdText orderId) = - _mkRequest "DELETE" ["/store/order/",toPath orderId] +deleteOrder (OrderIdText orderId) = + _mkRequest "DELETE" ["/store/order/",toPath orderId] data DeleteOrder instance Produces DeleteOrder MimeNoContent @@ -105,11 +105,11 @@ Module : OpenAPIPetstore.API.Store -- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -- getOrderById - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> OrderId -- ^ "orderId" - ID of pet that needs to be fetched - -> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept -getOrderById _ (OrderId orderId) = - _mkRequest "GET" ["/store/order/",toPath orderId] + -> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept +getOrderById _ (OrderId orderId) = + _mkRequest "GET" ["/store/order/",toPath orderId] data GetOrderById -- | @application/xml@ @@ -125,14 +125,14 @@ Module : OpenAPIPetstore.API.Store -- Place an order for a pet -- placeOrder - :: (Consumes PlaceOrder contentType, MimeRender contentType Order) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') + :: (Consumes PlaceOrder contentType, MimeRender contentType Order) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') -> Order -- ^ "body" - order placed for purchasing the pet - -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept -placeOrder _ _ body = + -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept +placeOrder _ _ body = _mkRequest "POST" ["/store/order"] - `setBodyParam` body + `setBodyParam` body data PlaceOrder @@ -140,7 +140,7 @@ Module : OpenAPIPetstore.API.Store instance HasBodyParam PlaceOrder Order -- | @*/*@ -instance MimeType mtype => Consumes PlaceOrder mtype +instance MimeType mtype => Consumes PlaceOrder mtype -- | @application/xml@ instance Produces PlaceOrder MimeXML diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.User.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.User.html index c1fee5ceb5..d0e8d7556a 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.User.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.User.html @@ -66,13 +66,13 @@ Module : OpenAPIPetstore.API.User -- This can only be done by the logged in user. -- createUser - :: (Consumes CreateUser contentType, MimeRender contentType User) - => ContentType contentType -- ^ request content-type ('MimeType') + :: (Consumes CreateUser contentType, MimeRender contentType User) + => ContentType contentType -- ^ request content-type ('MimeType') -> User -- ^ "body" - Created user object - -> OpenAPIPetstoreRequest CreateUser contentType NoContent MimeNoContent -createUser _ body = + -> OpenAPIPetstoreRequest CreateUser contentType NoContent MimeNoContent +createUser _ body = _mkRequest "POST" ["/user"] - `setBodyParam` body + `setBodyParam` body data CreateUser @@ -80,7 +80,7 @@ Module : OpenAPIPetstore.API.User instance HasBodyParam CreateUser User -- | @*/*@ -instance MimeType mtype => Consumes CreateUser mtype +instance MimeType mtype => Consumes CreateUser mtype instance Produces CreateUser MimeNoContent @@ -92,13 +92,13 @@ Module : OpenAPIPetstore.API.User -- Creates list of users with given input array -- createUsersWithArrayInput - :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType Body) - => ContentType contentType -- ^ request content-type ('MimeType') + :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType Body) + => ContentType contentType -- ^ request content-type ('MimeType') -> Body -- ^ "body" - List of user object - -> OpenAPIPetstoreRequest CreateUsersWithArrayInput contentType NoContent MimeNoContent -createUsersWithArrayInput _ body = + -> OpenAPIPetstoreRequest CreateUsersWithArrayInput contentType NoContent MimeNoContent +createUsersWithArrayInput _ body = _mkRequest "POST" ["/user/createWithArray"] - `setBodyParam` body + `setBodyParam` body data CreateUsersWithArrayInput @@ -106,7 +106,7 @@ Module : OpenAPIPetstore.API.User instance HasBodyParam CreateUsersWithArrayInput Body -- | @*/*@ -instance MimeType mtype => Consumes CreateUsersWithArrayInput mtype +instance MimeType mtype => Consumes CreateUsersWithArrayInput mtype instance Produces CreateUsersWithArrayInput MimeNoContent @@ -118,13 +118,13 @@ Module : OpenAPIPetstore.API.User -- Creates list of users with given input array -- createUsersWithListInput - :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType Body) - => ContentType contentType -- ^ request content-type ('MimeType') + :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType Body) + => ContentType contentType -- ^ request content-type ('MimeType') -> Body -- ^ "body" - List of user object - -> OpenAPIPetstoreRequest CreateUsersWithListInput contentType NoContent MimeNoContent -createUsersWithListInput _ body = + -> OpenAPIPetstoreRequest CreateUsersWithListInput contentType NoContent MimeNoContent +createUsersWithListInput _ body = _mkRequest "POST" ["/user/createWithList"] - `setBodyParam` body + `setBodyParam` body data CreateUsersWithListInput @@ -132,7 +132,7 @@ Module : OpenAPIPetstore.API.User instance HasBodyParam CreateUsersWithListInput Body -- | @*/*@ -instance MimeType mtype => Consumes CreateUsersWithListInput mtype +instance MimeType mtype => Consumes CreateUsersWithListInput mtype instance Produces CreateUsersWithListInput MimeNoContent @@ -148,8 +148,8 @@ Module : OpenAPIPetstore.API.User deleteUser :: Username -- ^ "username" - The name that needs to be deleted -> OpenAPIPetstoreRequest DeleteUser MimeNoContent NoContent MimeNoContent -deleteUser (Username username) = - _mkRequest "DELETE" ["/user/",toPath username] +deleteUser (Username username) = + _mkRequest "DELETE" ["/user/",toPath username] data DeleteUser instance Produces DeleteUser MimeNoContent @@ -162,11 +162,11 @@ Module : OpenAPIPetstore.API.User -- Get user by user name -- getUserByName - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> Username -- ^ "username" - The name that needs to be fetched. Use user1 for testing. - -> OpenAPIPetstoreRequest GetUserByName MimeNoContent User accept -getUserByName _ (Username username) = - _mkRequest "GET" ["/user/",toPath username] + -> OpenAPIPetstoreRequest GetUserByName MimeNoContent User accept +getUserByName _ (Username username) = + _mkRequest "GET" ["/user/",toPath username] data GetUserByName -- | @application/xml@ @@ -182,14 +182,14 @@ Module : OpenAPIPetstore.API.User -- Logs user into the system -- loginUser - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> Username -- ^ "username" - The user name for login -> Password -- ^ "password" - The password for login in clear text - -> OpenAPIPetstoreRequest LoginUser MimeNoContent Text accept -loginUser _ (Username username) (Password password) = + -> OpenAPIPetstoreRequest LoginUser MimeNoContent Text accept +loginUser _ (Username username) (Password password) = _mkRequest "GET" ["/user/login"] - `setQuery` toQuery ("username", Just username) - `setQuery` toQuery ("password", Just password) + `setQuery` toQuery ("username", Just username) + `setQuery` toQuery ("password", Just password) data LoginUser -- | @application/xml@ @@ -222,14 +222,14 @@ Module : OpenAPIPetstore.API.User -- This can only be done by the logged in user. -- updateUser - :: (Consumes UpdateUser contentType, MimeRender contentType User) - => ContentType contentType -- ^ request content-type ('MimeType') + :: (Consumes UpdateUser contentType, MimeRender contentType User) + => ContentType contentType -- ^ request content-type ('MimeType') -> User -- ^ "body" - Updated user object -> Username -- ^ "username" - name that need to be deleted - -> OpenAPIPetstoreRequest UpdateUser contentType NoContent MimeNoContent -updateUser _ body (Username username) = - _mkRequest "PUT" ["/user/",toPath username] - `setBodyParam` body + -> OpenAPIPetstoreRequest UpdateUser contentType NoContent MimeNoContent +updateUser _ body (Username username) = + _mkRequest "PUT" ["/user/",toPath username] + `setBodyParam` body data UpdateUser @@ -237,7 +237,7 @@ Module : OpenAPIPetstore.API.User instance HasBodyParam UpdateUser User -- | @*/*@ -instance MimeType mtype => Consumes UpdateUser mtype +instance MimeType mtype => Consumes UpdateUser mtype instance Produces UpdateUser MimeNoContent diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Client.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Client.html index 41359014a1..2b1ac4a5cb 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Client.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Client.html @@ -55,20 +55,20 @@ Module : OpenAPIPetstore.Client -- | send a request returning the raw http response dispatchLbs - :: (Produces req accept, MimeType contentType) + :: (Produces req accept, MimeType contentType) => NH.Manager -- ^ http-client Connection manager -> OpenAPIPetstoreConfig -- ^ config - -> OpenAPIPetstoreRequest req contentType res accept -- ^ request + -> OpenAPIPetstoreRequest req contentType res accept -- ^ request -> IO (NH.Response BCL.ByteString) -- ^ response -dispatchLbs manager config request = do - initReq <- _toInitRequest config request - dispatchInitUnsafe manager config initReq +dispatchLbs manager config request = do + initReq <- _toInitRequest config request + dispatchInitUnsafe manager config initReq -- ** Mime -- | pair of decoded http body and http response -data MimeResult res = - MimeResult { mimeResult :: Either MimeError res -- ^ decoded http body +data MimeResult res = + MimeResult { mimeResult :: Either MimeError res -- ^ decoded http body , mimeResultResponse :: NH.Response BCL.ByteString -- ^ http response } deriving (Show, Functor, Foldable, Traversable) @@ -82,137 +82,137 @@ Module : OpenAPIPetstore.Client -- | send a request returning the 'MimeResult' dispatchMime - :: forall req contentType res accept. (Produces req accept, MimeUnrender accept res, MimeType contentType) + :: forall req contentType res accept. (Produces req accept, MimeUnrender accept res, MimeType contentType) => NH.Manager -- ^ http-client Connection manager -> OpenAPIPetstoreConfig -- ^ config - -> OpenAPIPetstoreRequest req contentType res accept -- ^ request - -> IO (MimeResult res) -- ^ response -dispatchMime manager config request = do - httpResponse <- dispatchLbs manager config request - let statusCode = NH.statusCode . NH.responseStatus $ httpResponse - parsedResult <- - runConfigLogWithExceptions "Client" config $ - do if (statusCode >= 400 && statusCode < 600) + -> OpenAPIPetstoreRequest req contentType res accept -- ^ request + -> IO (MimeResult res) -- ^ response +dispatchMime manager config request = do + httpResponse <- dispatchLbs manager config request + let statusCode = NH.statusCode . NH.responseStatus $ httpResponse + parsedResult <- + runConfigLogWithExceptions "Client" config $ + do if (statusCode >= 400 && statusCode < 600) then do - let s = "error statusCode: " ++ show statusCode - _log "Client" levelError (T.pack s) - pure (Left (MimeError s httpResponse)) - else case mimeUnrender (P.Proxy :: P.Proxy accept) (NH.responseBody httpResponse) of - Left s -> do - _log "Client" levelError (T.pack s) - pure (Left (MimeError s httpResponse)) - Right r -> pure (Right r) - return (MimeResult parsedResult httpResponse) + let s = "error statusCode: " ++ show statusCode + _log "Client" levelError (T.pack s) + pure (Left (MimeError s httpResponse)) + else case mimeUnrender (P.Proxy :: P.Proxy accept) (NH.responseBody httpResponse) of + Left s -> do + _log "Client" levelError (T.pack s) + pure (Left (MimeError s httpResponse)) + Right r -> pure (Right r) + return (MimeResult parsedResult httpResponse) -- | like 'dispatchMime', but only returns the decoded http body dispatchMime' - :: (Produces req accept, MimeUnrender accept res, MimeType contentType) + :: (Produces req accept, MimeUnrender accept res, MimeType contentType) => NH.Manager -- ^ http-client Connection manager -> OpenAPIPetstoreConfig -- ^ config - -> OpenAPIPetstoreRequest req contentType res accept -- ^ request - -> IO (Either MimeError res) -- ^ response -dispatchMime' manager config request = do - MimeResult parsedResult _ <- dispatchMime manager config request - return parsedResult + -> OpenAPIPetstoreRequest req contentType res accept -- ^ request + -> IO (Either MimeError res) -- ^ response +dispatchMime' manager config request = do + MimeResult parsedResult _ <- dispatchMime manager config request + return parsedResult -- ** Unsafe -- | like 'dispatchReqLbs', but does not validate the operation is a 'Producer' of the "accept" 'MimeType'. (Useful if the server's response is undocumented) dispatchLbsUnsafe - :: (MimeType accept, MimeType contentType) + :: (MimeType accept, MimeType contentType) => NH.Manager -- ^ http-client Connection manager -> OpenAPIPetstoreConfig -- ^ config - -> OpenAPIPetstoreRequest req contentType res accept -- ^ request + -> OpenAPIPetstoreRequest req contentType res accept -- ^ request -> IO (NH.Response BCL.ByteString) -- ^ response -dispatchLbsUnsafe manager config request = do - initReq <- _toInitRequest config request - dispatchInitUnsafe manager config initReq +dispatchLbsUnsafe manager config request = do + initReq <- _toInitRequest config request + dispatchInitUnsafe manager config initReq -- | dispatch an InitRequest dispatchInitUnsafe :: NH.Manager -- ^ http-client Connection manager -> OpenAPIPetstoreConfig -- ^ config - -> InitRequest req contentType res accept -- ^ init request + -> InitRequest req contentType res accept -- ^ init request -> IO (NH.Response BCL.ByteString) -- ^ response -dispatchInitUnsafe manager config (InitRequest req) = do - runConfigLogWithExceptions src config $ - do _log src levelInfo requestLogMsg - _log src levelDebug requestDbgLogMsg - res <- P.liftIO $ NH.httpLbs req manager - _log src levelInfo (responseLogMsg res) - _log src levelDebug ((T.pack . show) res) - return res +dispatchInitUnsafe manager config (InitRequest req) = do + runConfigLogWithExceptions src config $ + do _log src levelInfo requestLogMsg + _log src levelDebug requestDbgLogMsg + res <- P.liftIO $ NH.httpLbs req manager + _log src levelInfo (responseLogMsg res) + _log src levelDebug ((T.pack . show) res) + return res where - src = "Client" - endpoint = + src = "Client" + endpoint = T.pack $ BC.unpack $ - NH.method req <> " " <> NH.host req <> NH.path req <> NH.queryString req - requestLogMsg = "REQ:" <> endpoint - requestDbgLogMsg = - "Headers=" <> (T.pack . show) (NH.requestHeaders req) <> " Body=" <> - (case NH.requestBody req of - NH.RequestBodyLBS xs -> T.decodeUtf8 (BL.toStrict xs) + NH.method req <> " " <> NH.host req <> NH.path req <> NH.queryString req + requestLogMsg = "REQ:" <> endpoint + requestDbgLogMsg = + "Headers=" <> (T.pack . show) (NH.requestHeaders req) <> " Body=" <> + (case NH.requestBody req of + NH.RequestBodyLBS xs -> T.decodeUtf8 (BL.toStrict xs) _ -> "<RequestBody>") - responseStatusCode = (T.pack . show) . NH.statusCode . NH.responseStatus - responseLogMsg res = - "RES:statusCode=" <> responseStatusCode res <> " (" <> endpoint <> ")" + responseStatusCode = (T.pack . show) . NH.statusCode . NH.responseStatus + responseLogMsg res = + "RES:statusCode=" <> responseStatusCode res <> " (" <> endpoint <> ")" -- * InitRequest -- | wraps an http-client 'Request' with request/response type parameters -newtype InitRequest req contentType res accept = InitRequest +newtype InitRequest req contentType res accept = InitRequest { unInitRequest :: NH.Request } deriving (Show) -- | Build an http-client 'Request' record from the supplied config and request _toInitRequest - :: (MimeType accept, MimeType contentType) + :: (MimeType accept, MimeType contentType) => OpenAPIPetstoreConfig -- ^ config - -> OpenAPIPetstoreRequest req contentType res accept -- ^ request - -> IO (InitRequest req contentType res accept) -- ^ initialized request -_toInitRequest config req0 = - runConfigLogWithExceptions "Client" config $ do - parsedReq <- P.liftIO $ NH.parseRequest $ BCL.unpack $ BCL.append (configHost config) (BCL.concat (rUrlPath req0)) - req1 <- P.liftIO $ _applyAuthMethods req0 config + -> OpenAPIPetstoreRequest req contentType res accept -- ^ request + -> IO (InitRequest req contentType res accept) -- ^ initialized request +_toInitRequest config req0 = + runConfigLogWithExceptions "Client" config $ do + parsedReq <- P.liftIO $ NH.parseRequest $ BCL.unpack $ BCL.append (configHost config) (BCL.concat (rUrlPath req0)) + req1 <- P.liftIO $ _applyAuthMethods req0 config P.when - (configValidateAuthMethods config && (not . null . rAuthTypes) req1) - (E.throw $ AuthMethodException $ "AuthMethod not configured: " <> (show . head . rAuthTypes) req1) - let req2 = req1 & _setContentTypeHeader & _setAcceptHeader - reqHeaders = ("User-Agent", WH.toHeader (configUserAgent config)) : paramsHeaders (rParams req2) - reqQuery = NH.renderQuery True (paramsQuery (rParams req2)) - pReq = parsedReq { NH.method = (rMethod req2) - , NH.requestHeaders = reqHeaders - , NH.queryString = reqQuery + (configValidateAuthMethods config && (not . null . rAuthTypes) req1) + (E.throw $ AuthMethodException $ "AuthMethod not configured: " <> (show . head . rAuthTypes) req1) + let req2 = req1 & _setContentTypeHeader & _setAcceptHeader + reqHeaders = ("User-Agent", WH.toHeader (configUserAgent config)) : paramsHeaders (rParams req2) + reqQuery = NH.renderQuery True (paramsQuery (rParams req2)) + pReq = parsedReq { NH.method = (rMethod req2) + , NH.requestHeaders = reqHeaders + , NH.queryString = reqQuery } - outReq <- case paramsBody (rParams req2) of - ParamBodyNone -> pure (pReq { NH.requestBody = mempty }) - ParamBodyB bs -> pure (pReq { NH.requestBody = NH.RequestBodyBS bs }) - ParamBodyBL bl -> pure (pReq { NH.requestBody = NH.RequestBodyLBS bl }) - ParamBodyFormUrlEncoded form -> pure (pReq { NH.requestBody = NH.RequestBodyLBS (WH.urlEncodeForm form) }) - ParamBodyMultipartFormData parts -> NH.formDataBody parts pReq + outReq <- case paramsBody (rParams req2) of + ParamBodyNone -> pure (pReq { NH.requestBody = mempty }) + ParamBodyB bs -> pure (pReq { NH.requestBody = NH.RequestBodyBS bs }) + ParamBodyBL bl -> pure (pReq { NH.requestBody = NH.RequestBodyLBS bl }) + ParamBodyFormUrlEncoded form -> pure (pReq { NH.requestBody = NH.RequestBodyLBS (WH.urlEncodeForm form) }) + ParamBodyMultipartFormData parts -> NH.formDataBody parts pReq - pure (InitRequest outReq) + pure (InitRequest outReq) -- | modify the underlying Request -modifyInitRequest :: InitRequest req contentType res accept -> (NH.Request -> NH.Request) -> InitRequest req contentType res accept -modifyInitRequest (InitRequest req) f = InitRequest (f req) +modifyInitRequest :: InitRequest req contentType res accept -> (NH.Request -> NH.Request) -> InitRequest req contentType res accept +modifyInitRequest (InitRequest req) f = InitRequest (f req) -- | modify the underlying Request (monadic) -modifyInitRequestM :: Monad m => InitRequest req contentType res accept -> (NH.Request -> m NH.Request) -> m (InitRequest req contentType res accept) -modifyInitRequestM (InitRequest req) f = fmap InitRequest (f req) +modifyInitRequestM :: Monad m => InitRequest req contentType res accept -> (NH.Request -> m NH.Request) -> m (InitRequest req contentType res accept) +modifyInitRequestM (InitRequest req) f = fmap InitRequest (f req) -- ** Logging -- | Run a block using the configured logger instance runConfigLog - :: P.MonadIO m - => OpenAPIPetstoreConfig -> LogExec m -runConfigLog config = configLogExecWithContext config (configLogContext config) + :: P.MonadIO m + => OpenAPIPetstoreConfig -> LogExec m +runConfigLog config = configLogExecWithContext config (configLogContext config) -- | Run a block using the configured logger instance (logs exceptions) runConfigLogWithExceptions - :: (E.MonadCatch m, P.MonadIO m) - => T.Text -> OpenAPIPetstoreConfig -> LogExec m -runConfigLogWithExceptions src config = runConfigLog config . logExceptions src + :: (E.MonadCatch m, P.MonadIO m) + => T.Text -> OpenAPIPetstoreConfig -> LogExec m +runConfigLogWithExceptions src config = runConfigLog config . logExceptions src \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Core.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Core.html index 1af661718b..0719ac63ad 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Core.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Core.html @@ -23,7 +23,7 @@ Module : OpenAPIPetstore.Core {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} -{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} module OpenAPIPetstore.Core where @@ -81,11 +81,11 @@ Module : OpenAPIPetstore.Core -- | display the config instance P.Show OpenAPIPetstoreConfig where - show c = + show c = T.printf "{ configHost = %v, configUserAgent = %v, ..}" - (show (configHost c)) - (show (configUserAgent c)) + (show (configHost c)) + (show (configUserAgent c)) -- | constructs a default OpenAPIPetstoreConfig -- @@ -99,36 +99,36 @@ Module : OpenAPIPetstore.Core -- newConfig :: IO OpenAPIPetstoreConfig newConfig = do - logCxt <- initLogContext + logCxt <- initLogContext return $ OpenAPIPetstoreConfig { configHost = "http://petstore.swagger.io:80/v2" , configUserAgent = "openapi-petstore/0.1.0.0" , configLogExecWithContext = runDefaultLogExecWithContext - , configLogContext = logCxt + , configLogContext = logCxt , configAuthMethods = [] , configValidateAuthMethods = True } -- | updates config use AuthMethod on matching requests -addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig -addAuthMethod config@OpenAPIPetstoreConfig {configAuthMethods = as} a = - config { configAuthMethods = AnyAuthMethod a : as} +addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig +addAuthMethod config@OpenAPIPetstoreConfig {configAuthMethods = as} a = + config { configAuthMethods = AnyAuthMethod a : as} -- | updates the config to use stdout logging withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig -withStdoutLogging p = do - logCxt <- stdoutLoggingContext (configLogContext p) - return $ p { configLogExecWithContext = stdoutLoggingExec, configLogContext = logCxt } +withStdoutLogging p = do + logCxt <- stdoutLoggingContext (configLogContext p) + return $ p { configLogExecWithContext = stdoutLoggingExec, configLogContext = logCxt } -- | updates the config to use stderr logging withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig -withStderrLogging p = do - logCxt <- stderrLoggingContext (configLogContext p) - return $ p { configLogExecWithContext = stderrLoggingExec, configLogContext = logCxt } +withStderrLogging p = do + logCxt <- stderrLoggingContext (configLogContext p) + return $ p { configLogExecWithContext = stderrLoggingExec, configLogContext = logCxt } -- | updates the config to disable logging withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig -withNoLogging p = p { configLogExecWithContext = runNullLogExec} +withNoLogging p = p { configLogExecWithContext = runNullLogExec} -- * OpenAPIPetstoreRequest @@ -140,7 +140,7 @@ Module : OpenAPIPetstore.Core -- * contentType - 'MimeType' associated with request body -- * res - response model -- * accept - 'MimeType' associated with response body -data OpenAPIPetstoreRequest req contentType res accept = OpenAPIPetstoreRequest +data OpenAPIPetstoreRequest req contentType res accept = OpenAPIPetstoreRequest { rMethod :: NH.Method -- ^ Method of OpenAPIPetstoreRequest , rUrlPath :: [BCL.ByteString] -- ^ Endpoint of OpenAPIPetstoreRequest , rParams :: Params -- ^ params of OpenAPIPetstoreRequest @@ -149,47 +149,47 @@ Module : OpenAPIPetstore.Core deriving (P.Show) -- | 'rMethod' Lens -rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) NH.Method -rMethodL f OpenAPIPetstoreRequest{..} = (\rMethod -> OpenAPIPetstoreRequest { rMethod, ..} ) <$> f rMethod +rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) NH.Method +rMethodL f OpenAPIPetstoreRequest{..} = (\rMethod -> OpenAPIPetstoreRequest { rMethod, ..} ) <$> f rMethod {-# INLINE rMethodL #-} -- | 'rUrlPath' Lens -rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [BCL.ByteString] -rUrlPathL f OpenAPIPetstoreRequest{..} = (\rUrlPath -> OpenAPIPetstoreRequest { rUrlPath, ..} ) <$> f rUrlPath +rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [BCL.ByteString] +rUrlPathL f OpenAPIPetstoreRequest{..} = (\rUrlPath -> OpenAPIPetstoreRequest { rUrlPath, ..} ) <$> f rUrlPath {-# INLINE rUrlPathL #-} -- | 'rParams' Lens -rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params -rParamsL f OpenAPIPetstoreRequest{..} = (\rParams -> OpenAPIPetstoreRequest { rParams, ..} ) <$> f rParams +rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params +rParamsL f OpenAPIPetstoreRequest{..} = (\rParams -> OpenAPIPetstoreRequest { rParams, ..} ) <$> f rParams {-# INLINE rParamsL #-} -- | 'rParams' Lens -rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [P.TypeRep] -rAuthTypesL f OpenAPIPetstoreRequest{..} = (\rAuthTypes -> OpenAPIPetstoreRequest { rAuthTypes, ..} ) <$> f rAuthTypes +rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [P.TypeRep] +rAuthTypesL f OpenAPIPetstoreRequest{..} = (\rAuthTypes -> OpenAPIPetstoreRequest { rAuthTypes, ..} ) <$> f rAuthTypes {-# INLINE rAuthTypesL #-} -- * HasBodyParam -- | Designates the body parameter of a request -class HasBodyParam req param where - setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept - setBodyParam req xs = - req `_setBodyLBS` mimeRender (P.Proxy :: P.Proxy contentType) xs & _setContentTypeHeader +class HasBodyParam req param where + setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept + setBodyParam req xs = + req `_setBodyLBS` mimeRender (P.Proxy :: P.Proxy contentType) xs & _setContentTypeHeader -- * HasOptionalParam -- | Designates the optional parameters of a request -class HasOptionalParam req param where +class HasOptionalParam req param where {-# MINIMAL applyOptionalParam | (-&-) #-} -- | Apply an optional parameter to a request - applyOptionalParam :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept - applyOptionalParam = (-&-) + applyOptionalParam :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept + applyOptionalParam = (-&-) {-# INLINE applyOptionalParam #-} -- | infix operator \/ alias for 'addOptionalParam' - (-&-) :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept - (-&-) = applyOptionalParam + (-&-) :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept + (-&-) = applyOptionalParam {-# INLINE (-&-) #-} infixl 2 -&- @@ -204,17 +204,17 @@ Module : OpenAPIPetstore.Core -- | 'paramsQuery' Lens paramsQueryL :: Lens_' Params NH.Query -paramsQueryL f Params{..} = (\paramsQuery -> Params { paramsQuery, ..} ) <$> f paramsQuery +paramsQueryL f Params{..} = (\paramsQuery -> Params { paramsQuery, ..} ) <$> f paramsQuery {-# INLINE paramsQueryL #-} -- | 'paramsHeaders' Lens paramsHeadersL :: Lens_' Params NH.RequestHeaders -paramsHeadersL f Params{..} = (\paramsHeaders -> Params { paramsHeaders, ..} ) <$> f paramsHeaders +paramsHeadersL f Params{..} = (\paramsHeaders -> Params { paramsHeaders, ..} ) <$> f paramsHeaders {-# INLINE paramsHeadersL #-} -- | 'paramsBody' Lens paramsBodyL :: Lens_' Params ParamBody -paramsBodyL f Params{..} = (\paramsBody -> Params { paramsBody, ..} ) <$> f paramsBody +paramsBodyL f Params{..} = (\paramsBody -> Params { paramsBody, ..} ) <$> f paramsBody {-# INLINE paramsBodyL #-} -- | Request Body @@ -230,90 +230,90 @@ Module : OpenAPIPetstore.Core _mkRequest :: NH.Method -- ^ Method -> [BCL.ByteString] -- ^ Endpoint - -> OpenAPIPetstoreRequest req contentType res accept -- ^ req: Request Type, res: Response Type -_mkRequest m u = OpenAPIPetstoreRequest m u _mkParams [] + -> OpenAPIPetstoreRequest req contentType res accept -- ^ req: Request Type, res: Response Type +_mkRequest m u = OpenAPIPetstoreRequest m u _mkParams [] _mkParams :: Params _mkParams = Params [] [] ParamBodyNone -setHeader :: OpenAPIPetstoreRequest req contentType res accept -> [NH.Header] -> OpenAPIPetstoreRequest req contentType res accept -setHeader req header = - req `removeHeader` P.fmap P.fst header & - L.over (rParamsL . paramsHeadersL) (header P.++) +setHeader :: OpenAPIPetstoreRequest req contentType res accept -> [NH.Header] -> OpenAPIPetstoreRequest req contentType res accept +setHeader req header = + req `removeHeader` P.fmap P.fst header & + L.over (rParamsL . paramsHeadersL) (header P.++) -removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [NH.HeaderName] -> OpenAPIPetstoreRequest req contentType res accept -removeHeader req header = - req & +removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [NH.HeaderName] -> OpenAPIPetstoreRequest req contentType res accept +removeHeader req header = + req & L.over (rParamsL . paramsHeadersL) - (P.filter (\h -> cifst h `P.notElem` P.fmap CI.mk header)) + (P.filter (\h -> cifst h `P.notElem` P.fmap CI.mk header)) where - cifst = CI.mk . P.fst + cifst = CI.mk . P.fst -_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept -_setContentTypeHeader req = - case mimeType (P.Proxy :: P.Proxy contentType) of - Just m -> req `setHeader` [("content-type", BC.pack $ P.show m)] - Nothing -> req `removeHeader` ["content-type"] +_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept +_setContentTypeHeader req = + case mimeType (P.Proxy :: P.Proxy contentType) of + Just m -> req `setHeader` [("content-type", BC.pack $ P.show m)] + Nothing -> req `removeHeader` ["content-type"] -_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept -_setAcceptHeader req = - case mimeType (P.Proxy :: P.Proxy accept) of - Just m -> req `setHeader` [("accept", BC.pack $ P.show m)] - Nothing -> req `removeHeader` ["accept"] +_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept +_setAcceptHeader req = + case mimeType (P.Proxy :: P.Proxy accept) of + Just m -> req `setHeader` [("accept", BC.pack $ P.show m)] + Nothing -> req `removeHeader` ["accept"] -setQuery :: OpenAPIPetstoreRequest req contentType res accept -> [NH.QueryItem] -> OpenAPIPetstoreRequest req contentType res accept -setQuery req query = - req & +setQuery :: OpenAPIPetstoreRequest req contentType res accept -> [NH.QueryItem] -> OpenAPIPetstoreRequest req contentType res accept +setQuery req query = + req & L.over (rParamsL . paramsQueryL) - ((query P.++) . P.filter (\q -> cifst q `P.notElem` P.fmap cifst query)) + ((query P.++) . P.filter (\q -> cifst q `P.notElem` P.fmap cifst query)) where - cifst = CI.mk . P.fst + cifst = CI.mk . P.fst -addForm :: OpenAPIPetstoreRequest req contentType res accept -> WH.Form -> OpenAPIPetstoreRequest req contentType res accept -addForm req newform = - let form = case paramsBody (rParams req) of - ParamBodyFormUrlEncoded _form -> _form +addForm :: OpenAPIPetstoreRequest req contentType res accept -> WH.Form -> OpenAPIPetstoreRequest req contentType res accept +addForm req newform = + let form = case paramsBody (rParams req) of + ParamBodyFormUrlEncoded _form -> _form _ -> mempty - in req & L.set (rParamsL . paramsBodyL) (ParamBodyFormUrlEncoded (newform <> form)) + in req & L.set (rParamsL . paramsBodyL) (ParamBodyFormUrlEncoded (newform <> form)) -_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> NH.Part -> OpenAPIPetstoreRequest req contentType res accept -_addMultiFormPart req newpart = - let parts = case paramsBody (rParams req) of - ParamBodyMultipartFormData _parts -> _parts +_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> NH.Part -> OpenAPIPetstoreRequest req contentType res accept +_addMultiFormPart req newpart = + let parts = case paramsBody (rParams req) of + ParamBodyMultipartFormData _parts -> _parts _ -> [] - in req & L.set (rParamsL . paramsBodyL) (ParamBodyMultipartFormData (newpart : parts)) + in req & L.set (rParamsL . paramsBodyL) (ParamBodyMultipartFormData (newpart : parts)) -_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> B.ByteString -> OpenAPIPetstoreRequest req contentType res accept -_setBodyBS req body = - req & L.set (rParamsL . paramsBodyL) (ParamBodyB body) +_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> B.ByteString -> OpenAPIPetstoreRequest req contentType res accept +_setBodyBS req body = + req & L.set (rParamsL . paramsBodyL) (ParamBodyB body) -_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> BL.ByteString -> OpenAPIPetstoreRequest req contentType res accept -_setBodyLBS req body = - req & L.set (rParamsL . paramsBodyL) (ParamBodyBL body) +_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> BL.ByteString -> OpenAPIPetstoreRequest req contentType res accept +_setBodyLBS req body = + req & L.set (rParamsL . paramsBodyL) (ParamBodyBL body) -_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> P.Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept -_hasAuthType req proxy = - req & L.over rAuthTypesL (P.typeRep proxy :) +_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> P.Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept +_hasAuthType req proxy = + req & L.over rAuthTypesL (P.typeRep proxy :) -- ** Params Utils toPath - :: WH.ToHttpApiData a - => a -> BCL.ByteString + :: WH.ToHttpApiData a + => a -> BCL.ByteString toPath = BB.toLazyByteString . WH.toEncodedUrlPiece -toHeader :: WH.ToHttpApiData a => (NH.HeaderName, a) -> [NH.Header] -toHeader x = [fmap WH.toHeader x] +toHeader :: WH.ToHttpApiData a => (NH.HeaderName, a) -> [NH.Header] +toHeader x = [fmap WH.toHeader x] -toForm :: WH.ToHttpApiData v => (BC.ByteString, v) -> WH.Form -toForm (k,v) = WH.toForm [(BC.unpack k,v)] +toForm :: WH.ToHttpApiData v => (BC.ByteString, v) -> WH.Form +toForm (k,v) = WH.toForm [(BC.unpack k,v)] -toQuery :: WH.ToHttpApiData a => (BC.ByteString, Maybe a) -> [NH.QueryItem] -toQuery x = [(fmap . fmap) toQueryParam x] - where toQueryParam = T.encodeUtf8 . WH.toQueryParam +toQuery :: WH.ToHttpApiData a => (BC.ByteString, Maybe a) -> [NH.QueryItem] +toQuery x = [(fmap . fmap) toQueryParam x] + where toQueryParam = T.encodeUtf8 . WH.toQueryParam -- *** OpenAPI `CollectionFormat` Utils @@ -325,38 +325,38 @@ Module : OpenAPIPetstore.Core | PipeSeparated -- ^ `value1|value2|value2` | MultiParamArray -- ^ Using multiple GET parameters, e.g. `foo=bar&foo=baz`. This is valid only for parameters in "query" ('NH.Query') or "formData" ('WH.Form') -toHeaderColl :: WH.ToHttpApiData a => CollectionFormat -> (NH.HeaderName, [a]) -> [NH.Header] -toHeaderColl c xs = _toColl c toHeader xs +toHeaderColl :: WH.ToHttpApiData a => CollectionFormat -> (NH.HeaderName, [a]) -> [NH.Header] +toHeaderColl c xs = _toColl c toHeader xs -toFormColl :: WH.ToHttpApiData v => CollectionFormat -> (BC.ByteString, [v]) -> WH.Form -toFormColl c xs = WH.toForm $ fmap unpack $ _toColl c toHeader $ pack xs +toFormColl :: WH.ToHttpApiData v => CollectionFormat -> (BC.ByteString, [v]) -> WH.Form +toFormColl c xs = WH.toForm $ fmap unpack $ _toColl c toHeader $ pack xs where - pack (k,v) = (CI.mk k, v) - unpack (k,v) = (BC.unpack (CI.original k), BC.unpack v) + pack (k,v) = (CI.mk k, v) + unpack (k,v) = (BC.unpack (CI.original k), BC.unpack v) -toQueryColl :: WH.ToHttpApiData a => CollectionFormat -> (BC.ByteString, Maybe [a]) -> NH.Query -toQueryColl c xs = _toCollA c toQuery xs +toQueryColl :: WH.ToHttpApiData a => CollectionFormat -> (BC.ByteString, Maybe [a]) -> NH.Query +toQueryColl c xs = _toCollA c toQuery xs -_toColl :: P.Traversable f => CollectionFormat -> (f a -> [(b, BC.ByteString)]) -> f [a] -> [(b, BC.ByteString)] -_toColl c encode xs = fmap (fmap P.fromJust) (_toCollA' c fencode BC.singleton (fmap Just xs)) - where fencode = fmap (fmap Just) . encode . fmap P.fromJust +_toColl :: P.Traversable f => CollectionFormat -> (f a -> [(b, BC.ByteString)]) -> f [a] -> [(b, BC.ByteString)] +_toColl c encode xs = fmap (fmap P.fromJust) (_toCollA' c fencode BC.singleton (fmap Just xs)) + where fencode = fmap (fmap Just) . encode . fmap P.fromJust {-# INLINE fencode #-} -_toCollA :: (P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t BC.ByteString)]) -> f (t [a]) -> [(b, t BC.ByteString)] -_toCollA c encode xs = _toCollA' c encode BC.singleton xs +_toCollA :: (P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t BC.ByteString)]) -> f (t [a]) -> [(b, t BC.ByteString)] +_toCollA c encode xs = _toCollA' c encode BC.singleton xs -_toCollA' :: (P.Monoid c, P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)] -_toCollA' c encode one xs = case c of - CommaSeparated -> go (one ',') - SpaceSeparated -> go (one ' ') - TabSeparated -> go (one '\t') - PipeSeparated -> go (one '|') - MultiParamArray -> expandList +_toCollA' :: (P.Monoid c, P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)] +_toCollA' c encode one xs = case c of + CommaSeparated -> go (one ',') + SpaceSeparated -> go (one ' ') + TabSeparated -> go (one '\t') + PipeSeparated -> go (one '|') + MultiParamArray -> expandList where - go sep = - [P.foldl1 (\(sk, sv) (_, v) -> (sk, (combine sep <$> sv <*> v) <|> sv <|> v)) expandList] - combine sep x y = x <> sep <> y - expandList = (P.concatMap encode . (P.traverse . P.traverse) P.toList) xs + go sep = + [P.foldl1 (\(sk, sv) (_, v) -> (sk, (combine sep <$> sv <*> v) <|> sv <|> v)) expandList] + combine sep x y = x <> sep <> y + expandList = (P.concatMap encode . (P.traverse . P.traverse) P.toList) xs {-# INLINE go #-} {-# INLINE expandList #-} {-# INLINE combine #-} @@ -364,18 +364,18 @@ Module : OpenAPIPetstore.Core -- * AuthMethods -- | Provides a method to apply auth methods to requests -class P.Typeable a => - AuthMethod a where +class P.Typeable a => + AuthMethod a where applyAuthMethod :: OpenAPIPetstoreConfig - -> a - -> OpenAPIPetstoreRequest req contentType res accept - -> IO (OpenAPIPetstoreRequest req contentType res accept) + -> a + -> OpenAPIPetstoreRequest req contentType res accept + -> IO (OpenAPIPetstoreRequest req contentType res accept) -- | An existential wrapper for any AuthMethod -data AnyAuthMethod = forall a. AuthMethod a => AnyAuthMethod a deriving (P.Typeable) +data AnyAuthMethod = forall a. AuthMethod a => AnyAuthMethod a deriving (P.Typeable) -instance AuthMethod AnyAuthMethod where applyAuthMethod config (AnyAuthMethod a) req = applyAuthMethod config a req +instance AuthMethod AnyAuthMethod where applyAuthMethod config (AnyAuthMethod a) req = applyAuthMethod config a req -- | indicates exceptions related to AuthMethods data AuthMethodException = AuthMethodException String deriving (P.Show, P.Typeable) @@ -384,37 +384,37 @@ Module : OpenAPIPetstore.Core -- | apply all matching AuthMethods in config to request _applyAuthMethods - :: OpenAPIPetstoreRequest req contentType res accept + :: OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreConfig - -> IO (OpenAPIPetstoreRequest req contentType res accept) -_applyAuthMethods req config@(OpenAPIPetstoreConfig {configAuthMethods = as}) = - foldlM go req as + -> IO (OpenAPIPetstoreRequest req contentType res accept) +_applyAuthMethods req config@(OpenAPIPetstoreConfig {configAuthMethods = as}) = + foldlM go req as where - go r (AnyAuthMethod a) = applyAuthMethod config a r + go r (AnyAuthMethod a) = applyAuthMethod config a r -- * Utils -- | Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON) _omitNulls :: [(Text, A.Value)] -> A.Value -_omitNulls = A.object . P.filter notNull +_omitNulls = A.object . P.filter notNull where - notNull (_, A.Null) = False + notNull (_, A.Null) = False notNull _ = True -- | Encodes fields using WH.toQueryParam -_toFormItem :: (WH.ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) -_toFormItem name x = (name,) . (:[]) . WH.toQueryParam <$> x +_toFormItem :: (WH.ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) +_toFormItem name x = (name,) . (:[]) . WH.toQueryParam <$> x -- | Collapse (Just "") to Nothing _emptyToNothing :: Maybe String -> Maybe String _emptyToNothing (Just "") = Nothing -_emptyToNothing x = x +_emptyToNothing x = x {-# INLINE _emptyToNothing #-} -- | Collapse (Just mempty) to Nothing -_memptyToNothing :: (P.Monoid a, P.Eq a) => Maybe a -> Maybe a -_memptyToNothing (Just x) | x P.== P.mempty = Nothing -_memptyToNothing x = x +_memptyToNothing :: (P.Monoid a, P.Eq a) => Maybe a -> Maybe a +_memptyToNothing (Just x) | x P.== P.mempty = Nothing +_memptyToNothing x = x {-# INLINE _memptyToNothing #-} -- * DateTime Formatting @@ -422,35 +422,35 @@ Module : OpenAPIPetstore.Core newtype DateTime = DateTime { unDateTime :: TI.UTCTime } deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData,TI.ParseTime,TI.FormatTime) instance A.FromJSON DateTime where - parseJSON = A.withText "DateTime" (_readDateTime . T.unpack) + parseJSON = A.withText "DateTime" (_readDateTime . T.unpack) instance A.ToJSON DateTime where - toJSON (DateTime t) = A.toJSON (_showDateTime t) + toJSON (DateTime t) = A.toJSON (_showDateTime t) instance WH.FromHttpApiData DateTime where - parseUrlPiece = P.left T.pack . _readDateTime . T.unpack + parseUrlPiece = P.left T.pack . _readDateTime . T.unpack instance WH.ToHttpApiData DateTime where - toUrlPiece (DateTime t) = T.pack (_showDateTime t) + toUrlPiece (DateTime t) = T.pack (_showDateTime t) instance P.Show DateTime where - show (DateTime t) = _showDateTime t + show (DateTime t) = _showDateTime t instance MimeRender MimeMultipartFormData DateTime where - mimeRender _ = mimeRenderDefaultMultipartFormData + mimeRender _ = mimeRenderDefaultMultipartFormData -- | @_parseISO8601@ -_readDateTime :: (TI.ParseTime t, Monad m, Alternative m) => String -> m t +_readDateTime :: (TI.ParseTime t, Monad m, Alternative m) => String -> m t _readDateTime = _parseISO8601 {-# INLINE _readDateTime #-} -- | @TI.formatISO8601Millis@ -_showDateTime :: (t ~ TI.UTCTime, TI.FormatTime t) => t -> String +_showDateTime :: (t ~ TI.UTCTime, TI.FormatTime t) => t -> String _showDateTime = TI.formatISO8601Millis {-# INLINE _showDateTime #-} -- | parse an ISO8601 date-time string -_parseISO8601 :: (TI.ParseTime t, Monad m, Alternative m) => String -> m t -_parseISO8601 t = +_parseISO8601 :: (TI.ParseTime t, Monad m, Alternative m) => String -> m t +_parseISO8601 t = P.asum $ - P.flip (TI.parseTimeM True TI.defaultTimeLocale) t <$> + P.flip (TI.parseTimeM True TI.defaultTimeLocale) t <$> ["%FT%T%QZ", "%FT%T%Q%z", "%FT%T%Q%Z"] {-# INLINE _parseISO8601 #-} @@ -459,26 +459,26 @@ Module : OpenAPIPetstore.Core newtype Date = Date { unDate :: TI.Day } deriving (P.Enum,P.Eq,P.Data,P.Ord,P.Ix,NF.NFData,TI.ParseTime,TI.FormatTime) instance A.FromJSON Date where - parseJSON = A.withText "Date" (_readDate . T.unpack) + parseJSON = A.withText "Date" (_readDate . T.unpack) instance A.ToJSON Date where - toJSON (Date t) = A.toJSON (_showDate t) + toJSON (Date t) = A.toJSON (_showDate t) instance WH.FromHttpApiData Date where - parseUrlPiece = P.left T.pack . _readDate . T.unpack + parseUrlPiece = P.left T.pack . _readDate . T.unpack instance WH.ToHttpApiData Date where - toUrlPiece (Date t) = T.pack (_showDate t) + toUrlPiece (Date t) = T.pack (_showDate t) instance P.Show Date where - show (Date t) = _showDate t + show (Date t) = _showDate t instance MimeRender MimeMultipartFormData Date where - mimeRender _ = mimeRenderDefaultMultipartFormData + mimeRender _ = mimeRenderDefaultMultipartFormData -- | @TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"@ -_readDate :: (TI.ParseTime t, Monad m) => String -> m t +_readDate :: (TI.ParseTime t, Monad m) => String -> m t _readDate = TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d" {-# INLINE _readDate #-} -- | @TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"@ -_showDate :: TI.FormatTime t => t -> String +_showDate :: TI.FormatTime t => t -> String _showDate = TI.formatTime TI.defaultTimeLocale "%Y-%m-%d" {-# INLINE _showDate #-} @@ -491,20 +491,20 @@ Module : OpenAPIPetstore.Core deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData) instance A.FromJSON ByteArray where - parseJSON = A.withText "ByteArray" _readByteArray + parseJSON = A.withText "ByteArray" _readByteArray instance A.ToJSON ByteArray where toJSON = A.toJSON . _showByteArray instance WH.FromHttpApiData ByteArray where - parseUrlPiece = P.left T.pack . _readByteArray + parseUrlPiece = P.left T.pack . _readByteArray instance WH.ToHttpApiData ByteArray where - toUrlPiece = _showByteArray + toUrlPiece = _showByteArray instance P.Show ByteArray where show = T.unpack . _showByteArray instance MimeRender MimeMultipartFormData ByteArray where - mimeRender _ = mimeRenderDefaultMultipartFormData + mimeRender _ = mimeRenderDefaultMultipartFormData -- | read base64 encoded characters -_readByteArray :: Monad m => Text -> m ByteArray +_readByteArray :: Monad m => Text -> m ByteArray _readByteArray = P.either P.fail (pure . ByteArray) . BL64.decode . BL.fromStrict . T.encodeUtf8 {-# INLINE _readByteArray #-} @@ -518,19 +518,19 @@ Module : OpenAPIPetstore.Core deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData) instance A.FromJSON Binary where - parseJSON = A.withText "Binary" _readBinaryBase64 + parseJSON = A.withText "Binary" _readBinaryBase64 instance A.ToJSON Binary where toJSON = A.toJSON . _showBinaryBase64 instance WH.FromHttpApiData Binary where - parseUrlPiece = P.left T.pack . _readBinaryBase64 + parseUrlPiece = P.left T.pack . _readBinaryBase64 instance WH.ToHttpApiData Binary where - toUrlPiece = _showBinaryBase64 + toUrlPiece = _showBinaryBase64 instance P.Show Binary where show = T.unpack . _showBinaryBase64 instance MimeRender MimeMultipartFormData Binary where - mimeRender _ = unBinary + mimeRender _ = unBinary -_readBinaryBase64 :: Monad m => Text -> m Binary +_readBinaryBase64 :: Monad m => Text -> m Binary _readBinaryBase64 = P.either P.fail (pure . Binary) . BL64.decode . BL.fromStrict . T.encodeUtf8 {-# INLINE _readBinaryBase64 #-} @@ -540,6 +540,6 @@ Module : OpenAPIPetstore.Core -- * Lens Type Aliases -type Lens_' s a = Lens_ s s a a -type Lens_ s t a b = forall (f :: * -> *). Functor f => (a -> f b) -> s -> f t +type Lens_' s a = Lens_ s s a a +type Lens_ s t a b = forall (f :: * -> *). Functor f => (a -> f b) -> s -> f t \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.LoggingKatip.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.LoggingKatip.html index df22532030..76b5dac17e 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.LoggingKatip.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.LoggingKatip.html @@ -64,9 +64,9 @@ Katip Logging functions -- | A Katip Log environment which targets stdout stdoutLoggingContext :: LogContext -> IO LogContext -stdoutLoggingContext cxt = do - handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stdout (LG.permitItem LG.InfoS) LG.V2 - LG.registerScribe "stdout" handleScribe LG.defaultScribeSettings cxt +stdoutLoggingContext cxt = do + handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stdout (LG.permitItem LG.InfoS) LG.V2 + LG.registerScribe "stdout" handleScribe LG.defaultScribeSettings cxt -- * stderr logger @@ -76,22 +76,22 @@ Katip Logging functions -- | A Katip Log environment which targets stderr stderrLoggingContext :: LogContext -> IO LogContext -stderrLoggingContext cxt = do - handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stderr (LG.permitItem LG.InfoS) LG.V2 - LG.registerScribe "stderr" handleScribe LG.defaultScribeSettings cxt +stderrLoggingContext cxt = do + handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stderr (LG.permitItem LG.InfoS) LG.V2 + LG.registerScribe "stderr" handleScribe LG.defaultScribeSettings cxt -- * Null logger -- | Disables Katip logging runNullLogExec :: LogExecWithContext -runNullLogExec le (LG.KatipT f) = P.runReaderT f (L.set LG.logEnvScribes mempty le) +runNullLogExec le (LG.KatipT f) = P.runReaderT f (L.set LG.logEnvScribes mempty le) -- * Log Msg -- | Log a katip message -_log :: (Applicative m, LG.Katip m) => Text -> LogLevel -> Text -> m () -_log src level msg = do - LG.logMsg (fromString $ T.unpack src) level (LG.logStr msg) +_log :: (Applicative m, LG.Katip m) => Text -> LogLevel -> Text -> m () +_log src level msg = do + LG.logMsg (fromString $ T.unpack src) level (LG.logStr msg) -- * Log Exceptions @@ -99,11 +99,11 @@ Katip Logging functions logExceptions :: (LG.Katip m, E.MonadCatch m, Applicative m) => Text -> m a -> m a -logExceptions src = +logExceptions src = E.handle - (\(e :: E.SomeException) -> do - _log src LG.ErrorS ((T.pack . show) e) - E.throw e) + (\(e :: E.SomeException) -> do + _log src LG.ErrorS ((T.pack . show) e) + E.throw e) -- * Log Level diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.MimeTypes.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.MimeTypes.html index bb271a2362..7ad089114c 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.MimeTypes.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.MimeTypes.html @@ -44,19 +44,19 @@ Module : OpenAPIPetstore.MimeTypes -- * ContentType MimeType -data ContentType a = MimeType a => ContentType { unContentType :: a } +data ContentType a = MimeType a => ContentType { unContentType :: a } -- * Accept MimeType -data Accept a = MimeType a => Accept { unAccept :: a } +data Accept a = MimeType a => Accept { unAccept :: a } -- * Consumes Class -class MimeType mtype => Consumes req mtype where +class MimeType mtype => Consumes req mtype where -- * Produces Class -class MimeType mtype => Produces req mtype where +class MimeType mtype => Produces req mtype where -- * Default Mime Types @@ -76,129 +76,129 @@ Module : OpenAPIPetstore.MimeTypes -- * MimeType Class -class P.Typeable mtype => MimeType mtype where +class P.Typeable mtype => MimeType mtype where {-# MINIMAL mimeType | mimeTypes #-} - mimeTypes :: P.Proxy mtype -> [ME.MediaType] - mimeTypes p = - case mimeType p of - Just x -> [x] + mimeTypes :: P.Proxy mtype -> [ME.MediaType] + mimeTypes p = + case mimeType p of + Just x -> [x] Nothing -> [] - mimeType :: P.Proxy mtype -> Maybe ME.MediaType - mimeType p = - case mimeTypes p of + mimeType :: P.Proxy mtype -> Maybe ME.MediaType + mimeType p = + case mimeTypes p of [] -> Nothing - (x:_) -> Just x + (x:_) -> Just x - mimeType' :: mtype -> Maybe ME.MediaType - mimeType' _ = mimeType (P.Proxy :: P.Proxy mtype) - mimeTypes' :: mtype -> [ME.MediaType] - mimeTypes' _ = mimeTypes (P.Proxy :: P.Proxy mtype) + mimeType' :: mtype -> Maybe ME.MediaType + mimeType' _ = mimeType (P.Proxy :: P.Proxy mtype) + mimeTypes' :: mtype -> [ME.MediaType] + mimeTypes' _ = mimeTypes (P.Proxy :: P.Proxy mtype) -- Default MimeType Instances -- | @application/json; charset=utf-8@ instance MimeType MimeJSON where - mimeType _ = Just $ P.fromString "application/json" + mimeType _ = Just $ P.fromString "application/json" -- | @application/xml; charset=utf-8@ instance MimeType MimeXML where - mimeType _ = Just $ P.fromString "application/xml" + mimeType _ = Just $ P.fromString "application/xml" -- | @application/x-www-form-urlencoded@ instance MimeType MimeFormUrlEncoded where - mimeType _ = Just $ P.fromString "application/x-www-form-urlencoded" + mimeType _ = Just $ P.fromString "application/x-www-form-urlencoded" -- | @multipart/form-data@ instance MimeType MimeMultipartFormData where - mimeType _ = Just $ P.fromString "multipart/form-data" + mimeType _ = Just $ P.fromString "multipart/form-data" -- | @text/plain; charset=utf-8@ instance MimeType MimePlainText where - mimeType _ = Just $ P.fromString "text/plain" + mimeType _ = Just $ P.fromString "text/plain" -- | @application/octet-stream@ instance MimeType MimeOctetStream where - mimeType _ = Just $ P.fromString "application/octet-stream" + mimeType _ = Just $ P.fromString "application/octet-stream" -- | @"*/*"@ instance MimeType MimeAny where - mimeType _ = Just $ P.fromString "*/*" + mimeType _ = Just $ P.fromString "*/*" instance MimeType MimeNoContent where - mimeType _ = Nothing + mimeType _ = Nothing -- * MimeRender Class -class MimeType mtype => MimeRender mtype x where - mimeRender :: P.Proxy mtype -> x -> BL.ByteString - mimeRender' :: mtype -> x -> BL.ByteString - mimeRender' _ x = mimeRender (P.Proxy :: P.Proxy mtype) x +class MimeType mtype => MimeRender mtype x where + mimeRender :: P.Proxy mtype -> x -> BL.ByteString + mimeRender' :: mtype -> x -> BL.ByteString + mimeRender' _ x = mimeRender (P.Proxy :: P.Proxy mtype) x -mimeRenderDefaultMultipartFormData :: WH.ToHttpApiData a => a -> BL.ByteString +mimeRenderDefaultMultipartFormData :: WH.ToHttpApiData a => a -> BL.ByteString mimeRenderDefaultMultipartFormData = BL.fromStrict . T.encodeUtf8 . WH.toQueryParam -- Default MimeRender Instances -- | `A.encode` -instance A.ToJSON a => MimeRender MimeJSON a where mimeRender _ = A.encode +instance A.ToJSON a => MimeRender MimeJSON a where mimeRender _ = A.encode -- | @WH.urlEncodeAsForm@ -instance WH.ToForm a => MimeRender MimeFormUrlEncoded a where mimeRender _ = WH.urlEncodeAsForm +instance WH.ToForm a => MimeRender MimeFormUrlEncoded a where mimeRender _ = WH.urlEncodeAsForm -- | @P.id@ -instance MimeRender MimePlainText BL.ByteString where mimeRender _ = P.id +instance MimeRender MimePlainText BL.ByteString where mimeRender _ = P.id -- | @BL.fromStrict . T.encodeUtf8@ -instance MimeRender MimePlainText T.Text where mimeRender _ = BL.fromStrict . T.encodeUtf8 +instance MimeRender MimePlainText T.Text where mimeRender _ = BL.fromStrict . T.encodeUtf8 -- | @BCL.pack@ -instance MimeRender MimePlainText String where mimeRender _ = BCL.pack +instance MimeRender MimePlainText String where mimeRender _ = BCL.pack -- | @P.id@ -instance MimeRender MimeOctetStream BL.ByteString where mimeRender _ = P.id +instance MimeRender MimeOctetStream BL.ByteString where mimeRender _ = P.id -- | @BL.fromStrict . T.encodeUtf8@ -instance MimeRender MimeOctetStream T.Text where mimeRender _ = BL.fromStrict . T.encodeUtf8 +instance MimeRender MimeOctetStream T.Text where mimeRender _ = BL.fromStrict . T.encodeUtf8 -- | @BCL.pack@ -instance MimeRender MimeOctetStream String where mimeRender _ = BCL.pack +instance MimeRender MimeOctetStream String where mimeRender _ = BCL.pack -instance MimeRender MimeMultipartFormData BL.ByteString where mimeRender _ = P.id +instance MimeRender MimeMultipartFormData BL.ByteString where mimeRender _ = P.id -instance MimeRender MimeMultipartFormData Bool where mimeRender _ = mimeRenderDefaultMultipartFormData -instance MimeRender MimeMultipartFormData Char where mimeRender _ = mimeRenderDefaultMultipartFormData -instance MimeRender MimeMultipartFormData Double where mimeRender _ = mimeRenderDefaultMultipartFormData -instance MimeRender MimeMultipartFormData Float where mimeRender _ = mimeRenderDefaultMultipartFormData -instance MimeRender MimeMultipartFormData Int where mimeRender _ = mimeRenderDefaultMultipartFormData -instance MimeRender MimeMultipartFormData Integer where mimeRender _ = mimeRenderDefaultMultipartFormData -instance MimeRender MimeMultipartFormData String where mimeRender _ = mimeRenderDefaultMultipartFormData -instance MimeRender MimeMultipartFormData T.Text where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Bool where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Char where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Double where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Float where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Int where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Integer where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData String where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData T.Text where mimeRender _ = mimeRenderDefaultMultipartFormData -- | @P.Right . P.const NoContent@ -instance MimeRender MimeNoContent NoContent where mimeRender _ = P.const BCL.empty +instance MimeRender MimeNoContent NoContent where mimeRender _ = P.const BCL.empty -- * MimeUnrender Class -class MimeType mtype => MimeUnrender mtype o where - mimeUnrender :: P.Proxy mtype -> BL.ByteString -> P.Either String o - mimeUnrender' :: mtype -> BL.ByteString -> P.Either String o - mimeUnrender' _ x = mimeUnrender (P.Proxy :: P.Proxy mtype) x +class MimeType mtype => MimeUnrender mtype o where + mimeUnrender :: P.Proxy mtype -> BL.ByteString -> P.Either String o + mimeUnrender' :: mtype -> BL.ByteString -> P.Either String o + mimeUnrender' _ x = mimeUnrender (P.Proxy :: P.Proxy mtype) x -- Default MimeUnrender Instances -- | @A.eitherDecode@ -instance A.FromJSON a => MimeUnrender MimeJSON a where mimeUnrender _ = A.eitherDecode +instance A.FromJSON a => MimeUnrender MimeJSON a where mimeUnrender _ = A.eitherDecode -- | @P.left T.unpack . WH.urlDecodeAsForm@ -instance WH.FromForm a => MimeUnrender MimeFormUrlEncoded a where mimeUnrender _ = P.left T.unpack . WH.urlDecodeAsForm +instance WH.FromForm a => MimeUnrender MimeFormUrlEncoded a where mimeUnrender _ = P.left T.unpack . WH.urlDecodeAsForm -- | @P.Right . P.id@ -instance MimeUnrender MimePlainText BL.ByteString where mimeUnrender _ = P.Right . P.id +instance MimeUnrender MimePlainText BL.ByteString where mimeUnrender _ = P.Right . P.id -- | @P.left P.show . TL.decodeUtf8'@ -instance MimeUnrender MimePlainText T.Text where mimeUnrender _ = P.left P.show . T.decodeUtf8' . BL.toStrict +instance MimeUnrender MimePlainText T.Text where mimeUnrender _ = P.left P.show . T.decodeUtf8' . BL.toStrict -- | @P.Right . BCL.unpack@ -instance MimeUnrender MimePlainText String where mimeUnrender _ = P.Right . BCL.unpack +instance MimeUnrender MimePlainText String where mimeUnrender _ = P.Right . BCL.unpack -- | @P.Right . P.id@ -instance MimeUnrender MimeOctetStream BL.ByteString where mimeUnrender _ = P.Right . P.id +instance MimeUnrender MimeOctetStream BL.ByteString where mimeUnrender _ = P.Right . P.id -- | @P.left P.show . T.decodeUtf8' . BL.toStrict@ -instance MimeUnrender MimeOctetStream T.Text where mimeUnrender _ = P.left P.show . T.decodeUtf8' . BL.toStrict +instance MimeUnrender MimeOctetStream T.Text where mimeUnrender _ = P.left P.show . T.decodeUtf8' . BL.toStrict -- | @P.Right . BCL.unpack@ -instance MimeUnrender MimeOctetStream String where mimeUnrender _ = P.Right . BCL.unpack +instance MimeUnrender MimeOctetStream String where mimeUnrender _ = P.Right . BCL.unpack -- | @P.Right . P.const NoContent@ -instance MimeUnrender MimeNoContent NoContent where mimeUnrender _ = P.Right . P.const NoContent +instance MimeUnrender MimeNoContent NoContent where mimeUnrender _ = P.Right . P.const NoContent -- * Custom Mime Types @@ -209,7 +209,7 @@ Module : OpenAPIPetstore.MimeTypes -- | @application/xml; charset=utf-16@ instance MimeType MimeXmlCharsetutf16 where - mimeType _ = Just $ P.fromString "application/xml; charset=utf-16" + mimeType _ = Just $ P.fromString "application/xml; charset=utf-16" -- instance MimeRender MimeXmlCharsetutf16 T.Text where mimeRender _ = undefined -- instance MimeUnrender MimeXmlCharsetutf16 T.Text where mimeUnrender _ = undefined @@ -219,7 +219,7 @@ Module : OpenAPIPetstore.MimeTypes -- | @application/xml; charset=utf-8@ instance MimeType MimeXmlCharsetutf8 where - mimeType _ = Just $ P.fromString "application/xml; charset=utf-8" + mimeType _ = Just $ P.fromString "application/xml; charset=utf-8" -- instance MimeRender MimeXmlCharsetutf8 T.Text where mimeRender _ = undefined -- instance MimeUnrender MimeXmlCharsetutf8 T.Text where mimeUnrender _ = undefined @@ -229,7 +229,7 @@ Module : OpenAPIPetstore.MimeTypes -- | @text/xml@ instance MimeType MimeTextXml where - mimeType _ = Just $ P.fromString "text/xml" + mimeType _ = Just $ P.fromString "text/xml" -- instance MimeRender MimeTextXml T.Text where mimeRender _ = undefined -- instance MimeUnrender MimeTextXml T.Text where mimeUnrender _ = undefined @@ -239,7 +239,7 @@ Module : OpenAPIPetstore.MimeTypes -- | @text/xml; charset=utf-16@ instance MimeType MimeTextXmlCharsetutf16 where - mimeType _ = Just $ P.fromString "text/xml; charset=utf-16" + mimeType _ = Just $ P.fromString "text/xml; charset=utf-16" -- instance MimeRender MimeTextXmlCharsetutf16 T.Text where mimeRender _ = undefined -- instance MimeUnrender MimeTextXmlCharsetutf16 T.Text where mimeUnrender _ = undefined @@ -249,7 +249,7 @@ Module : OpenAPIPetstore.MimeTypes -- | @text/xml; charset=utf-8@ instance MimeType MimeTextXmlCharsetutf8 where - mimeType _ = Just $ P.fromString "text/xml; charset=utf-8" + mimeType _ = Just $ P.fromString "text/xml; charset=utf-8" -- instance MimeRender MimeTextXmlCharsetutf8 T.Text where mimeRender _ = undefined -- instance MimeUnrender MimeTextXmlCharsetutf8 T.Text where mimeUnrender _ = undefined diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Model.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Model.html index c5823a6939..e3ba59c32f 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Model.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Model.html @@ -236,15 +236,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON AdditionalPropertiesAnyType instance A.FromJSON AdditionalPropertiesAnyType where - parseJSON = A.withObject "AdditionalPropertiesAnyType" $ \o -> + parseJSON = A.withObject "AdditionalPropertiesAnyType" $ \o -> AdditionalPropertiesAnyType - <$> (o .:? "name") + <$> (o .:? "name") -- | ToJSON AdditionalPropertiesAnyType instance A.ToJSON AdditionalPropertiesAnyType where toJSON AdditionalPropertiesAnyType {..} = _omitNulls - [ "name" .= additionalPropertiesAnyTypeName + [ "name" .= additionalPropertiesAnyTypeName ] @@ -264,15 +264,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON AdditionalPropertiesArray instance A.FromJSON AdditionalPropertiesArray where - parseJSON = A.withObject "AdditionalPropertiesArray" $ \o -> + parseJSON = A.withObject "AdditionalPropertiesArray" $ \o -> AdditionalPropertiesArray - <$> (o .:? "name") + <$> (o .:? "name") -- | ToJSON AdditionalPropertiesArray instance A.ToJSON AdditionalPropertiesArray where toJSON AdditionalPropertiesArray {..} = _omitNulls - [ "name" .= additionalPropertiesArrayName + [ "name" .= additionalPropertiesArrayName ] @@ -292,15 +292,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON AdditionalPropertiesBoolean instance A.FromJSON AdditionalPropertiesBoolean where - parseJSON = A.withObject "AdditionalPropertiesBoolean" $ \o -> + parseJSON = A.withObject "AdditionalPropertiesBoolean" $ \o -> AdditionalPropertiesBoolean - <$> (o .:? "name") + <$> (o .:? "name") -- | ToJSON AdditionalPropertiesBoolean instance A.ToJSON AdditionalPropertiesBoolean where toJSON AdditionalPropertiesBoolean {..} = _omitNulls - [ "name" .= additionalPropertiesBooleanName + [ "name" .= additionalPropertiesBooleanName ] @@ -330,35 +330,35 @@ Module : OpenAPIPetstore.Model -- | FromJSON AdditionalPropertiesClass instance A.FromJSON AdditionalPropertiesClass where - parseJSON = A.withObject "AdditionalPropertiesClass" $ \o -> + parseJSON = A.withObject "AdditionalPropertiesClass" $ \o -> AdditionalPropertiesClass - <$> (o .:? "map_string") - <*> (o .:? "map_number") - <*> (o .:? "map_integer") - <*> (o .:? "map_boolean") - <*> (o .:? "map_array_integer") - <*> (o .:? "map_array_anytype") - <*> (o .:? "map_map_string") - <*> (o .:? "map_map_anytype") - <*> (o .:? "anytype_1") - <*> (o .:? "anytype_2") - <*> (o .:? "anytype_3") + <$> (o .:? "map_string") + <*> (o .:? "map_number") + <*> (o .:? "map_integer") + <*> (o .:? "map_boolean") + <*> (o .:? "map_array_integer") + <*> (o .:? "map_array_anytype") + <*> (o .:? "map_map_string") + <*> (o .:? "map_map_anytype") + <*> (o .:? "anytype_1") + <*> (o .:? "anytype_2") + <*> (o .:? "anytype_3") -- | ToJSON AdditionalPropertiesClass instance A.ToJSON AdditionalPropertiesClass where toJSON AdditionalPropertiesClass {..} = _omitNulls - [ "map_string" .= additionalPropertiesClassMapString - , "map_number" .= additionalPropertiesClassMapNumber - , "map_integer" .= additionalPropertiesClassMapInteger - , "map_boolean" .= additionalPropertiesClassMapBoolean - , "map_array_integer" .= additionalPropertiesClassMapArrayInteger - , "map_array_anytype" .= additionalPropertiesClassMapArrayAnytype - , "map_map_string" .= additionalPropertiesClassMapMapString - , "map_map_anytype" .= additionalPropertiesClassMapMapAnytype - , "anytype_1" .= additionalPropertiesClassAnytype1 - , "anytype_2" .= additionalPropertiesClassAnytype2 - , "anytype_3" .= additionalPropertiesClassAnytype3 + [ "map_string" .= additionalPropertiesClassMapString + , "map_number" .= additionalPropertiesClassMapNumber + , "map_integer" .= additionalPropertiesClassMapInteger + , "map_boolean" .= additionalPropertiesClassMapBoolean + , "map_array_integer" .= additionalPropertiesClassMapArrayInteger + , "map_array_anytype" .= additionalPropertiesClassMapArrayAnytype + , "map_map_string" .= additionalPropertiesClassMapMapString + , "map_map_anytype" .= additionalPropertiesClassMapMapAnytype + , "anytype_1" .= additionalPropertiesClassAnytype1 + , "anytype_2" .= additionalPropertiesClassAnytype2 + , "anytype_3" .= additionalPropertiesClassAnytype3 ] @@ -388,15 +388,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON AdditionalPropertiesInteger instance A.FromJSON AdditionalPropertiesInteger where - parseJSON = A.withObject "AdditionalPropertiesInteger" $ \o -> + parseJSON = A.withObject "AdditionalPropertiesInteger" $ \o -> AdditionalPropertiesInteger - <$> (o .:? "name") + <$> (o .:? "name") -- | ToJSON AdditionalPropertiesInteger instance A.ToJSON AdditionalPropertiesInteger where toJSON AdditionalPropertiesInteger {..} = _omitNulls - [ "name" .= additionalPropertiesIntegerName + [ "name" .= additionalPropertiesIntegerName ] @@ -416,15 +416,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON AdditionalPropertiesNumber instance A.FromJSON AdditionalPropertiesNumber where - parseJSON = A.withObject "AdditionalPropertiesNumber" $ \o -> + parseJSON = A.withObject "AdditionalPropertiesNumber" $ \o -> AdditionalPropertiesNumber - <$> (o .:? "name") + <$> (o .:? "name") -- | ToJSON AdditionalPropertiesNumber instance A.ToJSON AdditionalPropertiesNumber where toJSON AdditionalPropertiesNumber {..} = _omitNulls - [ "name" .= additionalPropertiesNumberName + [ "name" .= additionalPropertiesNumberName ] @@ -444,15 +444,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON AdditionalPropertiesObject instance A.FromJSON AdditionalPropertiesObject where - parseJSON = A.withObject "AdditionalPropertiesObject" $ \o -> + parseJSON = A.withObject "AdditionalPropertiesObject" $ \o -> AdditionalPropertiesObject - <$> (o .:? "name") + <$> (o .:? "name") -- | ToJSON AdditionalPropertiesObject instance A.ToJSON AdditionalPropertiesObject where toJSON AdditionalPropertiesObject {..} = _omitNulls - [ "name" .= additionalPropertiesObjectName + [ "name" .= additionalPropertiesObjectName ] @@ -472,15 +472,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON AdditionalPropertiesString instance A.FromJSON AdditionalPropertiesString where - parseJSON = A.withObject "AdditionalPropertiesString" $ \o -> + parseJSON = A.withObject "AdditionalPropertiesString" $ \o -> AdditionalPropertiesString - <$> (o .:? "name") + <$> (o .:? "name") -- | ToJSON AdditionalPropertiesString instance A.ToJSON AdditionalPropertiesString where toJSON AdditionalPropertiesString {..} = _omitNulls - [ "name" .= additionalPropertiesStringName + [ "name" .= additionalPropertiesStringName ] @@ -501,17 +501,17 @@ Module : OpenAPIPetstore.Model -- | FromJSON Animal instance A.FromJSON Animal where - parseJSON = A.withObject "Animal" $ \o -> + parseJSON = A.withObject "Animal" $ \o -> Animal - <$> (o .: "className") - <*> (o .:? "color") + <$> (o .: "className") + <*> (o .:? "color") -- | ToJSON Animal instance A.ToJSON Animal where toJSON Animal {..} = _omitNulls - [ "className" .= animalClassName - , "color" .= animalColor + [ "className" .= animalClassName + , "color" .= animalColor ] @@ -519,9 +519,9 @@ Module : OpenAPIPetstore.Model mkAnimal :: Text -- ^ 'animalClassName' -> Animal -mkAnimal animalClassName = +mkAnimal animalClassName = Animal - { animalClassName + { animalClassName , animalColor = Nothing } @@ -535,19 +535,19 @@ Module : OpenAPIPetstore.Model -- | FromJSON ApiResponse instance A.FromJSON ApiResponse where - parseJSON = A.withObject "ApiResponse" $ \o -> + parseJSON = A.withObject "ApiResponse" $ \o -> ApiResponse - <$> (o .:? "code") - <*> (o .:? "type") - <*> (o .:? "message") + <$> (o .:? "code") + <*> (o .:? "type") + <*> (o .:? "message") -- | ToJSON ApiResponse instance A.ToJSON ApiResponse where toJSON ApiResponse {..} = _omitNulls - [ "code" .= apiResponseCode - , "type" .= apiResponseType - , "message" .= apiResponseMessage + [ "code" .= apiResponseCode + , "type" .= apiResponseType + , "message" .= apiResponseMessage ] @@ -569,15 +569,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON ArrayOfArrayOfNumberOnly instance A.FromJSON ArrayOfArrayOfNumberOnly where - parseJSON = A.withObject "ArrayOfArrayOfNumberOnly" $ \o -> + parseJSON = A.withObject "ArrayOfArrayOfNumberOnly" $ \o -> ArrayOfArrayOfNumberOnly - <$> (o .:? "ArrayArrayNumber") + <$> (o .:? "ArrayArrayNumber") -- | ToJSON ArrayOfArrayOfNumberOnly instance A.ToJSON ArrayOfArrayOfNumberOnly where toJSON ArrayOfArrayOfNumberOnly {..} = _omitNulls - [ "ArrayArrayNumber" .= arrayOfArrayOfNumberOnlyArrayArrayNumber + [ "ArrayArrayNumber" .= arrayOfArrayOfNumberOnlyArrayArrayNumber ] @@ -597,15 +597,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON ArrayOfNumberOnly instance A.FromJSON ArrayOfNumberOnly where - parseJSON = A.withObject "ArrayOfNumberOnly" $ \o -> + parseJSON = A.withObject "ArrayOfNumberOnly" $ \o -> ArrayOfNumberOnly - <$> (o .:? "ArrayNumber") + <$> (o .:? "ArrayNumber") -- | ToJSON ArrayOfNumberOnly instance A.ToJSON ArrayOfNumberOnly where toJSON ArrayOfNumberOnly {..} = _omitNulls - [ "ArrayNumber" .= arrayOfNumberOnlyArrayNumber + [ "ArrayNumber" .= arrayOfNumberOnlyArrayNumber ] @@ -627,19 +627,19 @@ Module : OpenAPIPetstore.Model -- | FromJSON ArrayTest instance A.FromJSON ArrayTest where - parseJSON = A.withObject "ArrayTest" $ \o -> + parseJSON = A.withObject "ArrayTest" $ \o -> ArrayTest - <$> (o .:? "array_of_string") - <*> (o .:? "array_array_of_integer") - <*> (o .:? "array_array_of_model") + <$> (o .:? "array_of_string") + <*> (o .:? "array_array_of_integer") + <*> (o .:? "array_array_of_model") -- | ToJSON ArrayTest instance A.ToJSON ArrayTest where toJSON ArrayTest {..} = _omitNulls - [ "array_of_string" .= arrayTestArrayOfString - , "array_array_of_integer" .= arrayTestArrayArrayOfInteger - , "array_array_of_model" .= arrayTestArrayArrayOfModel + [ "array_of_string" .= arrayTestArrayOfString + , "array_array_of_integer" .= arrayTestArrayArrayOfInteger + , "array_array_of_model" .= arrayTestArrayArrayOfModel ] @@ -666,25 +666,25 @@ Module : OpenAPIPetstore.Model -- | FromJSON Capitalization instance A.FromJSON Capitalization where - parseJSON = A.withObject "Capitalization" $ \o -> + parseJSON = A.withObject "Capitalization" $ \o -> Capitalization - <$> (o .:? "smallCamel") - <*> (o .:? "CapitalCamel") - <*> (o .:? "small_Snake") - <*> (o .:? "Capital_Snake") - <*> (o .:? "SCA_ETH_Flow_Points") - <*> (o .:? "ATT_NAME") + <$> (o .:? "smallCamel") + <*> (o .:? "CapitalCamel") + <*> (o .:? "small_Snake") + <*> (o .:? "Capital_Snake") + <*> (o .:? "SCA_ETH_Flow_Points") + <*> (o .:? "ATT_NAME") -- | ToJSON Capitalization instance A.ToJSON Capitalization where toJSON Capitalization {..} = _omitNulls - [ "smallCamel" .= capitalizationSmallCamel - , "CapitalCamel" .= capitalizationCapitalCamel - , "small_Snake" .= capitalizationSmallSnake - , "Capital_Snake" .= capitalizationCapitalSnake - , "SCA_ETH_Flow_Points" .= capitalizationScaEthFlowPoints - , "ATT_NAME" .= capitalizationAttName + [ "smallCamel" .= capitalizationSmallCamel + , "CapitalCamel" .= capitalizationCapitalCamel + , "small_Snake" .= capitalizationSmallSnake + , "Capital_Snake" .= capitalizationCapitalSnake + , "SCA_ETH_Flow_Points" .= capitalizationScaEthFlowPoints + , "ATT_NAME" .= capitalizationAttName ] @@ -711,19 +711,19 @@ Module : OpenAPIPetstore.Model -- | FromJSON Cat instance A.FromJSON Cat where - parseJSON = A.withObject "Cat" $ \o -> + parseJSON = A.withObject "Cat" $ \o -> Cat - <$> (o .: "className") - <*> (o .:? "color") - <*> (o .:? "declawed") + <$> (o .: "className") + <*> (o .:? "color") + <*> (o .:? "declawed") -- | ToJSON Cat instance A.ToJSON Cat where toJSON Cat {..} = _omitNulls - [ "className" .= catClassName - , "color" .= catColor - , "declawed" .= catDeclawed + [ "className" .= catClassName + , "color" .= catColor + , "declawed" .= catDeclawed ] @@ -731,9 +731,9 @@ Module : OpenAPIPetstore.Model mkCat :: Text -- ^ 'catClassName' -> Cat -mkCat catClassName = +mkCat catClassName = Cat - { catClassName + { catClassName , catColor = Nothing , catDeclawed = Nothing } @@ -746,15 +746,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON CatAllOf instance A.FromJSON CatAllOf where - parseJSON = A.withObject "CatAllOf" $ \o -> + parseJSON = A.withObject "CatAllOf" $ \o -> CatAllOf - <$> (o .:? "declawed") + <$> (o .:? "declawed") -- | ToJSON CatAllOf instance A.ToJSON CatAllOf where toJSON CatAllOf {..} = _omitNulls - [ "declawed" .= catAllOfDeclawed + [ "declawed" .= catAllOfDeclawed ] @@ -775,17 +775,17 @@ Module : OpenAPIPetstore.Model -- | FromJSON Category instance A.FromJSON Category where - parseJSON = A.withObject "Category" $ \o -> + parseJSON = A.withObject "Category" $ \o -> Category - <$> (o .:? "id") - <*> (o .: "name") + <$> (o .:? "id") + <*> (o .: "name") -- | ToJSON Category instance A.ToJSON Category where toJSON Category {..} = _omitNulls - [ "id" .= categoryId - , "name" .= categoryName + [ "id" .= categoryId + , "name" .= categoryName ] @@ -793,10 +793,10 @@ Module : OpenAPIPetstore.Model mkCategory :: Text -- ^ 'categoryName' -> Category -mkCategory categoryName = +mkCategory categoryName = Category { categoryId = Nothing - , categoryName + , categoryName } -- ** ClassModel @@ -808,15 +808,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON ClassModel instance A.FromJSON ClassModel where - parseJSON = A.withObject "ClassModel" $ \o -> + parseJSON = A.withObject "ClassModel" $ \o -> ClassModel - <$> (o .:? "_class") + <$> (o .:? "_class") -- | ToJSON ClassModel instance A.ToJSON ClassModel where toJSON ClassModel {..} = _omitNulls - [ "_class" .= classModelClass + [ "_class" .= classModelClass ] @@ -836,15 +836,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON Client instance A.FromJSON Client where - parseJSON = A.withObject "Client" $ \o -> + parseJSON = A.withObject "Client" $ \o -> Client - <$> (o .:? "client") + <$> (o .:? "client") -- | ToJSON Client instance A.ToJSON Client where toJSON Client {..} = _omitNulls - [ "client" .= clientClient + [ "client" .= clientClient ] @@ -866,19 +866,19 @@ Module : OpenAPIPetstore.Model -- | FromJSON Dog instance A.FromJSON Dog where - parseJSON = A.withObject "Dog" $ \o -> + parseJSON = A.withObject "Dog" $ \o -> Dog - <$> (o .: "className") - <*> (o .:? "color") - <*> (o .:? "breed") + <$> (o .: "className") + <*> (o .:? "color") + <*> (o .:? "breed") -- | ToJSON Dog instance A.ToJSON Dog where toJSON Dog {..} = _omitNulls - [ "className" .= dogClassName - , "color" .= dogColor - , "breed" .= dogBreed + [ "className" .= dogClassName + , "color" .= dogColor + , "breed" .= dogBreed ] @@ -886,9 +886,9 @@ Module : OpenAPIPetstore.Model mkDog :: Text -- ^ 'dogClassName' -> Dog -mkDog dogClassName = +mkDog dogClassName = Dog - { dogClassName + { dogClassName , dogColor = Nothing , dogBreed = Nothing } @@ -901,15 +901,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON DogAllOf instance A.FromJSON DogAllOf where - parseJSON = A.withObject "DogAllOf" $ \o -> + parseJSON = A.withObject "DogAllOf" $ \o -> DogAllOf - <$> (o .:? "breed") + <$> (o .:? "breed") -- | ToJSON DogAllOf instance A.ToJSON DogAllOf where toJSON DogAllOf {..} = _omitNulls - [ "breed" .= dogAllOfBreed + [ "breed" .= dogAllOfBreed ] @@ -930,17 +930,17 @@ Module : OpenAPIPetstore.Model -- | FromJSON EnumArrays instance A.FromJSON EnumArrays where - parseJSON = A.withObject "EnumArrays" $ \o -> + parseJSON = A.withObject "EnumArrays" $ \o -> EnumArrays - <$> (o .:? "just_symbol") - <*> (o .:? "array_enum") + <$> (o .:? "just_symbol") + <*> (o .:? "array_enum") -- | ToJSON EnumArrays instance A.ToJSON EnumArrays where toJSON EnumArrays {..} = _omitNulls - [ "just_symbol" .= enumArraysJustSymbol - , "array_enum" .= enumArraysArrayEnum + [ "just_symbol" .= enumArraysJustSymbol + , "array_enum" .= enumArraysArrayEnum ] @@ -965,23 +965,23 @@ Module : OpenAPIPetstore.Model -- | FromJSON EnumTest instance A.FromJSON EnumTest where - parseJSON = A.withObject "EnumTest" $ \o -> + parseJSON = A.withObject "EnumTest" $ \o -> EnumTest - <$> (o .:? "enum_string") - <*> (o .: "enum_string_required") - <*> (o .:? "enum_integer") - <*> (o .:? "enum_number") - <*> (o .:? "outerEnum") + <$> (o .:? "enum_string") + <*> (o .: "enum_string_required") + <*> (o .:? "enum_integer") + <*> (o .:? "enum_number") + <*> (o .:? "outerEnum") -- | ToJSON EnumTest instance A.ToJSON EnumTest where toJSON EnumTest {..} = _omitNulls - [ "enum_string" .= enumTestEnumString - , "enum_string_required" .= enumTestEnumStringRequired - , "enum_integer" .= enumTestEnumInteger - , "enum_number" .= enumTestEnumNumber - , "outerEnum" .= enumTestOuterEnum + [ "enum_string" .= enumTestEnumString + , "enum_string_required" .= enumTestEnumStringRequired + , "enum_integer" .= enumTestEnumInteger + , "enum_number" .= enumTestEnumNumber + , "outerEnum" .= enumTestOuterEnum ] @@ -989,10 +989,10 @@ Module : OpenAPIPetstore.Model mkEnumTest :: E'EnumString -- ^ 'enumTestEnumStringRequired' -> EnumTest -mkEnumTest enumTestEnumStringRequired = +mkEnumTest enumTestEnumStringRequired = EnumTest { enumTestEnumString = Nothing - , enumTestEnumStringRequired + , enumTestEnumStringRequired , enumTestEnumInteger = Nothing , enumTestEnumNumber = Nothing , enumTestOuterEnum = Nothing @@ -1007,15 +1007,15 @@ Module : OpenAPIPetstore.Model -- | FromJSON File instance A.FromJSON File where - parseJSON = A.withObject "File" $ \o -> + parseJSON = A.withObject "File" $ \o -> File - <$> (o .:? "sourceURI") + <$> (o .:? "sourceURI") -- | ToJSON File instance A.ToJSON File where toJSON File {..} = _omitNulls - [ "sourceURI" .= fileSourceUri + [ "sourceURI" .= fileSourceUri ] @@ -1036,17 +1036,17 @@ Module : OpenAPIPetstore.Model -- | FromJSON FileSchemaTestClass instance A.FromJSON FileSchemaTestClass where - parseJSON = A.withObject "FileSchemaTestClass" $ \o -> + parseJSON = A.withObject "FileSchemaTestClass" $ \o -> FileSchemaTestClass - <$> (o .:? "file") - <*> (o .:? "files") + <$> (o .:? "file") + <*> (o .:? "files") -- | ToJSON FileSchemaTestClass instance A.ToJSON FileSchemaTestClass where toJSON FileSchemaTestClass {..} = _omitNulls - [ "file" .= fileSchemaTestClassFile - , "files" .= fileSchemaTestClassFiles + [ "file" .= fileSchemaTestClassFile + , "files" .= fileSchemaTestClassFiles ] @@ -1075,1301 +1075,1310 @@ Module : OpenAPIPetstore.Model , formatTestDateTime :: !(Maybe DateTime) -- ^ "dateTime" , formatTestUuid :: !(Maybe Text) -- ^ "uuid" , formatTestPassword :: !(Text) -- ^ /Required/ "password" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON FormatTest -instance A.FromJSON FormatTest where - parseJSON = A.withObject "FormatTest" $ \o -> - FormatTest - <$> (o .:? "integer") - <*> (o .:? "int32") - <*> (o .:? "int64") - <*> (o .: "number") - <*> (o .:? "float") - <*> (o .:? "double") - <*> (o .:? "string") - <*> (o .: "byte") - <*> (o .:? "binary") - <*> (o .: "date") - <*> (o .:? "dateTime") - <*> (o .:? "uuid") - <*> (o .: "password") - --- | ToJSON FormatTest -instance A.ToJSON FormatTest where - toJSON FormatTest {..} = - _omitNulls - [ "integer" .= formatTestInteger - , "int32" .= formatTestInt32 - , "int64" .= formatTestInt64 - , "number" .= formatTestNumber - , "float" .= formatTestFloat - , "double" .= formatTestDouble - , "string" .= formatTestString - , "byte" .= formatTestByte - , "binary" .= formatTestBinary - , "date" .= formatTestDate - , "dateTime" .= formatTestDateTime - , "uuid" .= formatTestUuid - , "password" .= formatTestPassword - ] - - --- | Construct a value of type 'FormatTest' (by applying it's required fields, if any) -mkFormatTest - :: Double -- ^ 'formatTestNumber' - -> ByteArray -- ^ 'formatTestByte' - -> Date -- ^ 'formatTestDate' - -> Text -- ^ 'formatTestPassword' - -> FormatTest -mkFormatTest formatTestNumber formatTestByte formatTestDate formatTestPassword = - FormatTest - { formatTestInteger = Nothing - , formatTestInt32 = Nothing - , formatTestInt64 = Nothing - , formatTestNumber - , formatTestFloat = Nothing - , formatTestDouble = Nothing - , formatTestString = Nothing - , formatTestByte - , formatTestBinary = Nothing - , formatTestDate - , formatTestDateTime = Nothing - , formatTestUuid = Nothing - , formatTestPassword - } - --- ** HasOnlyReadOnly --- | HasOnlyReadOnly -data HasOnlyReadOnly = HasOnlyReadOnly - { hasOnlyReadOnlyBar :: !(Maybe Text) -- ^ "bar" - , hasOnlyReadOnlyFoo :: !(Maybe Text) -- ^ "foo" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON HasOnlyReadOnly -instance A.FromJSON HasOnlyReadOnly where - parseJSON = A.withObject "HasOnlyReadOnly" $ \o -> - HasOnlyReadOnly - <$> (o .:? "bar") - <*> (o .:? "foo") - --- | ToJSON HasOnlyReadOnly -instance A.ToJSON HasOnlyReadOnly where - toJSON HasOnlyReadOnly {..} = - _omitNulls - [ "bar" .= hasOnlyReadOnlyBar - , "foo" .= hasOnlyReadOnlyFoo - ] - - --- | Construct a value of type 'HasOnlyReadOnly' (by applying it's required fields, if any) -mkHasOnlyReadOnly - :: HasOnlyReadOnly -mkHasOnlyReadOnly = - HasOnlyReadOnly - { hasOnlyReadOnlyBar = Nothing - , hasOnlyReadOnlyFoo = Nothing - } - --- ** MapTest --- | MapTest -data MapTest = MapTest - { mapTestMapMapOfString :: !(Maybe (Map.Map String (Map.Map String Text))) -- ^ "map_map_of_string" - , mapTestMapOfEnumString :: !(Maybe (Map.Map String E'Inner)) -- ^ "map_of_enum_string" - , mapTestDirectMap :: !(Maybe (Map.Map String Bool)) -- ^ "direct_map" - , mapTestIndirectMap :: !(Maybe (Map.Map String Bool)) -- ^ "indirect_map" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON MapTest -instance A.FromJSON MapTest where - parseJSON = A.withObject "MapTest" $ \o -> - MapTest - <$> (o .:? "map_map_of_string") - <*> (o .:? "map_of_enum_string") - <*> (o .:? "direct_map") - <*> (o .:? "indirect_map") - --- | ToJSON MapTest -instance A.ToJSON MapTest where - toJSON MapTest {..} = - _omitNulls - [ "map_map_of_string" .= mapTestMapMapOfString - , "map_of_enum_string" .= mapTestMapOfEnumString - , "direct_map" .= mapTestDirectMap - , "indirect_map" .= mapTestIndirectMap - ] - - --- | Construct a value of type 'MapTest' (by applying it's required fields, if any) -mkMapTest - :: MapTest -mkMapTest = - MapTest - { mapTestMapMapOfString = Nothing - , mapTestMapOfEnumString = Nothing - , mapTestDirectMap = Nothing - , mapTestIndirectMap = Nothing - } - --- ** MixedPropertiesAndAdditionalPropertiesClass --- | MixedPropertiesAndAdditionalPropertiesClass -data MixedPropertiesAndAdditionalPropertiesClass = MixedPropertiesAndAdditionalPropertiesClass - { mixedPropertiesAndAdditionalPropertiesClassUuid :: !(Maybe Text) -- ^ "uuid" - , mixedPropertiesAndAdditionalPropertiesClassDateTime :: !(Maybe DateTime) -- ^ "dateTime" - , mixedPropertiesAndAdditionalPropertiesClassMap :: !(Maybe (Map.Map String Animal)) -- ^ "map" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON MixedPropertiesAndAdditionalPropertiesClass -instance A.FromJSON MixedPropertiesAndAdditionalPropertiesClass where - parseJSON = A.withObject "MixedPropertiesAndAdditionalPropertiesClass" $ \o -> - MixedPropertiesAndAdditionalPropertiesClass - <$> (o .:? "uuid") - <*> (o .:? "dateTime") - <*> (o .:? "map") - --- | ToJSON MixedPropertiesAndAdditionalPropertiesClass -instance A.ToJSON MixedPropertiesAndAdditionalPropertiesClass where - toJSON MixedPropertiesAndAdditionalPropertiesClass {..} = - _omitNulls - [ "uuid" .= mixedPropertiesAndAdditionalPropertiesClassUuid - , "dateTime" .= mixedPropertiesAndAdditionalPropertiesClassDateTime - , "map" .= mixedPropertiesAndAdditionalPropertiesClassMap - ] - - --- | Construct a value of type 'MixedPropertiesAndAdditionalPropertiesClass' (by applying it's required fields, if any) -mkMixedPropertiesAndAdditionalPropertiesClass - :: MixedPropertiesAndAdditionalPropertiesClass -mkMixedPropertiesAndAdditionalPropertiesClass = - MixedPropertiesAndAdditionalPropertiesClass - { mixedPropertiesAndAdditionalPropertiesClassUuid = Nothing - , mixedPropertiesAndAdditionalPropertiesClassDateTime = Nothing - , mixedPropertiesAndAdditionalPropertiesClassMap = Nothing - } - --- ** Model200Response --- | Model200Response --- Model for testing model name starting with number -data Model200Response = Model200Response - { model200ResponseName :: !(Maybe Int) -- ^ "name" - , model200ResponseClass :: !(Maybe Text) -- ^ "class" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON Model200Response -instance A.FromJSON Model200Response where - parseJSON = A.withObject "Model200Response" $ \o -> - Model200Response - <$> (o .:? "name") - <*> (o .:? "class") - --- | ToJSON Model200Response -instance A.ToJSON Model200Response where - toJSON Model200Response {..} = - _omitNulls - [ "name" .= model200ResponseName - , "class" .= model200ResponseClass - ] - - --- | Construct a value of type 'Model200Response' (by applying it's required fields, if any) -mkModel200Response - :: Model200Response -mkModel200Response = - Model200Response - { model200ResponseName = Nothing - , model200ResponseClass = Nothing - } - --- ** ModelList --- | ModelList -data ModelList = ModelList - { modelList123list :: !(Maybe Text) -- ^ "123-list" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON ModelList -instance A.FromJSON ModelList where - parseJSON = A.withObject "ModelList" $ \o -> - ModelList - <$> (o .:? "123-list") - --- | ToJSON ModelList -instance A.ToJSON ModelList where - toJSON ModelList {..} = - _omitNulls - [ "123-list" .= modelList123list - ] - - --- | Construct a value of type 'ModelList' (by applying it's required fields, if any) -mkModelList - :: ModelList -mkModelList = - ModelList - { modelList123list = Nothing - } - --- ** ModelReturn --- | ModelReturn --- Model for testing reserved words -data ModelReturn = ModelReturn - { modelReturnReturn :: !(Maybe Int) -- ^ "return" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON ModelReturn -instance A.FromJSON ModelReturn where - parseJSON = A.withObject "ModelReturn" $ \o -> - ModelReturn - <$> (o .:? "return") - --- | ToJSON ModelReturn -instance A.ToJSON ModelReturn where - toJSON ModelReturn {..} = - _omitNulls - [ "return" .= modelReturnReturn - ] - - --- | Construct a value of type 'ModelReturn' (by applying it's required fields, if any) -mkModelReturn - :: ModelReturn -mkModelReturn = - ModelReturn - { modelReturnReturn = Nothing - } - --- ** Name --- | Name --- Model for testing model name same as property name -data Name = Name - { nameName :: !(Int) -- ^ /Required/ "name" - , nameSnakeCase :: !(Maybe Int) -- ^ "snake_case" - , nameProperty :: !(Maybe Text) -- ^ "property" - , name123number :: !(Maybe Int) -- ^ "123Number" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON Name -instance A.FromJSON Name where - parseJSON = A.withObject "Name" $ \o -> - Name - <$> (o .: "name") - <*> (o .:? "snake_case") - <*> (o .:? "property") - <*> (o .:? "123Number") - --- | ToJSON Name -instance A.ToJSON Name where - toJSON Name {..} = - _omitNulls - [ "name" .= nameName - , "snake_case" .= nameSnakeCase - , "property" .= nameProperty - , "123Number" .= name123number - ] - - --- | Construct a value of type 'Name' (by applying it's required fields, if any) -mkName - :: Int -- ^ 'nameName' - -> Name -mkName nameName = - Name - { nameName - , nameSnakeCase = Nothing - , nameProperty = Nothing - , name123number = Nothing - } - --- ** NumberOnly --- | NumberOnly -data NumberOnly = NumberOnly - { numberOnlyJustNumber :: !(Maybe Double) -- ^ "JustNumber" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON NumberOnly -instance A.FromJSON NumberOnly where - parseJSON = A.withObject "NumberOnly" $ \o -> - NumberOnly - <$> (o .:? "JustNumber") - --- | ToJSON NumberOnly -instance A.ToJSON NumberOnly where - toJSON NumberOnly {..} = - _omitNulls - [ "JustNumber" .= numberOnlyJustNumber - ] - - --- | Construct a value of type 'NumberOnly' (by applying it's required fields, if any) -mkNumberOnly - :: NumberOnly -mkNumberOnly = - NumberOnly - { numberOnlyJustNumber = Nothing - } - --- ** Order --- | Order -data Order = Order - { orderId :: !(Maybe Integer) -- ^ "id" - , orderPetId :: !(Maybe Integer) -- ^ "petId" - , orderQuantity :: !(Maybe Int) -- ^ "quantity" - , orderShipDate :: !(Maybe DateTime) -- ^ "shipDate" - , orderStatus :: !(Maybe E'Status) -- ^ "status" - Order Status - , orderComplete :: !(Maybe Bool) -- ^ "complete" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON Order -instance A.FromJSON Order where - parseJSON = A.withObject "Order" $ \o -> - Order - <$> (o .:? "id") - <*> (o .:? "petId") - <*> (o .:? "quantity") - <*> (o .:? "shipDate") - <*> (o .:? "status") - <*> (o .:? "complete") - --- | ToJSON Order -instance A.ToJSON Order where - toJSON Order {..} = - _omitNulls - [ "id" .= orderId - , "petId" .= orderPetId - , "quantity" .= orderQuantity - , "shipDate" .= orderShipDate - , "status" .= orderStatus - , "complete" .= orderComplete - ] - - --- | Construct a value of type 'Order' (by applying it's required fields, if any) -mkOrder - :: Order -mkOrder = - Order - { orderId = Nothing - , orderPetId = Nothing - , orderQuantity = Nothing - , orderShipDate = Nothing - , orderStatus = Nothing - , orderComplete = Nothing - } - --- ** OuterComposite --- | OuterComposite -data OuterComposite = OuterComposite - { outerCompositeMyNumber :: !(Maybe Double) -- ^ "my_number" - , outerCompositeMyString :: !(Maybe Text) -- ^ "my_string" - , outerCompositeMyBoolean :: !(Maybe Bool) -- ^ "my_boolean" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON OuterComposite -instance A.FromJSON OuterComposite where - parseJSON = A.withObject "OuterComposite" $ \o -> - OuterComposite - <$> (o .:? "my_number") - <*> (o .:? "my_string") - <*> (o .:? "my_boolean") - --- | ToJSON OuterComposite -instance A.ToJSON OuterComposite where - toJSON OuterComposite {..} = - _omitNulls - [ "my_number" .= outerCompositeMyNumber - , "my_string" .= outerCompositeMyString - , "my_boolean" .= outerCompositeMyBoolean - ] - - --- | Construct a value of type 'OuterComposite' (by applying it's required fields, if any) -mkOuterComposite - :: OuterComposite -mkOuterComposite = - OuterComposite - { outerCompositeMyNumber = Nothing - , outerCompositeMyString = Nothing - , outerCompositeMyBoolean = Nothing - } - --- ** Pet --- | Pet -data Pet = Pet - { petId :: !(Maybe Integer) -- ^ "id" - , petCategory :: !(Maybe Category) -- ^ "category" - , petName :: !(Text) -- ^ /Required/ "name" - , petPhotoUrls :: !([Text]) -- ^ /Required/ "photoUrls" - , petTags :: !(Maybe [Tag]) -- ^ "tags" - , petStatus :: !(Maybe E'Status2) -- ^ "status" - pet status in the store - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON Pet -instance A.FromJSON Pet where - parseJSON = A.withObject "Pet" $ \o -> - Pet - <$> (o .:? "id") - <*> (o .:? "category") - <*> (o .: "name") - <*> (o .: "photoUrls") - <*> (o .:? "tags") - <*> (o .:? "status") - --- | ToJSON Pet -instance A.ToJSON Pet where - toJSON Pet {..} = - _omitNulls - [ "id" .= petId - , "category" .= petCategory - , "name" .= petName - , "photoUrls" .= petPhotoUrls - , "tags" .= petTags - , "status" .= petStatus - ] - - --- | Construct a value of type 'Pet' (by applying it's required fields, if any) -mkPet - :: Text -- ^ 'petName' - -> [Text] -- ^ 'petPhotoUrls' - -> Pet -mkPet petName petPhotoUrls = - Pet - { petId = Nothing - , petCategory = Nothing - , petName - , petPhotoUrls - , petTags = Nothing - , petStatus = Nothing - } - --- ** ReadOnlyFirst --- | ReadOnlyFirst -data ReadOnlyFirst = ReadOnlyFirst - { readOnlyFirstBar :: !(Maybe Text) -- ^ "bar" - , readOnlyFirstBaz :: !(Maybe Text) -- ^ "baz" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON ReadOnlyFirst -instance A.FromJSON ReadOnlyFirst where - parseJSON = A.withObject "ReadOnlyFirst" $ \o -> - ReadOnlyFirst - <$> (o .:? "bar") - <*> (o .:? "baz") - --- | ToJSON ReadOnlyFirst -instance A.ToJSON ReadOnlyFirst where - toJSON ReadOnlyFirst {..} = - _omitNulls - [ "bar" .= readOnlyFirstBar - , "baz" .= readOnlyFirstBaz - ] - - --- | Construct a value of type 'ReadOnlyFirst' (by applying it's required fields, if any) -mkReadOnlyFirst - :: ReadOnlyFirst -mkReadOnlyFirst = - ReadOnlyFirst - { readOnlyFirstBar = Nothing - , readOnlyFirstBaz = Nothing - } - --- ** SpecialModelName --- | SpecialModelName -data SpecialModelName = SpecialModelName - { specialModelNameSpecialPropertyName :: !(Maybe Integer) -- ^ "$special[property.name]" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON SpecialModelName -instance A.FromJSON SpecialModelName where - parseJSON = A.withObject "SpecialModelName" $ \o -> - SpecialModelName - <$> (o .:? "$special[property.name]") - --- | ToJSON SpecialModelName -instance A.ToJSON SpecialModelName where - toJSON SpecialModelName {..} = - _omitNulls - [ "$special[property.name]" .= specialModelNameSpecialPropertyName - ] - - --- | Construct a value of type 'SpecialModelName' (by applying it's required fields, if any) -mkSpecialModelName - :: SpecialModelName -mkSpecialModelName = - SpecialModelName - { specialModelNameSpecialPropertyName = Nothing - } - --- ** Tag --- | Tag -data Tag = Tag - { tagId :: !(Maybe Integer) -- ^ "id" - , tagName :: !(Maybe Text) -- ^ "name" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON Tag -instance A.FromJSON Tag where - parseJSON = A.withObject "Tag" $ \o -> - Tag - <$> (o .:? "id") - <*> (o .:? "name") - --- | ToJSON Tag -instance A.ToJSON Tag where - toJSON Tag {..} = - _omitNulls - [ "id" .= tagId - , "name" .= tagName - ] - - --- | Construct a value of type 'Tag' (by applying it's required fields, if any) -mkTag - :: Tag -mkTag = - Tag - { tagId = Nothing - , tagName = Nothing - } - --- ** TypeHolderDefault --- | TypeHolderDefault -data TypeHolderDefault = TypeHolderDefault - { typeHolderDefaultStringItem :: !(Text) -- ^ /Required/ "string_item" - , typeHolderDefaultNumberItem :: !(Double) -- ^ /Required/ "number_item" - , typeHolderDefaultIntegerItem :: !(Int) -- ^ /Required/ "integer_item" - , typeHolderDefaultBoolItem :: !(Bool) -- ^ /Required/ "bool_item" - , typeHolderDefaultArrayItem :: !([Int]) -- ^ /Required/ "array_item" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON TypeHolderDefault -instance A.FromJSON TypeHolderDefault where - parseJSON = A.withObject "TypeHolderDefault" $ \o -> - TypeHolderDefault - <$> (o .: "string_item") - <*> (o .: "number_item") - <*> (o .: "integer_item") - <*> (o .: "bool_item") - <*> (o .: "array_item") - --- | ToJSON TypeHolderDefault -instance A.ToJSON TypeHolderDefault where - toJSON TypeHolderDefault {..} = - _omitNulls - [ "string_item" .= typeHolderDefaultStringItem - , "number_item" .= typeHolderDefaultNumberItem - , "integer_item" .= typeHolderDefaultIntegerItem - , "bool_item" .= typeHolderDefaultBoolItem - , "array_item" .= typeHolderDefaultArrayItem - ] - - --- | Construct a value of type 'TypeHolderDefault' (by applying it's required fields, if any) -mkTypeHolderDefault - :: Text -- ^ 'typeHolderDefaultStringItem' - -> Double -- ^ 'typeHolderDefaultNumberItem' - -> Int -- ^ 'typeHolderDefaultIntegerItem' - -> Bool -- ^ 'typeHolderDefaultBoolItem' - -> [Int] -- ^ 'typeHolderDefaultArrayItem' - -> TypeHolderDefault -mkTypeHolderDefault typeHolderDefaultStringItem typeHolderDefaultNumberItem typeHolderDefaultIntegerItem typeHolderDefaultBoolItem typeHolderDefaultArrayItem = - TypeHolderDefault - { typeHolderDefaultStringItem - , typeHolderDefaultNumberItem - , typeHolderDefaultIntegerItem - , typeHolderDefaultBoolItem - , typeHolderDefaultArrayItem - } - --- ** TypeHolderExample --- | TypeHolderExample -data TypeHolderExample = TypeHolderExample - { typeHolderExampleStringItem :: !(Text) -- ^ /Required/ "string_item" - , typeHolderExampleNumberItem :: !(Double) -- ^ /Required/ "number_item" - , typeHolderExampleIntegerItem :: !(Int) -- ^ /Required/ "integer_item" - , typeHolderExampleBoolItem :: !(Bool) -- ^ /Required/ "bool_item" - , typeHolderExampleArrayItem :: !([Int]) -- ^ /Required/ "array_item" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON TypeHolderExample -instance A.FromJSON TypeHolderExample where - parseJSON = A.withObject "TypeHolderExample" $ \o -> - TypeHolderExample - <$> (o .: "string_item") - <*> (o .: "number_item") - <*> (o .: "integer_item") - <*> (o .: "bool_item") - <*> (o .: "array_item") - --- | ToJSON TypeHolderExample -instance A.ToJSON TypeHolderExample where - toJSON TypeHolderExample {..} = - _omitNulls - [ "string_item" .= typeHolderExampleStringItem - , "number_item" .= typeHolderExampleNumberItem - , "integer_item" .= typeHolderExampleIntegerItem - , "bool_item" .= typeHolderExampleBoolItem - , "array_item" .= typeHolderExampleArrayItem - ] - - --- | Construct a value of type 'TypeHolderExample' (by applying it's required fields, if any) -mkTypeHolderExample - :: Text -- ^ 'typeHolderExampleStringItem' - -> Double -- ^ 'typeHolderExampleNumberItem' - -> Int -- ^ 'typeHolderExampleIntegerItem' - -> Bool -- ^ 'typeHolderExampleBoolItem' - -> [Int] -- ^ 'typeHolderExampleArrayItem' - -> TypeHolderExample -mkTypeHolderExample typeHolderExampleStringItem typeHolderExampleNumberItem typeHolderExampleIntegerItem typeHolderExampleBoolItem typeHolderExampleArrayItem = - TypeHolderExample - { typeHolderExampleStringItem - , typeHolderExampleNumberItem - , typeHolderExampleIntegerItem - , typeHolderExampleBoolItem - , typeHolderExampleArrayItem - } - --- ** User --- | User -data User = User - { userId :: !(Maybe Integer) -- ^ "id" - , userUsername :: !(Maybe Text) -- ^ "username" - , userFirstName :: !(Maybe Text) -- ^ "firstName" - , userLastName :: !(Maybe Text) -- ^ "lastName" - , userEmail :: !(Maybe Text) -- ^ "email" - , userPassword :: !(Maybe Text) -- ^ "password" - , userPhone :: !(Maybe Text) -- ^ "phone" - , userUserStatus :: !(Maybe Int) -- ^ "userStatus" - User Status - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON User -instance A.FromJSON User where - parseJSON = A.withObject "User" $ \o -> - User - <$> (o .:? "id") - <*> (o .:? "username") - <*> (o .:? "firstName") - <*> (o .:? "lastName") - <*> (o .:? "email") - <*> (o .:? "password") - <*> (o .:? "phone") - <*> (o .:? "userStatus") - --- | ToJSON User -instance A.ToJSON User where - toJSON User {..} = - _omitNulls - [ "id" .= userId - , "username" .= userUsername - , "firstName" .= userFirstName - , "lastName" .= userLastName - , "email" .= userEmail - , "password" .= userPassword - , "phone" .= userPhone - , "userStatus" .= userUserStatus - ] - - --- | Construct a value of type 'User' (by applying it's required fields, if any) -mkUser - :: User -mkUser = - User - { userId = Nothing - , userUsername = Nothing - , userFirstName = Nothing - , userLastName = Nothing - , userEmail = Nothing - , userPassword = Nothing - , userPhone = Nothing - , userUserStatus = Nothing - } - --- ** XmlItem --- | XmlItem -data XmlItem = XmlItem - { xmlItemAttributeString :: !(Maybe Text) -- ^ "attribute_string" - , xmlItemAttributeNumber :: !(Maybe Double) -- ^ "attribute_number" - , xmlItemAttributeInteger :: !(Maybe Int) -- ^ "attribute_integer" - , xmlItemAttributeBoolean :: !(Maybe Bool) -- ^ "attribute_boolean" - , xmlItemWrappedArray :: !(Maybe [Int]) -- ^ "wrapped_array" - , xmlItemNameString :: !(Maybe Text) -- ^ "name_string" - , xmlItemNameNumber :: !(Maybe Double) -- ^ "name_number" - , xmlItemNameInteger :: !(Maybe Int) -- ^ "name_integer" - , xmlItemNameBoolean :: !(Maybe Bool) -- ^ "name_boolean" - , xmlItemNameArray :: !(Maybe [Int]) -- ^ "name_array" - , xmlItemNameWrappedArray :: !(Maybe [Int]) -- ^ "name_wrapped_array" - , xmlItemPrefixString :: !(Maybe Text) -- ^ "prefix_string" - , xmlItemPrefixNumber :: !(Maybe Double) -- ^ "prefix_number" - , xmlItemPrefixInteger :: !(Maybe Int) -- ^ "prefix_integer" - , xmlItemPrefixBoolean :: !(Maybe Bool) -- ^ "prefix_boolean" - , xmlItemPrefixArray :: !(Maybe [Int]) -- ^ "prefix_array" - , xmlItemPrefixWrappedArray :: !(Maybe [Int]) -- ^ "prefix_wrapped_array" - , xmlItemNamespaceString :: !(Maybe Text) -- ^ "namespace_string" - , xmlItemNamespaceNumber :: !(Maybe Double) -- ^ "namespace_number" - , xmlItemNamespaceInteger :: !(Maybe Int) -- ^ "namespace_integer" - , xmlItemNamespaceBoolean :: !(Maybe Bool) -- ^ "namespace_boolean" - , xmlItemNamespaceArray :: !(Maybe [Int]) -- ^ "namespace_array" - , xmlItemNamespaceWrappedArray :: !(Maybe [Int]) -- ^ "namespace_wrapped_array" - , xmlItemPrefixNsString :: !(Maybe Text) -- ^ "prefix_ns_string" - , xmlItemPrefixNsNumber :: !(Maybe Double) -- ^ "prefix_ns_number" - , xmlItemPrefixNsInteger :: !(Maybe Int) -- ^ "prefix_ns_integer" - , xmlItemPrefixNsBoolean :: !(Maybe Bool) -- ^ "prefix_ns_boolean" - , xmlItemPrefixNsArray :: !(Maybe [Int]) -- ^ "prefix_ns_array" - , xmlItemPrefixNsWrappedArray :: !(Maybe [Int]) -- ^ "prefix_ns_wrapped_array" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON XmlItem -instance A.FromJSON XmlItem where - parseJSON = A.withObject "XmlItem" $ \o -> - XmlItem - <$> (o .:? "attribute_string") - <*> (o .:? "attribute_number") - <*> (o .:? "attribute_integer") - <*> (o .:? "attribute_boolean") - <*> (o .:? "wrapped_array") - <*> (o .:? "name_string") - <*> (o .:? "name_number") - <*> (o .:? "name_integer") - <*> (o .:? "name_boolean") - <*> (o .:? "name_array") - <*> (o .:? "name_wrapped_array") - <*> (o .:? "prefix_string") - <*> (o .:? "prefix_number") - <*> (o .:? "prefix_integer") - <*> (o .:? "prefix_boolean") - <*> (o .:? "prefix_array") - <*> (o .:? "prefix_wrapped_array") - <*> (o .:? "namespace_string") - <*> (o .:? "namespace_number") - <*> (o .:? "namespace_integer") - <*> (o .:? "namespace_boolean") - <*> (o .:? "namespace_array") - <*> (o .:? "namespace_wrapped_array") - <*> (o .:? "prefix_ns_string") - <*> (o .:? "prefix_ns_number") - <*> (o .:? "prefix_ns_integer") - <*> (o .:? "prefix_ns_boolean") - <*> (o .:? "prefix_ns_array") - <*> (o .:? "prefix_ns_wrapped_array") - --- | ToJSON XmlItem -instance A.ToJSON XmlItem where - toJSON XmlItem {..} = - _omitNulls - [ "attribute_string" .= xmlItemAttributeString - , "attribute_number" .= xmlItemAttributeNumber - , "attribute_integer" .= xmlItemAttributeInteger - , "attribute_boolean" .= xmlItemAttributeBoolean - , "wrapped_array" .= xmlItemWrappedArray - , "name_string" .= xmlItemNameString - , "name_number" .= xmlItemNameNumber - , "name_integer" .= xmlItemNameInteger - , "name_boolean" .= xmlItemNameBoolean - , "name_array" .= xmlItemNameArray - , "name_wrapped_array" .= xmlItemNameWrappedArray - , "prefix_string" .= xmlItemPrefixString - , "prefix_number" .= xmlItemPrefixNumber - , "prefix_integer" .= xmlItemPrefixInteger - , "prefix_boolean" .= xmlItemPrefixBoolean - , "prefix_array" .= xmlItemPrefixArray - , "prefix_wrapped_array" .= xmlItemPrefixWrappedArray - , "namespace_string" .= xmlItemNamespaceString - , "namespace_number" .= xmlItemNamespaceNumber - , "namespace_integer" .= xmlItemNamespaceInteger - , "namespace_boolean" .= xmlItemNamespaceBoolean - , "namespace_array" .= xmlItemNamespaceArray - , "namespace_wrapped_array" .= xmlItemNamespaceWrappedArray - , "prefix_ns_string" .= xmlItemPrefixNsString - , "prefix_ns_number" .= xmlItemPrefixNsNumber - , "prefix_ns_integer" .= xmlItemPrefixNsInteger - , "prefix_ns_boolean" .= xmlItemPrefixNsBoolean - , "prefix_ns_array" .= xmlItemPrefixNsArray - , "prefix_ns_wrapped_array" .= xmlItemPrefixNsWrappedArray - ] - - --- | Construct a value of type 'XmlItem' (by applying it's required fields, if any) -mkXmlItem - :: XmlItem -mkXmlItem = - XmlItem - { xmlItemAttributeString = Nothing - , xmlItemAttributeNumber = Nothing - , xmlItemAttributeInteger = Nothing - , xmlItemAttributeBoolean = Nothing - , xmlItemWrappedArray = Nothing - , xmlItemNameString = Nothing - , xmlItemNameNumber = Nothing - , xmlItemNameInteger = Nothing - , xmlItemNameBoolean = Nothing - , xmlItemNameArray = Nothing - , xmlItemNameWrappedArray = Nothing - , xmlItemPrefixString = Nothing - , xmlItemPrefixNumber = Nothing - , xmlItemPrefixInteger = Nothing - , xmlItemPrefixBoolean = Nothing - , xmlItemPrefixArray = Nothing - , xmlItemPrefixWrappedArray = Nothing - , xmlItemNamespaceString = Nothing - , xmlItemNamespaceNumber = Nothing - , xmlItemNamespaceInteger = Nothing - , xmlItemNamespaceBoolean = Nothing - , xmlItemNamespaceArray = Nothing - , xmlItemNamespaceWrappedArray = Nothing - , xmlItemPrefixNsString = Nothing - , xmlItemPrefixNsNumber = Nothing - , xmlItemPrefixNsInteger = Nothing - , xmlItemPrefixNsBoolean = Nothing - , xmlItemPrefixNsArray = Nothing - , xmlItemPrefixNsWrappedArray = Nothing - } - - --- * Enums - - --- ** E'ArrayEnum - --- | Enum of 'Text' -data E'ArrayEnum - = E'ArrayEnum'Fish -- ^ @"fish"@ - | E'ArrayEnum'Crab -- ^ @"crab"@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + , formatTestBigDecimal :: !(Maybe Double) -- ^ "BigDecimal" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON FormatTest +instance A.FromJSON FormatTest where + parseJSON = A.withObject "FormatTest" $ \o -> + FormatTest + <$> (o .:? "integer") + <*> (o .:? "int32") + <*> (o .:? "int64") + <*> (o .: "number") + <*> (o .:? "float") + <*> (o .:? "double") + <*> (o .:? "string") + <*> (o .: "byte") + <*> (o .:? "binary") + <*> (o .: "date") + <*> (o .:? "dateTime") + <*> (o .:? "uuid") + <*> (o .: "password") + <*> (o .:? "BigDecimal") + +-- | ToJSON FormatTest +instance A.ToJSON FormatTest where + toJSON FormatTest {..} = + _omitNulls + [ "integer" .= formatTestInteger + , "int32" .= formatTestInt32 + , "int64" .= formatTestInt64 + , "number" .= formatTestNumber + , "float" .= formatTestFloat + , "double" .= formatTestDouble + , "string" .= formatTestString + , "byte" .= formatTestByte + , "binary" .= formatTestBinary + , "date" .= formatTestDate + , "dateTime" .= formatTestDateTime + , "uuid" .= formatTestUuid + , "password" .= formatTestPassword + , "BigDecimal" .= formatTestBigDecimal + ] + + +-- | Construct a value of type 'FormatTest' (by applying it's required fields, if any) +mkFormatTest + :: Double -- ^ 'formatTestNumber' + -> ByteArray -- ^ 'formatTestByte' + -> Date -- ^ 'formatTestDate' + -> Text -- ^ 'formatTestPassword' + -> FormatTest +mkFormatTest formatTestNumber formatTestByte formatTestDate formatTestPassword = + FormatTest + { formatTestInteger = Nothing + , formatTestInt32 = Nothing + , formatTestInt64 = Nothing + , formatTestNumber + , formatTestFloat = Nothing + , formatTestDouble = Nothing + , formatTestString = Nothing + , formatTestByte + , formatTestBinary = Nothing + , formatTestDate + , formatTestDateTime = Nothing + , formatTestUuid = Nothing + , formatTestPassword + , formatTestBigDecimal = Nothing + } + +-- ** HasOnlyReadOnly +-- | HasOnlyReadOnly +data HasOnlyReadOnly = HasOnlyReadOnly + { hasOnlyReadOnlyBar :: !(Maybe Text) -- ^ "bar" + , hasOnlyReadOnlyFoo :: !(Maybe Text) -- ^ "foo" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HasOnlyReadOnly +instance A.FromJSON HasOnlyReadOnly where + parseJSON = A.withObject "HasOnlyReadOnly" $ \o -> + HasOnlyReadOnly + <$> (o .:? "bar") + <*> (o .:? "foo") + +-- | ToJSON HasOnlyReadOnly +instance A.ToJSON HasOnlyReadOnly where + toJSON HasOnlyReadOnly {..} = + _omitNulls + [ "bar" .= hasOnlyReadOnlyBar + , "foo" .= hasOnlyReadOnlyFoo + ] + + +-- | Construct a value of type 'HasOnlyReadOnly' (by applying it's required fields, if any) +mkHasOnlyReadOnly + :: HasOnlyReadOnly +mkHasOnlyReadOnly = + HasOnlyReadOnly + { hasOnlyReadOnlyBar = Nothing + , hasOnlyReadOnlyFoo = Nothing + } + +-- ** MapTest +-- | MapTest +data MapTest = MapTest + { mapTestMapMapOfString :: !(Maybe (Map.Map String (Map.Map String Text))) -- ^ "map_map_of_string" + , mapTestMapOfEnumString :: !(Maybe (Map.Map String E'Inner)) -- ^ "map_of_enum_string" + , mapTestDirectMap :: !(Maybe (Map.Map String Bool)) -- ^ "direct_map" + , mapTestIndirectMap :: !(Maybe (Map.Map String Bool)) -- ^ "indirect_map" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MapTest +instance A.FromJSON MapTest where + parseJSON = A.withObject "MapTest" $ \o -> + MapTest + <$> (o .:? "map_map_of_string") + <*> (o .:? "map_of_enum_string") + <*> (o .:? "direct_map") + <*> (o .:? "indirect_map") + +-- | ToJSON MapTest +instance A.ToJSON MapTest where + toJSON MapTest {..} = + _omitNulls + [ "map_map_of_string" .= mapTestMapMapOfString + , "map_of_enum_string" .= mapTestMapOfEnumString + , "direct_map" .= mapTestDirectMap + , "indirect_map" .= mapTestIndirectMap + ] + + +-- | Construct a value of type 'MapTest' (by applying it's required fields, if any) +mkMapTest + :: MapTest +mkMapTest = + MapTest + { mapTestMapMapOfString = Nothing + , mapTestMapOfEnumString = Nothing + , mapTestDirectMap = Nothing + , mapTestIndirectMap = Nothing + } + +-- ** MixedPropertiesAndAdditionalPropertiesClass +-- | MixedPropertiesAndAdditionalPropertiesClass +data MixedPropertiesAndAdditionalPropertiesClass = MixedPropertiesAndAdditionalPropertiesClass + { mixedPropertiesAndAdditionalPropertiesClassUuid :: !(Maybe Text) -- ^ "uuid" + , mixedPropertiesAndAdditionalPropertiesClassDateTime :: !(Maybe DateTime) -- ^ "dateTime" + , mixedPropertiesAndAdditionalPropertiesClassMap :: !(Maybe (Map.Map String Animal)) -- ^ "map" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MixedPropertiesAndAdditionalPropertiesClass +instance A.FromJSON MixedPropertiesAndAdditionalPropertiesClass where + parseJSON = A.withObject "MixedPropertiesAndAdditionalPropertiesClass" $ \o -> + MixedPropertiesAndAdditionalPropertiesClass + <$> (o .:? "uuid") + <*> (o .:? "dateTime") + <*> (o .:? "map") + +-- | ToJSON MixedPropertiesAndAdditionalPropertiesClass +instance A.ToJSON MixedPropertiesAndAdditionalPropertiesClass where + toJSON MixedPropertiesAndAdditionalPropertiesClass {..} = + _omitNulls + [ "uuid" .= mixedPropertiesAndAdditionalPropertiesClassUuid + , "dateTime" .= mixedPropertiesAndAdditionalPropertiesClassDateTime + , "map" .= mixedPropertiesAndAdditionalPropertiesClassMap + ] + + +-- | Construct a value of type 'MixedPropertiesAndAdditionalPropertiesClass' (by applying it's required fields, if any) +mkMixedPropertiesAndAdditionalPropertiesClass + :: MixedPropertiesAndAdditionalPropertiesClass +mkMixedPropertiesAndAdditionalPropertiesClass = + MixedPropertiesAndAdditionalPropertiesClass + { mixedPropertiesAndAdditionalPropertiesClassUuid = Nothing + , mixedPropertiesAndAdditionalPropertiesClassDateTime = Nothing + , mixedPropertiesAndAdditionalPropertiesClassMap = Nothing + } + +-- ** Model200Response +-- | Model200Response +-- Model for testing model name starting with number +data Model200Response = Model200Response + { model200ResponseName :: !(Maybe Int) -- ^ "name" + , model200ResponseClass :: !(Maybe Text) -- ^ "class" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Model200Response +instance A.FromJSON Model200Response where + parseJSON = A.withObject "Model200Response" $ \o -> + Model200Response + <$> (o .:? "name") + <*> (o .:? "class") + +-- | ToJSON Model200Response +instance A.ToJSON Model200Response where + toJSON Model200Response {..} = + _omitNulls + [ "name" .= model200ResponseName + , "class" .= model200ResponseClass + ] + + +-- | Construct a value of type 'Model200Response' (by applying it's required fields, if any) +mkModel200Response + :: Model200Response +mkModel200Response = + Model200Response + { model200ResponseName = Nothing + , model200ResponseClass = Nothing + } + +-- ** ModelList +-- | ModelList +data ModelList = ModelList + { modelList123list :: !(Maybe Text) -- ^ "123-list" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ModelList +instance A.FromJSON ModelList where + parseJSON = A.withObject "ModelList" $ \o -> + ModelList + <$> (o .:? "123-list") + +-- | ToJSON ModelList +instance A.ToJSON ModelList where + toJSON ModelList {..} = + _omitNulls + [ "123-list" .= modelList123list + ] + + +-- | Construct a value of type 'ModelList' (by applying it's required fields, if any) +mkModelList + :: ModelList +mkModelList = + ModelList + { modelList123list = Nothing + } + +-- ** ModelReturn +-- | ModelReturn +-- Model for testing reserved words +data ModelReturn = ModelReturn + { modelReturnReturn :: !(Maybe Int) -- ^ "return" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ModelReturn +instance A.FromJSON ModelReturn where + parseJSON = A.withObject "ModelReturn" $ \o -> + ModelReturn + <$> (o .:? "return") + +-- | ToJSON ModelReturn +instance A.ToJSON ModelReturn where + toJSON ModelReturn {..} = + _omitNulls + [ "return" .= modelReturnReturn + ] + + +-- | Construct a value of type 'ModelReturn' (by applying it's required fields, if any) +mkModelReturn + :: ModelReturn +mkModelReturn = + ModelReturn + { modelReturnReturn = Nothing + } + +-- ** Name +-- | Name +-- Model for testing model name same as property name +data Name = Name + { nameName :: !(Int) -- ^ /Required/ "name" + , nameSnakeCase :: !(Maybe Int) -- ^ "snake_case" + , nameProperty :: !(Maybe Text) -- ^ "property" + , name123number :: !(Maybe Int) -- ^ "123Number" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Name +instance A.FromJSON Name where + parseJSON = A.withObject "Name" $ \o -> + Name + <$> (o .: "name") + <*> (o .:? "snake_case") + <*> (o .:? "property") + <*> (o .:? "123Number") + +-- | ToJSON Name +instance A.ToJSON Name where + toJSON Name {..} = + _omitNulls + [ "name" .= nameName + , "snake_case" .= nameSnakeCase + , "property" .= nameProperty + , "123Number" .= name123number + ] + + +-- | Construct a value of type 'Name' (by applying it's required fields, if any) +mkName + :: Int -- ^ 'nameName' + -> Name +mkName nameName = + Name + { nameName + , nameSnakeCase = Nothing + , nameProperty = Nothing + , name123number = Nothing + } + +-- ** NumberOnly +-- | NumberOnly +data NumberOnly = NumberOnly + { numberOnlyJustNumber :: !(Maybe Double) -- ^ "JustNumber" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NumberOnly +instance A.FromJSON NumberOnly where + parseJSON = A.withObject "NumberOnly" $ \o -> + NumberOnly + <$> (o .:? "JustNumber") + +-- | ToJSON NumberOnly +instance A.ToJSON NumberOnly where + toJSON NumberOnly {..} = + _omitNulls + [ "JustNumber" .= numberOnlyJustNumber + ] + + +-- | Construct a value of type 'NumberOnly' (by applying it's required fields, if any) +mkNumberOnly + :: NumberOnly +mkNumberOnly = + NumberOnly + { numberOnlyJustNumber = Nothing + } + +-- ** Order +-- | Order +data Order = Order + { orderId :: !(Maybe Integer) -- ^ "id" + , orderPetId :: !(Maybe Integer) -- ^ "petId" + , orderQuantity :: !(Maybe Int) -- ^ "quantity" + , orderShipDate :: !(Maybe DateTime) -- ^ "shipDate" + , orderStatus :: !(Maybe E'Status) -- ^ "status" - Order Status + , orderComplete :: !(Maybe Bool) -- ^ "complete" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Order +instance A.FromJSON Order where + parseJSON = A.withObject "Order" $ \o -> + Order + <$> (o .:? "id") + <*> (o .:? "petId") + <*> (o .:? "quantity") + <*> (o .:? "shipDate") + <*> (o .:? "status") + <*> (o .:? "complete") + +-- | ToJSON Order +instance A.ToJSON Order where + toJSON Order {..} = + _omitNulls + [ "id" .= orderId + , "petId" .= orderPetId + , "quantity" .= orderQuantity + , "shipDate" .= orderShipDate + , "status" .= orderStatus + , "complete" .= orderComplete + ] + + +-- | Construct a value of type 'Order' (by applying it's required fields, if any) +mkOrder + :: Order +mkOrder = + Order + { orderId = Nothing + , orderPetId = Nothing + , orderQuantity = Nothing + , orderShipDate = Nothing + , orderStatus = Nothing + , orderComplete = Nothing + } + +-- ** OuterComposite +-- | OuterComposite +data OuterComposite = OuterComposite + { outerCompositeMyNumber :: !(Maybe Double) -- ^ "my_number" + , outerCompositeMyString :: !(Maybe Text) -- ^ "my_string" + , outerCompositeMyBoolean :: !(Maybe Bool) -- ^ "my_boolean" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON OuterComposite +instance A.FromJSON OuterComposite where + parseJSON = A.withObject "OuterComposite" $ \o -> + OuterComposite + <$> (o .:? "my_number") + <*> (o .:? "my_string") + <*> (o .:? "my_boolean") + +-- | ToJSON OuterComposite +instance A.ToJSON OuterComposite where + toJSON OuterComposite {..} = + _omitNulls + [ "my_number" .= outerCompositeMyNumber + , "my_string" .= outerCompositeMyString + , "my_boolean" .= outerCompositeMyBoolean + ] + + +-- | Construct a value of type 'OuterComposite' (by applying it's required fields, if any) +mkOuterComposite + :: OuterComposite +mkOuterComposite = + OuterComposite + { outerCompositeMyNumber = Nothing + , outerCompositeMyString = Nothing + , outerCompositeMyBoolean = Nothing + } + +-- ** Pet +-- | Pet +data Pet = Pet + { petId :: !(Maybe Integer) -- ^ "id" + , petCategory :: !(Maybe Category) -- ^ "category" + , petName :: !(Text) -- ^ /Required/ "name" + , petPhotoUrls :: !([Text]) -- ^ /Required/ "photoUrls" + , petTags :: !(Maybe [Tag]) -- ^ "tags" + , petStatus :: !(Maybe E'Status2) -- ^ "status" - pet status in the store + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Pet +instance A.FromJSON Pet where + parseJSON = A.withObject "Pet" $ \o -> + Pet + <$> (o .:? "id") + <*> (o .:? "category") + <*> (o .: "name") + <*> (o .: "photoUrls") + <*> (o .:? "tags") + <*> (o .:? "status") + +-- | ToJSON Pet +instance A.ToJSON Pet where + toJSON Pet {..} = + _omitNulls + [ "id" .= petId + , "category" .= petCategory + , "name" .= petName + , "photoUrls" .= petPhotoUrls + , "tags" .= petTags + , "status" .= petStatus + ] + + +-- | Construct a value of type 'Pet' (by applying it's required fields, if any) +mkPet + :: Text -- ^ 'petName' + -> [Text] -- ^ 'petPhotoUrls' + -> Pet +mkPet petName petPhotoUrls = + Pet + { petId = Nothing + , petCategory = Nothing + , petName + , petPhotoUrls + , petTags = Nothing + , petStatus = Nothing + } + +-- ** ReadOnlyFirst +-- | ReadOnlyFirst +data ReadOnlyFirst = ReadOnlyFirst + { readOnlyFirstBar :: !(Maybe Text) -- ^ "bar" + , readOnlyFirstBaz :: !(Maybe Text) -- ^ "baz" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ReadOnlyFirst +instance A.FromJSON ReadOnlyFirst where + parseJSON = A.withObject "ReadOnlyFirst" $ \o -> + ReadOnlyFirst + <$> (o .:? "bar") + <*> (o .:? "baz") + +-- | ToJSON ReadOnlyFirst +instance A.ToJSON ReadOnlyFirst where + toJSON ReadOnlyFirst {..} = + _omitNulls + [ "bar" .= readOnlyFirstBar + , "baz" .= readOnlyFirstBaz + ] + + +-- | Construct a value of type 'ReadOnlyFirst' (by applying it's required fields, if any) +mkReadOnlyFirst + :: ReadOnlyFirst +mkReadOnlyFirst = + ReadOnlyFirst + { readOnlyFirstBar = Nothing + , readOnlyFirstBaz = Nothing + } + +-- ** SpecialModelName +-- | SpecialModelName +data SpecialModelName = SpecialModelName + { specialModelNameSpecialPropertyName :: !(Maybe Integer) -- ^ "$special[property.name]" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SpecialModelName +instance A.FromJSON SpecialModelName where + parseJSON = A.withObject "SpecialModelName" $ \o -> + SpecialModelName + <$> (o .:? "$special[property.name]") + +-- | ToJSON SpecialModelName +instance A.ToJSON SpecialModelName where + toJSON SpecialModelName {..} = + _omitNulls + [ "$special[property.name]" .= specialModelNameSpecialPropertyName + ] + + +-- | Construct a value of type 'SpecialModelName' (by applying it's required fields, if any) +mkSpecialModelName + :: SpecialModelName +mkSpecialModelName = + SpecialModelName + { specialModelNameSpecialPropertyName = Nothing + } + +-- ** Tag +-- | Tag +data Tag = Tag + { tagId :: !(Maybe Integer) -- ^ "id" + , tagName :: !(Maybe Text) -- ^ "name" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Tag +instance A.FromJSON Tag where + parseJSON = A.withObject "Tag" $ \o -> + Tag + <$> (o .:? "id") + <*> (o .:? "name") + +-- | ToJSON Tag +instance A.ToJSON Tag where + toJSON Tag {..} = + _omitNulls + [ "id" .= tagId + , "name" .= tagName + ] + + +-- | Construct a value of type 'Tag' (by applying it's required fields, if any) +mkTag + :: Tag +mkTag = + Tag + { tagId = Nothing + , tagName = Nothing + } + +-- ** TypeHolderDefault +-- | TypeHolderDefault +data TypeHolderDefault = TypeHolderDefault + { typeHolderDefaultStringItem :: !(Text) -- ^ /Required/ "string_item" + , typeHolderDefaultNumberItem :: !(Double) -- ^ /Required/ "number_item" + , typeHolderDefaultIntegerItem :: !(Int) -- ^ /Required/ "integer_item" + , typeHolderDefaultBoolItem :: !(Bool) -- ^ /Required/ "bool_item" + , typeHolderDefaultArrayItem :: !([Int]) -- ^ /Required/ "array_item" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TypeHolderDefault +instance A.FromJSON TypeHolderDefault where + parseJSON = A.withObject "TypeHolderDefault" $ \o -> + TypeHolderDefault + <$> (o .: "string_item") + <*> (o .: "number_item") + <*> (o .: "integer_item") + <*> (o .: "bool_item") + <*> (o .: "array_item") + +-- | ToJSON TypeHolderDefault +instance A.ToJSON TypeHolderDefault where + toJSON TypeHolderDefault {..} = + _omitNulls + [ "string_item" .= typeHolderDefaultStringItem + , "number_item" .= typeHolderDefaultNumberItem + , "integer_item" .= typeHolderDefaultIntegerItem + , "bool_item" .= typeHolderDefaultBoolItem + , "array_item" .= typeHolderDefaultArrayItem + ] + + +-- | Construct a value of type 'TypeHolderDefault' (by applying it's required fields, if any) +mkTypeHolderDefault + :: Text -- ^ 'typeHolderDefaultStringItem' + -> Double -- ^ 'typeHolderDefaultNumberItem' + -> Int -- ^ 'typeHolderDefaultIntegerItem' + -> Bool -- ^ 'typeHolderDefaultBoolItem' + -> [Int] -- ^ 'typeHolderDefaultArrayItem' + -> TypeHolderDefault +mkTypeHolderDefault typeHolderDefaultStringItem typeHolderDefaultNumberItem typeHolderDefaultIntegerItem typeHolderDefaultBoolItem typeHolderDefaultArrayItem = + TypeHolderDefault + { typeHolderDefaultStringItem + , typeHolderDefaultNumberItem + , typeHolderDefaultIntegerItem + , typeHolderDefaultBoolItem + , typeHolderDefaultArrayItem + } + +-- ** TypeHolderExample +-- | TypeHolderExample +data TypeHolderExample = TypeHolderExample + { typeHolderExampleStringItem :: !(Text) -- ^ /Required/ "string_item" + , typeHolderExampleNumberItem :: !(Double) -- ^ /Required/ "number_item" + , typeHolderExampleFloatItem :: !(Float) -- ^ /Required/ "float_item" + , typeHolderExampleIntegerItem :: !(Int) -- ^ /Required/ "integer_item" + , typeHolderExampleBoolItem :: !(Bool) -- ^ /Required/ "bool_item" + , typeHolderExampleArrayItem :: !([Int]) -- ^ /Required/ "array_item" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TypeHolderExample +instance A.FromJSON TypeHolderExample where + parseJSON = A.withObject "TypeHolderExample" $ \o -> + TypeHolderExample + <$> (o .: "string_item") + <*> (o .: "number_item") + <*> (o .: "float_item") + <*> (o .: "integer_item") + <*> (o .: "bool_item") + <*> (o .: "array_item") + +-- | ToJSON TypeHolderExample +instance A.ToJSON TypeHolderExample where + toJSON TypeHolderExample {..} = + _omitNulls + [ "string_item" .= typeHolderExampleStringItem + , "number_item" .= typeHolderExampleNumberItem + , "float_item" .= typeHolderExampleFloatItem + , "integer_item" .= typeHolderExampleIntegerItem + , "bool_item" .= typeHolderExampleBoolItem + , "array_item" .= typeHolderExampleArrayItem + ] + + +-- | Construct a value of type 'TypeHolderExample' (by applying it's required fields, if any) +mkTypeHolderExample + :: Text -- ^ 'typeHolderExampleStringItem' + -> Double -- ^ 'typeHolderExampleNumberItem' + -> Float -- ^ 'typeHolderExampleFloatItem' + -> Int -- ^ 'typeHolderExampleIntegerItem' + -> Bool -- ^ 'typeHolderExampleBoolItem' + -> [Int] -- ^ 'typeHolderExampleArrayItem' + -> TypeHolderExample +mkTypeHolderExample typeHolderExampleStringItem typeHolderExampleNumberItem typeHolderExampleFloatItem typeHolderExampleIntegerItem typeHolderExampleBoolItem typeHolderExampleArrayItem = + TypeHolderExample + { typeHolderExampleStringItem + , typeHolderExampleNumberItem + , typeHolderExampleFloatItem + , typeHolderExampleIntegerItem + , typeHolderExampleBoolItem + , typeHolderExampleArrayItem + } + +-- ** User +-- | User +data User = User + { userId :: !(Maybe Integer) -- ^ "id" + , userUsername :: !(Maybe Text) -- ^ "username" + , userFirstName :: !(Maybe Text) -- ^ "firstName" + , userLastName :: !(Maybe Text) -- ^ "lastName" + , userEmail :: !(Maybe Text) -- ^ "email" + , userPassword :: !(Maybe Text) -- ^ "password" + , userPhone :: !(Maybe Text) -- ^ "phone" + , userUserStatus :: !(Maybe Int) -- ^ "userStatus" - User Status + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON User +instance A.FromJSON User where + parseJSON = A.withObject "User" $ \o -> + User + <$> (o .:? "id") + <*> (o .:? "username") + <*> (o .:? "firstName") + <*> (o .:? "lastName") + <*> (o .:? "email") + <*> (o .:? "password") + <*> (o .:? "phone") + <*> (o .:? "userStatus") + +-- | ToJSON User +instance A.ToJSON User where + toJSON User {..} = + _omitNulls + [ "id" .= userId + , "username" .= userUsername + , "firstName" .= userFirstName + , "lastName" .= userLastName + , "email" .= userEmail + , "password" .= userPassword + , "phone" .= userPhone + , "userStatus" .= userUserStatus + ] + + +-- | Construct a value of type 'User' (by applying it's required fields, if any) +mkUser + :: User +mkUser = + User + { userId = Nothing + , userUsername = Nothing + , userFirstName = Nothing + , userLastName = Nothing + , userEmail = Nothing + , userPassword = Nothing + , userPhone = Nothing + , userUserStatus = Nothing + } + +-- ** XmlItem +-- | XmlItem +data XmlItem = XmlItem + { xmlItemAttributeString :: !(Maybe Text) -- ^ "attribute_string" + , xmlItemAttributeNumber :: !(Maybe Double) -- ^ "attribute_number" + , xmlItemAttributeInteger :: !(Maybe Int) -- ^ "attribute_integer" + , xmlItemAttributeBoolean :: !(Maybe Bool) -- ^ "attribute_boolean" + , xmlItemWrappedArray :: !(Maybe [Int]) -- ^ "wrapped_array" + , xmlItemNameString :: !(Maybe Text) -- ^ "name_string" + , xmlItemNameNumber :: !(Maybe Double) -- ^ "name_number" + , xmlItemNameInteger :: !(Maybe Int) -- ^ "name_integer" + , xmlItemNameBoolean :: !(Maybe Bool) -- ^ "name_boolean" + , xmlItemNameArray :: !(Maybe [Int]) -- ^ "name_array" + , xmlItemNameWrappedArray :: !(Maybe [Int]) -- ^ "name_wrapped_array" + , xmlItemPrefixString :: !(Maybe Text) -- ^ "prefix_string" + , xmlItemPrefixNumber :: !(Maybe Double) -- ^ "prefix_number" + , xmlItemPrefixInteger :: !(Maybe Int) -- ^ "prefix_integer" + , xmlItemPrefixBoolean :: !(Maybe Bool) -- ^ "prefix_boolean" + , xmlItemPrefixArray :: !(Maybe [Int]) -- ^ "prefix_array" + , xmlItemPrefixWrappedArray :: !(Maybe [Int]) -- ^ "prefix_wrapped_array" + , xmlItemNamespaceString :: !(Maybe Text) -- ^ "namespace_string" + , xmlItemNamespaceNumber :: !(Maybe Double) -- ^ "namespace_number" + , xmlItemNamespaceInteger :: !(Maybe Int) -- ^ "namespace_integer" + , xmlItemNamespaceBoolean :: !(Maybe Bool) -- ^ "namespace_boolean" + , xmlItemNamespaceArray :: !(Maybe [Int]) -- ^ "namespace_array" + , xmlItemNamespaceWrappedArray :: !(Maybe [Int]) -- ^ "namespace_wrapped_array" + , xmlItemPrefixNsString :: !(Maybe Text) -- ^ "prefix_ns_string" + , xmlItemPrefixNsNumber :: !(Maybe Double) -- ^ "prefix_ns_number" + , xmlItemPrefixNsInteger :: !(Maybe Int) -- ^ "prefix_ns_integer" + , xmlItemPrefixNsBoolean :: !(Maybe Bool) -- ^ "prefix_ns_boolean" + , xmlItemPrefixNsArray :: !(Maybe [Int]) -- ^ "prefix_ns_array" + , xmlItemPrefixNsWrappedArray :: !(Maybe [Int]) -- ^ "prefix_ns_wrapped_array" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON XmlItem +instance A.FromJSON XmlItem where + parseJSON = A.withObject "XmlItem" $ \o -> + XmlItem + <$> (o .:? "attribute_string") + <*> (o .:? "attribute_number") + <*> (o .:? "attribute_integer") + <*> (o .:? "attribute_boolean") + <*> (o .:? "wrapped_array") + <*> (o .:? "name_string") + <*> (o .:? "name_number") + <*> (o .:? "name_integer") + <*> (o .:? "name_boolean") + <*> (o .:? "name_array") + <*> (o .:? "name_wrapped_array") + <*> (o .:? "prefix_string") + <*> (o .:? "prefix_number") + <*> (o .:? "prefix_integer") + <*> (o .:? "prefix_boolean") + <*> (o .:? "prefix_array") + <*> (o .:? "prefix_wrapped_array") + <*> (o .:? "namespace_string") + <*> (o .:? "namespace_number") + <*> (o .:? "namespace_integer") + <*> (o .:? "namespace_boolean") + <*> (o .:? "namespace_array") + <*> (o .:? "namespace_wrapped_array") + <*> (o .:? "prefix_ns_string") + <*> (o .:? "prefix_ns_number") + <*> (o .:? "prefix_ns_integer") + <*> (o .:? "prefix_ns_boolean") + <*> (o .:? "prefix_ns_array") + <*> (o .:? "prefix_ns_wrapped_array") + +-- | ToJSON XmlItem +instance A.ToJSON XmlItem where + toJSON XmlItem {..} = + _omitNulls + [ "attribute_string" .= xmlItemAttributeString + , "attribute_number" .= xmlItemAttributeNumber + , "attribute_integer" .= xmlItemAttributeInteger + , "attribute_boolean" .= xmlItemAttributeBoolean + , "wrapped_array" .= xmlItemWrappedArray + , "name_string" .= xmlItemNameString + , "name_number" .= xmlItemNameNumber + , "name_integer" .= xmlItemNameInteger + , "name_boolean" .= xmlItemNameBoolean + , "name_array" .= xmlItemNameArray + , "name_wrapped_array" .= xmlItemNameWrappedArray + , "prefix_string" .= xmlItemPrefixString + , "prefix_number" .= xmlItemPrefixNumber + , "prefix_integer" .= xmlItemPrefixInteger + , "prefix_boolean" .= xmlItemPrefixBoolean + , "prefix_array" .= xmlItemPrefixArray + , "prefix_wrapped_array" .= xmlItemPrefixWrappedArray + , "namespace_string" .= xmlItemNamespaceString + , "namespace_number" .= xmlItemNamespaceNumber + , "namespace_integer" .= xmlItemNamespaceInteger + , "namespace_boolean" .= xmlItemNamespaceBoolean + , "namespace_array" .= xmlItemNamespaceArray + , "namespace_wrapped_array" .= xmlItemNamespaceWrappedArray + , "prefix_ns_string" .= xmlItemPrefixNsString + , "prefix_ns_number" .= xmlItemPrefixNsNumber + , "prefix_ns_integer" .= xmlItemPrefixNsInteger + , "prefix_ns_boolean" .= xmlItemPrefixNsBoolean + , "prefix_ns_array" .= xmlItemPrefixNsArray + , "prefix_ns_wrapped_array" .= xmlItemPrefixNsWrappedArray + ] + + +-- | Construct a value of type 'XmlItem' (by applying it's required fields, if any) +mkXmlItem + :: XmlItem +mkXmlItem = + XmlItem + { xmlItemAttributeString = Nothing + , xmlItemAttributeNumber = Nothing + , xmlItemAttributeInteger = Nothing + , xmlItemAttributeBoolean = Nothing + , xmlItemWrappedArray = Nothing + , xmlItemNameString = Nothing + , xmlItemNameNumber = Nothing + , xmlItemNameInteger = Nothing + , xmlItemNameBoolean = Nothing + , xmlItemNameArray = Nothing + , xmlItemNameWrappedArray = Nothing + , xmlItemPrefixString = Nothing + , xmlItemPrefixNumber = Nothing + , xmlItemPrefixInteger = Nothing + , xmlItemPrefixBoolean = Nothing + , xmlItemPrefixArray = Nothing + , xmlItemPrefixWrappedArray = Nothing + , xmlItemNamespaceString = Nothing + , xmlItemNamespaceNumber = Nothing + , xmlItemNamespaceInteger = Nothing + , xmlItemNamespaceBoolean = Nothing + , xmlItemNamespaceArray = Nothing + , xmlItemNamespaceWrappedArray = Nothing + , xmlItemPrefixNsString = Nothing + , xmlItemPrefixNsNumber = Nothing + , xmlItemPrefixNsInteger = Nothing + , xmlItemPrefixNsBoolean = Nothing + , xmlItemPrefixNsArray = Nothing + , xmlItemPrefixNsWrappedArray = Nothing + } + + +-- * Enums -instance A.ToJSON E'ArrayEnum where toJSON = A.toJSON . fromE'ArrayEnum -instance A.FromJSON E'ArrayEnum where parseJSON o = P.either P.fail (pure . P.id) . toE'ArrayEnum =<< A.parseJSON o -instance WH.ToHttpApiData E'ArrayEnum where toQueryParam = WH.toQueryParam . fromE'ArrayEnum -instance WH.FromHttpApiData E'ArrayEnum where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'ArrayEnum -instance MimeRender MimeMultipartFormData E'ArrayEnum where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'ArrayEnum' enum -fromE'ArrayEnum :: E'ArrayEnum -> Text -fromE'ArrayEnum = \case - E'ArrayEnum'Fish -> "fish" - E'ArrayEnum'Crab -> "crab" - --- | parse 'E'ArrayEnum' enum -toE'ArrayEnum :: Text -> P.Either String E'ArrayEnum -toE'ArrayEnum = \case - "fish" -> P.Right E'ArrayEnum'Fish - "crab" -> P.Right E'ArrayEnum'Crab - s -> P.Left $ "toE'ArrayEnum: enum parse failure: " P.++ P.show s - - --- ** E'EnumFormString - --- | Enum of 'Text' . --- Form parameter enum test (string) -data E'EnumFormString - = E'EnumFormString'_abc -- ^ @"_abc"@ - | E'EnumFormString'_efg -- ^ @"-efg"@ - | E'EnumFormString'_xyz -- ^ @"(xyz)"@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) - -instance A.ToJSON E'EnumFormString where toJSON = A.toJSON . fromE'EnumFormString -instance A.FromJSON E'EnumFormString where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumFormString =<< A.parseJSON o -instance WH.ToHttpApiData E'EnumFormString where toQueryParam = WH.toQueryParam . fromE'EnumFormString -instance WH.FromHttpApiData E'EnumFormString where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumFormString -instance MimeRender MimeMultipartFormData E'EnumFormString where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'EnumFormString' enum -fromE'EnumFormString :: E'EnumFormString -> Text -fromE'EnumFormString = \case - E'EnumFormString'_abc -> "_abc" - E'EnumFormString'_efg -> "-efg" - E'EnumFormString'_xyz -> "(xyz)" - --- | parse 'E'EnumFormString' enum -toE'EnumFormString :: Text -> P.Either String E'EnumFormString -toE'EnumFormString = \case - "_abc" -> P.Right E'EnumFormString'_abc - "-efg" -> P.Right E'EnumFormString'_efg - "(xyz)" -> P.Right E'EnumFormString'_xyz - s -> P.Left $ "toE'EnumFormString: enum parse failure: " P.++ P.show s - + +-- ** E'ArrayEnum + +-- | Enum of 'Text' +data E'ArrayEnum + = E'ArrayEnum'Fish -- ^ @"fish"@ + | E'ArrayEnum'Crab -- ^ @"crab"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'ArrayEnum where toJSON = A.toJSON . fromE'ArrayEnum +instance A.FromJSON E'ArrayEnum where parseJSON o = P.either P.fail (pure . P.id) . toE'ArrayEnum =<< A.parseJSON o +instance WH.ToHttpApiData E'ArrayEnum where toQueryParam = WH.toQueryParam . fromE'ArrayEnum +instance WH.FromHttpApiData E'ArrayEnum where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'ArrayEnum +instance MimeRender MimeMultipartFormData E'ArrayEnum where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'ArrayEnum' enum +fromE'ArrayEnum :: E'ArrayEnum -> Text +fromE'ArrayEnum = \case + E'ArrayEnum'Fish -> "fish" + E'ArrayEnum'Crab -> "crab" + +-- | parse 'E'ArrayEnum' enum +toE'ArrayEnum :: Text -> P.Either String E'ArrayEnum +toE'ArrayEnum = \case + "fish" -> P.Right E'ArrayEnum'Fish + "crab" -> P.Right E'ArrayEnum'Crab + s -> P.Left $ "toE'ArrayEnum: enum parse failure: " P.++ P.show s + + +-- ** E'EnumFormString + +-- | Enum of 'Text' . +-- Form parameter enum test (string) +data E'EnumFormString + = E'EnumFormString'_abc -- ^ @"_abc"@ + | E'EnumFormString'_efg -- ^ @"-efg"@ + | E'EnumFormString'_xyz -- ^ @"(xyz)"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'EnumFormString where toJSON = A.toJSON . fromE'EnumFormString +instance A.FromJSON E'EnumFormString where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumFormString =<< A.parseJSON o +instance WH.ToHttpApiData E'EnumFormString where toQueryParam = WH.toQueryParam . fromE'EnumFormString +instance WH.FromHttpApiData E'EnumFormString where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumFormString +instance MimeRender MimeMultipartFormData E'EnumFormString where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'EnumFormString' enum +fromE'EnumFormString :: E'EnumFormString -> Text +fromE'EnumFormString = \case + E'EnumFormString'_abc -> "_abc" + E'EnumFormString'_efg -> "-efg" + E'EnumFormString'_xyz -> "(xyz)" --- ** E'EnumFormStringArray - --- | Enum of 'Text' -data E'EnumFormStringArray - = E'EnumFormStringArray'GreaterThan -- ^ @">"@ - | E'EnumFormStringArray'Dollar -- ^ @"$"@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) +-- | parse 'E'EnumFormString' enum +toE'EnumFormString :: Text -> P.Either String E'EnumFormString +toE'EnumFormString = \case + "_abc" -> P.Right E'EnumFormString'_abc + "-efg" -> P.Right E'EnumFormString'_efg + "(xyz)" -> P.Right E'EnumFormString'_xyz + s -> P.Left $ "toE'EnumFormString: enum parse failure: " P.++ P.show s -instance A.ToJSON E'EnumFormStringArray where toJSON = A.toJSON . fromE'EnumFormStringArray -instance A.FromJSON E'EnumFormStringArray where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumFormStringArray =<< A.parseJSON o -instance WH.ToHttpApiData E'EnumFormStringArray where toQueryParam = WH.toQueryParam . fromE'EnumFormStringArray -instance WH.FromHttpApiData E'EnumFormStringArray where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumFormStringArray -instance MimeRender MimeMultipartFormData E'EnumFormStringArray where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'EnumFormStringArray' enum -fromE'EnumFormStringArray :: E'EnumFormStringArray -> Text -fromE'EnumFormStringArray = \case - E'EnumFormStringArray'GreaterThan -> ">" - E'EnumFormStringArray'Dollar -> "$" - --- | parse 'E'EnumFormStringArray' enum -toE'EnumFormStringArray :: Text -> P.Either String E'EnumFormStringArray -toE'EnumFormStringArray = \case - ">" -> P.Right E'EnumFormStringArray'GreaterThan - "$" -> P.Right E'EnumFormStringArray'Dollar - s -> P.Left $ "toE'EnumFormStringArray: enum parse failure: " P.++ P.show s - - --- ** E'EnumInteger - --- | Enum of 'Int' -data E'EnumInteger - = E'EnumInteger'Num1 -- ^ @1@ - | E'EnumInteger'NumMinus_1 -- ^ @-1@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +-- ** E'EnumFormStringArray + +-- | Enum of 'Text' +data E'EnumFormStringArray + = E'EnumFormStringArray'GreaterThan -- ^ @">"@ + | E'EnumFormStringArray'Dollar -- ^ @"$"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'EnumFormStringArray where toJSON = A.toJSON . fromE'EnumFormStringArray +instance A.FromJSON E'EnumFormStringArray where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumFormStringArray =<< A.parseJSON o +instance WH.ToHttpApiData E'EnumFormStringArray where toQueryParam = WH.toQueryParam . fromE'EnumFormStringArray +instance WH.FromHttpApiData E'EnumFormStringArray where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumFormStringArray +instance MimeRender MimeMultipartFormData E'EnumFormStringArray where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'EnumFormStringArray' enum +fromE'EnumFormStringArray :: E'EnumFormStringArray -> Text +fromE'EnumFormStringArray = \case + E'EnumFormStringArray'GreaterThan -> ">" + E'EnumFormStringArray'Dollar -> "$" + +-- | parse 'E'EnumFormStringArray' enum +toE'EnumFormStringArray :: Text -> P.Either String E'EnumFormStringArray +toE'EnumFormStringArray = \case + ">" -> P.Right E'EnumFormStringArray'GreaterThan + "$" -> P.Right E'EnumFormStringArray'Dollar + s -> P.Left $ "toE'EnumFormStringArray: enum parse failure: " P.++ P.show s -instance A.ToJSON E'EnumInteger where toJSON = A.toJSON . fromE'EnumInteger -instance A.FromJSON E'EnumInteger where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumInteger =<< A.parseJSON o -instance WH.ToHttpApiData E'EnumInteger where toQueryParam = WH.toQueryParam . fromE'EnumInteger -instance WH.FromHttpApiData E'EnumInteger where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumInteger -instance MimeRender MimeMultipartFormData E'EnumInteger where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'EnumInteger' enum -fromE'EnumInteger :: E'EnumInteger -> Int -fromE'EnumInteger = \case - E'EnumInteger'Num1 -> 1 - E'EnumInteger'NumMinus_1 -> -1 - --- | parse 'E'EnumInteger' enum -toE'EnumInteger :: Int -> P.Either String E'EnumInteger -toE'EnumInteger = \case - 1 -> P.Right E'EnumInteger'Num1 - -1 -> P.Right E'EnumInteger'NumMinus_1 - s -> P.Left $ "toE'EnumInteger: enum parse failure: " P.++ P.show s - - --- ** E'EnumNumber - --- | Enum of 'Double' -data E'EnumNumber - = E'EnumNumber'Num1_Dot_1 -- ^ @1.1@ - | E'EnumNumber'NumMinus_1_Dot_2 -- ^ @-1.2@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +-- ** E'EnumInteger + +-- | Enum of 'Int' +data E'EnumInteger + = E'EnumInteger'Num1 -- ^ @1@ + | E'EnumInteger'NumMinus_1 -- ^ @-1@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'EnumInteger where toJSON = A.toJSON . fromE'EnumInteger +instance A.FromJSON E'EnumInteger where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumInteger =<< A.parseJSON o +instance WH.ToHttpApiData E'EnumInteger where toQueryParam = WH.toQueryParam . fromE'EnumInteger +instance WH.FromHttpApiData E'EnumInteger where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumInteger +instance MimeRender MimeMultipartFormData E'EnumInteger where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'EnumInteger' enum +fromE'EnumInteger :: E'EnumInteger -> Int +fromE'EnumInteger = \case + E'EnumInteger'Num1 -> 1 + E'EnumInteger'NumMinus_1 -> -1 + +-- | parse 'E'EnumInteger' enum +toE'EnumInteger :: Int -> P.Either String E'EnumInteger +toE'EnumInteger = \case + 1 -> P.Right E'EnumInteger'Num1 + -1 -> P.Right E'EnumInteger'NumMinus_1 + s -> P.Left $ "toE'EnumInteger: enum parse failure: " P.++ P.show s -instance A.ToJSON E'EnumNumber where toJSON = A.toJSON . fromE'EnumNumber -instance A.FromJSON E'EnumNumber where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumNumber =<< A.parseJSON o -instance WH.ToHttpApiData E'EnumNumber where toQueryParam = WH.toQueryParam . fromE'EnumNumber -instance WH.FromHttpApiData E'EnumNumber where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumNumber -instance MimeRender MimeMultipartFormData E'EnumNumber where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'EnumNumber' enum -fromE'EnumNumber :: E'EnumNumber -> Double -fromE'EnumNumber = \case - E'EnumNumber'Num1_Dot_1 -> 1.1 - E'EnumNumber'NumMinus_1_Dot_2 -> -1.2 - --- | parse 'E'EnumNumber' enum -toE'EnumNumber :: Double -> P.Either String E'EnumNumber -toE'EnumNumber = \case - 1.1 -> P.Right E'EnumNumber'Num1_Dot_1 - -1.2 -> P.Right E'EnumNumber'NumMinus_1_Dot_2 - s -> P.Left $ "toE'EnumNumber: enum parse failure: " P.++ P.show s - - --- ** E'EnumQueryInteger - --- | Enum of 'Int' -data E'EnumQueryInteger - = E'EnumQueryInteger'Num1 -- ^ @1@ - | E'EnumQueryInteger'NumMinus_2 -- ^ @-2@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +-- ** E'EnumNumber + +-- | Enum of 'Double' +data E'EnumNumber + = E'EnumNumber'Num1_Dot_1 -- ^ @1.1@ + | E'EnumNumber'NumMinus_1_Dot_2 -- ^ @-1.2@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'EnumNumber where toJSON = A.toJSON . fromE'EnumNumber +instance A.FromJSON E'EnumNumber where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumNumber =<< A.parseJSON o +instance WH.ToHttpApiData E'EnumNumber where toQueryParam = WH.toQueryParam . fromE'EnumNumber +instance WH.FromHttpApiData E'EnumNumber where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumNumber +instance MimeRender MimeMultipartFormData E'EnumNumber where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'EnumNumber' enum +fromE'EnumNumber :: E'EnumNumber -> Double +fromE'EnumNumber = \case + E'EnumNumber'Num1_Dot_1 -> 1.1 + E'EnumNumber'NumMinus_1_Dot_2 -> -1.2 + +-- | parse 'E'EnumNumber' enum +toE'EnumNumber :: Double -> P.Either String E'EnumNumber +toE'EnumNumber = \case + 1.1 -> P.Right E'EnumNumber'Num1_Dot_1 + -1.2 -> P.Right E'EnumNumber'NumMinus_1_Dot_2 + s -> P.Left $ "toE'EnumNumber: enum parse failure: " P.++ P.show s -instance A.ToJSON E'EnumQueryInteger where toJSON = A.toJSON . fromE'EnumQueryInteger -instance A.FromJSON E'EnumQueryInteger where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumQueryInteger =<< A.parseJSON o -instance WH.ToHttpApiData E'EnumQueryInteger where toQueryParam = WH.toQueryParam . fromE'EnumQueryInteger -instance WH.FromHttpApiData E'EnumQueryInteger where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumQueryInteger -instance MimeRender MimeMultipartFormData E'EnumQueryInteger where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'EnumQueryInteger' enum -fromE'EnumQueryInteger :: E'EnumQueryInteger -> Int -fromE'EnumQueryInteger = \case - E'EnumQueryInteger'Num1 -> 1 - E'EnumQueryInteger'NumMinus_2 -> -2 - --- | parse 'E'EnumQueryInteger' enum -toE'EnumQueryInteger :: Int -> P.Either String E'EnumQueryInteger -toE'EnumQueryInteger = \case - 1 -> P.Right E'EnumQueryInteger'Num1 - -2 -> P.Right E'EnumQueryInteger'NumMinus_2 - s -> P.Left $ "toE'EnumQueryInteger: enum parse failure: " P.++ P.show s - - --- ** E'EnumString - --- | Enum of 'Text' -data E'EnumString - = E'EnumString'UPPER -- ^ @"UPPER"@ - | E'EnumString'Lower -- ^ @"lower"@ - | E'EnumString'Empty -- ^ @""@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +-- ** E'EnumQueryInteger + +-- | Enum of 'Int' +data E'EnumQueryInteger + = E'EnumQueryInteger'Num1 -- ^ @1@ + | E'EnumQueryInteger'NumMinus_2 -- ^ @-2@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'EnumQueryInteger where toJSON = A.toJSON . fromE'EnumQueryInteger +instance A.FromJSON E'EnumQueryInteger where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumQueryInteger =<< A.parseJSON o +instance WH.ToHttpApiData E'EnumQueryInteger where toQueryParam = WH.toQueryParam . fromE'EnumQueryInteger +instance WH.FromHttpApiData E'EnumQueryInteger where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumQueryInteger +instance MimeRender MimeMultipartFormData E'EnumQueryInteger where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'EnumQueryInteger' enum +fromE'EnumQueryInteger :: E'EnumQueryInteger -> Int +fromE'EnumQueryInteger = \case + E'EnumQueryInteger'Num1 -> 1 + E'EnumQueryInteger'NumMinus_2 -> -2 + +-- | parse 'E'EnumQueryInteger' enum +toE'EnumQueryInteger :: Int -> P.Either String E'EnumQueryInteger +toE'EnumQueryInteger = \case + 1 -> P.Right E'EnumQueryInteger'Num1 + -2 -> P.Right E'EnumQueryInteger'NumMinus_2 + s -> P.Left $ "toE'EnumQueryInteger: enum parse failure: " P.++ P.show s + -instance A.ToJSON E'EnumString where toJSON = A.toJSON . fromE'EnumString -instance A.FromJSON E'EnumString where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumString =<< A.parseJSON o -instance WH.ToHttpApiData E'EnumString where toQueryParam = WH.toQueryParam . fromE'EnumString -instance WH.FromHttpApiData E'EnumString where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumString -instance MimeRender MimeMultipartFormData E'EnumString where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'EnumString' enum -fromE'EnumString :: E'EnumString -> Text -fromE'EnumString = \case - E'EnumString'UPPER -> "UPPER" - E'EnumString'Lower -> "lower" - E'EnumString'Empty -> "" - --- | parse 'E'EnumString' enum -toE'EnumString :: Text -> P.Either String E'EnumString -toE'EnumString = \case - "UPPER" -> P.Right E'EnumString'UPPER - "lower" -> P.Right E'EnumString'Lower - "" -> P.Right E'EnumString'Empty - s -> P.Left $ "toE'EnumString: enum parse failure: " P.++ P.show s - +-- ** E'EnumString + +-- | Enum of 'Text' +data E'EnumString + = E'EnumString'UPPER -- ^ @"UPPER"@ + | E'EnumString'Lower -- ^ @"lower"@ + | E'EnumString'Empty -- ^ @""@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'EnumString where toJSON = A.toJSON . fromE'EnumString +instance A.FromJSON E'EnumString where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumString =<< A.parseJSON o +instance WH.ToHttpApiData E'EnumString where toQueryParam = WH.toQueryParam . fromE'EnumString +instance WH.FromHttpApiData E'EnumString where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumString +instance MimeRender MimeMultipartFormData E'EnumString where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'EnumString' enum +fromE'EnumString :: E'EnumString -> Text +fromE'EnumString = \case + E'EnumString'UPPER -> "UPPER" + E'EnumString'Lower -> "lower" + E'EnumString'Empty -> "" --- ** E'Inner - --- | Enum of 'Text' -data E'Inner - = E'Inner'UPPER -- ^ @"UPPER"@ - | E'Inner'Lower -- ^ @"lower"@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) +-- | parse 'E'EnumString' enum +toE'EnumString :: Text -> P.Either String E'EnumString +toE'EnumString = \case + "UPPER" -> P.Right E'EnumString'UPPER + "lower" -> P.Right E'EnumString'Lower + "" -> P.Right E'EnumString'Empty + s -> P.Left $ "toE'EnumString: enum parse failure: " P.++ P.show s -instance A.ToJSON E'Inner where toJSON = A.toJSON . fromE'Inner -instance A.FromJSON E'Inner where parseJSON o = P.either P.fail (pure . P.id) . toE'Inner =<< A.parseJSON o -instance WH.ToHttpApiData E'Inner where toQueryParam = WH.toQueryParam . fromE'Inner -instance WH.FromHttpApiData E'Inner where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Inner -instance MimeRender MimeMultipartFormData E'Inner where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'Inner' enum -fromE'Inner :: E'Inner -> Text -fromE'Inner = \case - E'Inner'UPPER -> "UPPER" - E'Inner'Lower -> "lower" - --- | parse 'E'Inner' enum -toE'Inner :: Text -> P.Either String E'Inner -toE'Inner = \case - "UPPER" -> P.Right E'Inner'UPPER - "lower" -> P.Right E'Inner'Lower - s -> P.Left $ "toE'Inner: enum parse failure: " P.++ P.show s - - --- ** E'JustSymbol - --- | Enum of 'Text' -data E'JustSymbol - = E'JustSymbol'Greater_Than_Or_Equal_To -- ^ @">="@ - | E'JustSymbol'Dollar -- ^ @"$"@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +-- ** E'Inner + +-- | Enum of 'Text' +data E'Inner + = E'Inner'UPPER -- ^ @"UPPER"@ + | E'Inner'Lower -- ^ @"lower"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Inner where toJSON = A.toJSON . fromE'Inner +instance A.FromJSON E'Inner where parseJSON o = P.either P.fail (pure . P.id) . toE'Inner =<< A.parseJSON o +instance WH.ToHttpApiData E'Inner where toQueryParam = WH.toQueryParam . fromE'Inner +instance WH.FromHttpApiData E'Inner where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Inner +instance MimeRender MimeMultipartFormData E'Inner where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Inner' enum +fromE'Inner :: E'Inner -> Text +fromE'Inner = \case + E'Inner'UPPER -> "UPPER" + E'Inner'Lower -> "lower" + +-- | parse 'E'Inner' enum +toE'Inner :: Text -> P.Either String E'Inner +toE'Inner = \case + "UPPER" -> P.Right E'Inner'UPPER + "lower" -> P.Right E'Inner'Lower + s -> P.Left $ "toE'Inner: enum parse failure: " P.++ P.show s -instance A.ToJSON E'JustSymbol where toJSON = A.toJSON . fromE'JustSymbol -instance A.FromJSON E'JustSymbol where parseJSON o = P.either P.fail (pure . P.id) . toE'JustSymbol =<< A.parseJSON o -instance WH.ToHttpApiData E'JustSymbol where toQueryParam = WH.toQueryParam . fromE'JustSymbol -instance WH.FromHttpApiData E'JustSymbol where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'JustSymbol -instance MimeRender MimeMultipartFormData E'JustSymbol where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'JustSymbol' enum -fromE'JustSymbol :: E'JustSymbol -> Text -fromE'JustSymbol = \case - E'JustSymbol'Greater_Than_Or_Equal_To -> ">=" - E'JustSymbol'Dollar -> "$" - --- | parse 'E'JustSymbol' enum -toE'JustSymbol :: Text -> P.Either String E'JustSymbol -toE'JustSymbol = \case - ">=" -> P.Right E'JustSymbol'Greater_Than_Or_Equal_To - "$" -> P.Right E'JustSymbol'Dollar - s -> P.Left $ "toE'JustSymbol: enum parse failure: " P.++ P.show s - - --- ** E'Status - --- | Enum of 'Text' . --- Order Status -data E'Status - = E'Status'Placed -- ^ @"placed"@ - | E'Status'Approved -- ^ @"approved"@ - | E'Status'Delivered -- ^ @"delivered"@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) - -instance A.ToJSON E'Status where toJSON = A.toJSON . fromE'Status -instance A.FromJSON E'Status where parseJSON o = P.either P.fail (pure . P.id) . toE'Status =<< A.parseJSON o -instance WH.ToHttpApiData E'Status where toQueryParam = WH.toQueryParam . fromE'Status -instance WH.FromHttpApiData E'Status where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Status -instance MimeRender MimeMultipartFormData E'Status where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'Status' enum -fromE'Status :: E'Status -> Text -fromE'Status = \case - E'Status'Placed -> "placed" - E'Status'Approved -> "approved" - E'Status'Delivered -> "delivered" - --- | parse 'E'Status' enum -toE'Status :: Text -> P.Either String E'Status -toE'Status = \case - "placed" -> P.Right E'Status'Placed - "approved" -> P.Right E'Status'Approved - "delivered" -> P.Right E'Status'Delivered - s -> P.Left $ "toE'Status: enum parse failure: " P.++ P.show s - + +-- ** E'JustSymbol + +-- | Enum of 'Text' +data E'JustSymbol + = E'JustSymbol'Greater_Than_Or_Equal_To -- ^ @">="@ + | E'JustSymbol'Dollar -- ^ @"$"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'JustSymbol where toJSON = A.toJSON . fromE'JustSymbol +instance A.FromJSON E'JustSymbol where parseJSON o = P.either P.fail (pure . P.id) . toE'JustSymbol =<< A.parseJSON o +instance WH.ToHttpApiData E'JustSymbol where toQueryParam = WH.toQueryParam . fromE'JustSymbol +instance WH.FromHttpApiData E'JustSymbol where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'JustSymbol +instance MimeRender MimeMultipartFormData E'JustSymbol where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'JustSymbol' enum +fromE'JustSymbol :: E'JustSymbol -> Text +fromE'JustSymbol = \case + E'JustSymbol'Greater_Than_Or_Equal_To -> ">=" + E'JustSymbol'Dollar -> "$" + +-- | parse 'E'JustSymbol' enum +toE'JustSymbol :: Text -> P.Either String E'JustSymbol +toE'JustSymbol = \case + ">=" -> P.Right E'JustSymbol'Greater_Than_Or_Equal_To + "$" -> P.Right E'JustSymbol'Dollar + s -> P.Left $ "toE'JustSymbol: enum parse failure: " P.++ P.show s + + +-- ** E'Status + +-- | Enum of 'Text' . +-- Order Status +data E'Status + = E'Status'Placed -- ^ @"placed"@ + | E'Status'Approved -- ^ @"approved"@ + | E'Status'Delivered -- ^ @"delivered"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Status where toJSON = A.toJSON . fromE'Status +instance A.FromJSON E'Status where parseJSON o = P.either P.fail (pure . P.id) . toE'Status =<< A.parseJSON o +instance WH.ToHttpApiData E'Status where toQueryParam = WH.toQueryParam . fromE'Status +instance WH.FromHttpApiData E'Status where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Status +instance MimeRender MimeMultipartFormData E'Status where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Status' enum +fromE'Status :: E'Status -> Text +fromE'Status = \case + E'Status'Placed -> "placed" + E'Status'Approved -> "approved" + E'Status'Delivered -> "delivered" --- ** E'Status2 - --- | Enum of 'Text' . --- pet status in the store -data E'Status2 - = E'Status2'Available -- ^ @"available"@ - | E'Status2'Pending -- ^ @"pending"@ - | E'Status2'Sold -- ^ @"sold"@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) - -instance A.ToJSON E'Status2 where toJSON = A.toJSON . fromE'Status2 -instance A.FromJSON E'Status2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Status2 =<< A.parseJSON o -instance WH.ToHttpApiData E'Status2 where toQueryParam = WH.toQueryParam . fromE'Status2 -instance WH.FromHttpApiData E'Status2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Status2 -instance MimeRender MimeMultipartFormData E'Status2 where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'Status2' enum -fromE'Status2 :: E'Status2 -> Text -fromE'Status2 = \case - E'Status2'Available -> "available" - E'Status2'Pending -> "pending" - E'Status2'Sold -> "sold" - --- | parse 'E'Status2' enum -toE'Status2 :: Text -> P.Either String E'Status2 -toE'Status2 = \case - "available" -> P.Right E'Status2'Available - "pending" -> P.Right E'Status2'Pending - "sold" -> P.Right E'Status2'Sold - s -> P.Left $ "toE'Status2: enum parse failure: " P.++ P.show s - +-- | parse 'E'Status' enum +toE'Status :: Text -> P.Either String E'Status +toE'Status = \case + "placed" -> P.Right E'Status'Placed + "approved" -> P.Right E'Status'Approved + "delivered" -> P.Right E'Status'Delivered + s -> P.Left $ "toE'Status: enum parse failure: " P.++ P.show s + + +-- ** E'Status2 + +-- | Enum of 'Text' . +-- pet status in the store +data E'Status2 + = E'Status2'Available -- ^ @"available"@ + | E'Status2'Pending -- ^ @"pending"@ + | E'Status2'Sold -- ^ @"sold"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Status2 where toJSON = A.toJSON . fromE'Status2 +instance A.FromJSON E'Status2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Status2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Status2 where toQueryParam = WH.toQueryParam . fromE'Status2 +instance WH.FromHttpApiData E'Status2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Status2 +instance MimeRender MimeMultipartFormData E'Status2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Status2' enum +fromE'Status2 :: E'Status2 -> Text +fromE'Status2 = \case + E'Status2'Available -> "available" + E'Status2'Pending -> "pending" + E'Status2'Sold -> "sold" --- ** EnumClass - --- | Enum of 'Text' -data EnumClass - = EnumClass'_abc -- ^ @"_abc"@ - | EnumClass'_efg -- ^ @"-efg"@ - | EnumClass'_xyz -- ^ @"(xyz)"@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) +-- | parse 'E'Status2' enum +toE'Status2 :: Text -> P.Either String E'Status2 +toE'Status2 = \case + "available" -> P.Right E'Status2'Available + "pending" -> P.Right E'Status2'Pending + "sold" -> P.Right E'Status2'Sold + s -> P.Left $ "toE'Status2: enum parse failure: " P.++ P.show s + -instance A.ToJSON EnumClass where toJSON = A.toJSON . fromEnumClass -instance A.FromJSON EnumClass where parseJSON o = P.either P.fail (pure . P.id) . toEnumClass =<< A.parseJSON o -instance WH.ToHttpApiData EnumClass where toQueryParam = WH.toQueryParam . fromEnumClass -instance WH.FromHttpApiData EnumClass where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toEnumClass -instance MimeRender MimeMultipartFormData EnumClass where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'EnumClass' enum -fromEnumClass :: EnumClass -> Text -fromEnumClass = \case - EnumClass'_abc -> "_abc" - EnumClass'_efg -> "-efg" - EnumClass'_xyz -> "(xyz)" - --- | parse 'EnumClass' enum -toEnumClass :: Text -> P.Either String EnumClass -toEnumClass = \case - "_abc" -> P.Right EnumClass'_abc - "-efg" -> P.Right EnumClass'_efg - "(xyz)" -> P.Right EnumClass'_xyz - s -> P.Left $ "toEnumClass: enum parse failure: " P.++ P.show s - +-- ** EnumClass + +-- | Enum of 'Text' +data EnumClass + = EnumClass'_abc -- ^ @"_abc"@ + | EnumClass'_efg -- ^ @"-efg"@ + | EnumClass'_xyz -- ^ @"(xyz)"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON EnumClass where toJSON = A.toJSON . fromEnumClass +instance A.FromJSON EnumClass where parseJSON o = P.either P.fail (pure . P.id) . toEnumClass =<< A.parseJSON o +instance WH.ToHttpApiData EnumClass where toQueryParam = WH.toQueryParam . fromEnumClass +instance WH.FromHttpApiData EnumClass where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toEnumClass +instance MimeRender MimeMultipartFormData EnumClass where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'EnumClass' enum +fromEnumClass :: EnumClass -> Text +fromEnumClass = \case + EnumClass'_abc -> "_abc" + EnumClass'_efg -> "-efg" + EnumClass'_xyz -> "(xyz)" --- ** OuterEnum - --- | Enum of 'Text' -data OuterEnum - = OuterEnum'Placed -- ^ @"placed"@ - | OuterEnum'Approved -- ^ @"approved"@ - | OuterEnum'Delivered -- ^ @"delivered"@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) +-- | parse 'EnumClass' enum +toEnumClass :: Text -> P.Either String EnumClass +toEnumClass = \case + "_abc" -> P.Right EnumClass'_abc + "-efg" -> P.Right EnumClass'_efg + "(xyz)" -> P.Right EnumClass'_xyz + s -> P.Left $ "toEnumClass: enum parse failure: " P.++ P.show s + -instance A.ToJSON OuterEnum where toJSON = A.toJSON . fromOuterEnum -instance A.FromJSON OuterEnum where parseJSON o = P.either P.fail (pure . P.id) . toOuterEnum =<< A.parseJSON o -instance WH.ToHttpApiData OuterEnum where toQueryParam = WH.toQueryParam . fromOuterEnum -instance WH.FromHttpApiData OuterEnum where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toOuterEnum -instance MimeRender MimeMultipartFormData OuterEnum where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'OuterEnum' enum -fromOuterEnum :: OuterEnum -> Text -fromOuterEnum = \case - OuterEnum'Placed -> "placed" - OuterEnum'Approved -> "approved" - OuterEnum'Delivered -> "delivered" - --- | parse 'OuterEnum' enum -toOuterEnum :: Text -> P.Either String OuterEnum -toOuterEnum = \case - "placed" -> P.Right OuterEnum'Placed - "approved" -> P.Right OuterEnum'Approved - "delivered" -> P.Right OuterEnum'Delivered - s -> P.Left $ "toOuterEnum: enum parse failure: " P.++ P.show s - +-- ** OuterEnum + +-- | Enum of 'Text' +data OuterEnum + = OuterEnum'Placed -- ^ @"placed"@ + | OuterEnum'Approved -- ^ @"approved"@ + | OuterEnum'Delivered -- ^ @"delivered"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON OuterEnum where toJSON = A.toJSON . fromOuterEnum +instance A.FromJSON OuterEnum where parseJSON o = P.either P.fail (pure . P.id) . toOuterEnum =<< A.parseJSON o +instance WH.ToHttpApiData OuterEnum where toQueryParam = WH.toQueryParam . fromOuterEnum +instance WH.FromHttpApiData OuterEnum where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toOuterEnum +instance MimeRender MimeMultipartFormData OuterEnum where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'OuterEnum' enum +fromOuterEnum :: OuterEnum -> Text +fromOuterEnum = \case + OuterEnum'Placed -> "placed" + OuterEnum'Approved -> "approved" + OuterEnum'Delivered -> "delivered" --- * Auth Methods - --- ** AuthApiKeyApiKey -data AuthApiKeyApiKey = - AuthApiKeyApiKey Text -- ^ secret - deriving (P.Eq, P.Show, P.Typeable) - -instance AuthMethod AuthApiKeyApiKey where - applyAuthMethod _ a@(AuthApiKeyApiKey secret) req = - P.pure $ - if (P.typeOf a `P.elem` rAuthTypes req) - then req `setHeader` toHeader ("api_key", secret) - & L.over rAuthTypesL (P.filter (/= P.typeOf a)) - else req - --- ** AuthApiKeyApiKeyQuery -data AuthApiKeyApiKeyQuery = - AuthApiKeyApiKeyQuery Text -- ^ secret - deriving (P.Eq, P.Show, P.Typeable) - -instance AuthMethod AuthApiKeyApiKeyQuery where - applyAuthMethod _ a@(AuthApiKeyApiKeyQuery secret) req = - P.pure $ - if (P.typeOf a `P.elem` rAuthTypes req) - then req `setQuery` toQuery ("api_key_query", Just secret) - & L.over rAuthTypesL (P.filter (/= P.typeOf a)) - else req - --- ** AuthBasicHttpBasicTest -data AuthBasicHttpBasicTest = - AuthBasicHttpBasicTest B.ByteString B.ByteString -- ^ username password - deriving (P.Eq, P.Show, P.Typeable) - -instance AuthMethod AuthBasicHttpBasicTest where - applyAuthMethod _ a@(AuthBasicHttpBasicTest user pw) req = - P.pure $ - if (P.typeOf a `P.elem` rAuthTypes req) - then req `setHeader` toHeader ("Authorization", T.decodeUtf8 cred) - & L.over rAuthTypesL (P.filter (/= P.typeOf a)) - else req - where cred = BC.append "Basic " (B64.encode $ BC.concat [ user, ":", pw ]) +-- | parse 'OuterEnum' enum +toOuterEnum :: Text -> P.Either String OuterEnum +toOuterEnum = \case + "placed" -> P.Right OuterEnum'Placed + "approved" -> P.Right OuterEnum'Approved + "delivered" -> P.Right OuterEnum'Delivered + s -> P.Left $ "toOuterEnum: enum parse failure: " P.++ P.show s + + +-- * Auth Methods + +-- ** AuthApiKeyApiKey +data AuthApiKeyApiKey = + AuthApiKeyApiKey Text -- ^ secret + deriving (P.Eq, P.Show, P.Typeable) + +instance AuthMethod AuthApiKeyApiKey where + applyAuthMethod _ a@(AuthApiKeyApiKey secret) req = + P.pure $ + if (P.typeOf a `P.elem` rAuthTypes req) + then req `setHeader` toHeader ("api_key", secret) + & L.over rAuthTypesL (P.filter (/= P.typeOf a)) + else req + +-- ** AuthApiKeyApiKeyQuery +data AuthApiKeyApiKeyQuery = + AuthApiKeyApiKeyQuery Text -- ^ secret + deriving (P.Eq, P.Show, P.Typeable) + +instance AuthMethod AuthApiKeyApiKeyQuery where + applyAuthMethod _ a@(AuthApiKeyApiKeyQuery secret) req = + P.pure $ + if (P.typeOf a `P.elem` rAuthTypes req) + then req `setQuery` toQuery ("api_key_query", Just secret) + & L.over rAuthTypesL (P.filter (/= P.typeOf a)) + else req + +-- ** AuthBasicHttpBasicTest +data AuthBasicHttpBasicTest = + AuthBasicHttpBasicTest B.ByteString B.ByteString -- ^ username password + deriving (P.Eq, P.Show, P.Typeable) --- ** AuthOAuthPetstoreAuth -data AuthOAuthPetstoreAuth = - AuthOAuthPetstoreAuth Text -- ^ secret - deriving (P.Eq, P.Show, P.Typeable) - -instance AuthMethod AuthOAuthPetstoreAuth where - applyAuthMethod _ a@(AuthOAuthPetstoreAuth secret) req = - P.pure $ - if (P.typeOf a `P.elem` rAuthTypes req) - then req `setHeader` toHeader ("Authorization", "Bearer " <> secret) - & L.over rAuthTypesL (P.filter (/= P.typeOf a)) - else req - +instance AuthMethod AuthBasicHttpBasicTest where + applyAuthMethod _ a@(AuthBasicHttpBasicTest user pw) req = + P.pure $ + if (P.typeOf a `P.elem` rAuthTypes req) + then req `setHeader` toHeader ("Authorization", T.decodeUtf8 cred) + & L.over rAuthTypesL (P.filter (/= P.typeOf a)) + else req + where cred = BC.append "Basic " (B64.encode $ BC.concat [ user, ":", pw ]) + +-- ** AuthOAuthPetstoreAuth +data AuthOAuthPetstoreAuth = + AuthOAuthPetstoreAuth Text -- ^ secret + deriving (P.Eq, P.Show, P.Typeable) - \ No newline at end of file +instance AuthMethod AuthOAuthPetstoreAuth where + applyAuthMethod _ a@(AuthOAuthPetstoreAuth secret) req = + P.pure $ + if (P.typeOf a `P.elem` rAuthTypes req) + then req `setHeader` toHeader ("Authorization", "Bearer " <> secret) + & L.over rAuthTypesL (P.filter (/= P.typeOf a)) + else req + + + \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.ModelLens.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.ModelLens.html index 916e54cf31..2b6ada915c 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.ModelLens.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.ModelLens.html @@ -40,7 +40,7 @@ Module : OpenAPIPetstore.Lens -- | 'additionalPropertiesAnyTypeName' Lens additionalPropertiesAnyTypeNameL :: Lens_' AdditionalPropertiesAnyType (Maybe Text) -additionalPropertiesAnyTypeNameL f AdditionalPropertiesAnyType{..} = (\additionalPropertiesAnyTypeName -> AdditionalPropertiesAnyType { additionalPropertiesAnyTypeName, ..} ) <$> f additionalPropertiesAnyTypeName +additionalPropertiesAnyTypeNameL f AdditionalPropertiesAnyType{..} = (\additionalPropertiesAnyTypeName -> AdditionalPropertiesAnyType { additionalPropertiesAnyTypeName, ..} ) <$> f additionalPropertiesAnyTypeName {-# INLINE additionalPropertiesAnyTypeNameL #-} @@ -49,7 +49,7 @@ Module : OpenAPIPetstore.Lens -- | 'additionalPropertiesArrayName' Lens additionalPropertiesArrayNameL :: Lens_' AdditionalPropertiesArray (Maybe Text) -additionalPropertiesArrayNameL f AdditionalPropertiesArray{..} = (\additionalPropertiesArrayName -> AdditionalPropertiesArray { additionalPropertiesArrayName, ..} ) <$> f additionalPropertiesArrayName +additionalPropertiesArrayNameL f AdditionalPropertiesArray{..} = (\additionalPropertiesArrayName -> AdditionalPropertiesArray { additionalPropertiesArrayName, ..} ) <$> f additionalPropertiesArrayName {-# INLINE additionalPropertiesArrayNameL #-} @@ -58,7 +58,7 @@ Module : OpenAPIPetstore.Lens -- | 'additionalPropertiesBooleanName' Lens additionalPropertiesBooleanNameL :: Lens_' AdditionalPropertiesBoolean (Maybe Text) -additionalPropertiesBooleanNameL f AdditionalPropertiesBoolean{..} = (\additionalPropertiesBooleanName -> AdditionalPropertiesBoolean { additionalPropertiesBooleanName, ..} ) <$> f additionalPropertiesBooleanName +additionalPropertiesBooleanNameL f AdditionalPropertiesBoolean{..} = (\additionalPropertiesBooleanName -> AdditionalPropertiesBoolean { additionalPropertiesBooleanName, ..} ) <$> f additionalPropertiesBooleanName {-# INLINE additionalPropertiesBooleanNameL #-} @@ -67,57 +67,57 @@ Module : OpenAPIPetstore.Lens -- | 'additionalPropertiesClassMapString' Lens additionalPropertiesClassMapStringL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String Text)) -additionalPropertiesClassMapStringL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapString -> AdditionalPropertiesClass { additionalPropertiesClassMapString, ..} ) <$> f additionalPropertiesClassMapString +additionalPropertiesClassMapStringL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapString -> AdditionalPropertiesClass { additionalPropertiesClassMapString, ..} ) <$> f additionalPropertiesClassMapString {-# INLINE additionalPropertiesClassMapStringL #-} -- | 'additionalPropertiesClassMapNumber' Lens additionalPropertiesClassMapNumberL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String Double)) -additionalPropertiesClassMapNumberL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapNumber -> AdditionalPropertiesClass { additionalPropertiesClassMapNumber, ..} ) <$> f additionalPropertiesClassMapNumber +additionalPropertiesClassMapNumberL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapNumber -> AdditionalPropertiesClass { additionalPropertiesClassMapNumber, ..} ) <$> f additionalPropertiesClassMapNumber {-# INLINE additionalPropertiesClassMapNumberL #-} -- | 'additionalPropertiesClassMapInteger' Lens additionalPropertiesClassMapIntegerL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String Int)) -additionalPropertiesClassMapIntegerL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapInteger -> AdditionalPropertiesClass { additionalPropertiesClassMapInteger, ..} ) <$> f additionalPropertiesClassMapInteger +additionalPropertiesClassMapIntegerL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapInteger -> AdditionalPropertiesClass { additionalPropertiesClassMapInteger, ..} ) <$> f additionalPropertiesClassMapInteger {-# INLINE additionalPropertiesClassMapIntegerL #-} -- | 'additionalPropertiesClassMapBoolean' Lens additionalPropertiesClassMapBooleanL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String Bool)) -additionalPropertiesClassMapBooleanL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapBoolean -> AdditionalPropertiesClass { additionalPropertiesClassMapBoolean, ..} ) <$> f additionalPropertiesClassMapBoolean +additionalPropertiesClassMapBooleanL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapBoolean -> AdditionalPropertiesClass { additionalPropertiesClassMapBoolean, ..} ) <$> f additionalPropertiesClassMapBoolean {-# INLINE additionalPropertiesClassMapBooleanL #-} -- | 'additionalPropertiesClassMapArrayInteger' Lens additionalPropertiesClassMapArrayIntegerL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String [Int])) -additionalPropertiesClassMapArrayIntegerL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapArrayInteger -> AdditionalPropertiesClass { additionalPropertiesClassMapArrayInteger, ..} ) <$> f additionalPropertiesClassMapArrayInteger +additionalPropertiesClassMapArrayIntegerL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapArrayInteger -> AdditionalPropertiesClass { additionalPropertiesClassMapArrayInteger, ..} ) <$> f additionalPropertiesClassMapArrayInteger {-# INLINE additionalPropertiesClassMapArrayIntegerL #-} -- | 'additionalPropertiesClassMapArrayAnytype' Lens additionalPropertiesClassMapArrayAnytypeL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String [A.Value])) -additionalPropertiesClassMapArrayAnytypeL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapArrayAnytype -> AdditionalPropertiesClass { additionalPropertiesClassMapArrayAnytype, ..} ) <$> f additionalPropertiesClassMapArrayAnytype +additionalPropertiesClassMapArrayAnytypeL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapArrayAnytype -> AdditionalPropertiesClass { additionalPropertiesClassMapArrayAnytype, ..} ) <$> f additionalPropertiesClassMapArrayAnytype {-# INLINE additionalPropertiesClassMapArrayAnytypeL #-} -- | 'additionalPropertiesClassMapMapString' Lens additionalPropertiesClassMapMapStringL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String (Map.Map String Text))) -additionalPropertiesClassMapMapStringL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapMapString -> AdditionalPropertiesClass { additionalPropertiesClassMapMapString, ..} ) <$> f additionalPropertiesClassMapMapString +additionalPropertiesClassMapMapStringL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapMapString -> AdditionalPropertiesClass { additionalPropertiesClassMapMapString, ..} ) <$> f additionalPropertiesClassMapMapString {-# INLINE additionalPropertiesClassMapMapStringL #-} -- | 'additionalPropertiesClassMapMapAnytype' Lens additionalPropertiesClassMapMapAnytypeL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String (Map.Map String A.Value))) -additionalPropertiesClassMapMapAnytypeL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapMapAnytype -> AdditionalPropertiesClass { additionalPropertiesClassMapMapAnytype, ..} ) <$> f additionalPropertiesClassMapMapAnytype +additionalPropertiesClassMapMapAnytypeL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapMapAnytype -> AdditionalPropertiesClass { additionalPropertiesClassMapMapAnytype, ..} ) <$> f additionalPropertiesClassMapMapAnytype {-# INLINE additionalPropertiesClassMapMapAnytypeL #-} -- | 'additionalPropertiesClassAnytype1' Lens additionalPropertiesClassAnytype1L :: Lens_' AdditionalPropertiesClass (Maybe A.Value) -additionalPropertiesClassAnytype1L f AdditionalPropertiesClass{..} = (\additionalPropertiesClassAnytype1 -> AdditionalPropertiesClass { additionalPropertiesClassAnytype1, ..} ) <$> f additionalPropertiesClassAnytype1 +additionalPropertiesClassAnytype1L f AdditionalPropertiesClass{..} = (\additionalPropertiesClassAnytype1 -> AdditionalPropertiesClass { additionalPropertiesClassAnytype1, ..} ) <$> f additionalPropertiesClassAnytype1 {-# INLINE additionalPropertiesClassAnytype1L #-} -- | 'additionalPropertiesClassAnytype2' Lens additionalPropertiesClassAnytype2L :: Lens_' AdditionalPropertiesClass (Maybe A.Value) -additionalPropertiesClassAnytype2L f AdditionalPropertiesClass{..} = (\additionalPropertiesClassAnytype2 -> AdditionalPropertiesClass { additionalPropertiesClassAnytype2, ..} ) <$> f additionalPropertiesClassAnytype2 +additionalPropertiesClassAnytype2L f AdditionalPropertiesClass{..} = (\additionalPropertiesClassAnytype2 -> AdditionalPropertiesClass { additionalPropertiesClassAnytype2, ..} ) <$> f additionalPropertiesClassAnytype2 {-# INLINE additionalPropertiesClassAnytype2L #-} -- | 'additionalPropertiesClassAnytype3' Lens additionalPropertiesClassAnytype3L :: Lens_' AdditionalPropertiesClass (Maybe A.Value) -additionalPropertiesClassAnytype3L f AdditionalPropertiesClass{..} = (\additionalPropertiesClassAnytype3 -> AdditionalPropertiesClass { additionalPropertiesClassAnytype3, ..} ) <$> f additionalPropertiesClassAnytype3 +additionalPropertiesClassAnytype3L f AdditionalPropertiesClass{..} = (\additionalPropertiesClassAnytype3 -> AdditionalPropertiesClass { additionalPropertiesClassAnytype3, ..} ) <$> f additionalPropertiesClassAnytype3 {-# INLINE additionalPropertiesClassAnytype3L #-} @@ -126,7 +126,7 @@ Module : OpenAPIPetstore.Lens -- | 'additionalPropertiesIntegerName' Lens additionalPropertiesIntegerNameL :: Lens_' AdditionalPropertiesInteger (Maybe Text) -additionalPropertiesIntegerNameL f AdditionalPropertiesInteger{..} = (\additionalPropertiesIntegerName -> AdditionalPropertiesInteger { additionalPropertiesIntegerName, ..} ) <$> f additionalPropertiesIntegerName +additionalPropertiesIntegerNameL f AdditionalPropertiesInteger{..} = (\additionalPropertiesIntegerName -> AdditionalPropertiesInteger { additionalPropertiesIntegerName, ..} ) <$> f additionalPropertiesIntegerName {-# INLINE additionalPropertiesIntegerNameL #-} @@ -135,7 +135,7 @@ Module : OpenAPIPetstore.Lens -- | 'additionalPropertiesNumberName' Lens additionalPropertiesNumberNameL :: Lens_' AdditionalPropertiesNumber (Maybe Text) -additionalPropertiesNumberNameL f AdditionalPropertiesNumber{..} = (\additionalPropertiesNumberName -> AdditionalPropertiesNumber { additionalPropertiesNumberName, ..} ) <$> f additionalPropertiesNumberName +additionalPropertiesNumberNameL f AdditionalPropertiesNumber{..} = (\additionalPropertiesNumberName -> AdditionalPropertiesNumber { additionalPropertiesNumberName, ..} ) <$> f additionalPropertiesNumberName {-# INLINE additionalPropertiesNumberNameL #-} @@ -144,7 +144,7 @@ Module : OpenAPIPetstore.Lens -- | 'additionalPropertiesObjectName' Lens additionalPropertiesObjectNameL :: Lens_' AdditionalPropertiesObject (Maybe Text) -additionalPropertiesObjectNameL f AdditionalPropertiesObject{..} = (\additionalPropertiesObjectName -> AdditionalPropertiesObject { additionalPropertiesObjectName, ..} ) <$> f additionalPropertiesObjectName +additionalPropertiesObjectNameL f AdditionalPropertiesObject{..} = (\additionalPropertiesObjectName -> AdditionalPropertiesObject { additionalPropertiesObjectName, ..} ) <$> f additionalPropertiesObjectName {-# INLINE additionalPropertiesObjectNameL #-} @@ -153,7 +153,7 @@ Module : OpenAPIPetstore.Lens -- | 'additionalPropertiesStringName' Lens additionalPropertiesStringNameL :: Lens_' AdditionalPropertiesString (Maybe Text) -additionalPropertiesStringNameL f AdditionalPropertiesString{..} = (\additionalPropertiesStringName -> AdditionalPropertiesString { additionalPropertiesStringName, ..} ) <$> f additionalPropertiesStringName +additionalPropertiesStringNameL f AdditionalPropertiesString{..} = (\additionalPropertiesStringName -> AdditionalPropertiesString { additionalPropertiesStringName, ..} ) <$> f additionalPropertiesStringName {-# INLINE additionalPropertiesStringNameL #-} @@ -162,12 +162,12 @@ Module : OpenAPIPetstore.Lens -- | 'animalClassName' Lens animalClassNameL :: Lens_' Animal (Text) -animalClassNameL f Animal{..} = (\animalClassName -> Animal { animalClassName, ..} ) <$> f animalClassName +animalClassNameL f Animal{..} = (\animalClassName -> Animal { animalClassName, ..} ) <$> f animalClassName {-# INLINE animalClassNameL #-} -- | 'animalColor' Lens animalColorL :: Lens_' Animal (Maybe Text) -animalColorL f Animal{..} = (\animalColor -> Animal { animalColor, ..} ) <$> f animalColor +animalColorL f Animal{..} = (\animalColor -> Animal { animalColor, ..} ) <$> f animalColor {-# INLINE animalColorL #-} @@ -176,17 +176,17 @@ Module : OpenAPIPetstore.Lens -- | 'apiResponseCode' Lens apiResponseCodeL :: Lens_' ApiResponse (Maybe Int) -apiResponseCodeL f ApiResponse{..} = (\apiResponseCode -> ApiResponse { apiResponseCode, ..} ) <$> f apiResponseCode +apiResponseCodeL f ApiResponse{..} = (\apiResponseCode -> ApiResponse { apiResponseCode, ..} ) <$> f apiResponseCode {-# INLINE apiResponseCodeL #-} -- | 'apiResponseType' Lens apiResponseTypeL :: Lens_' ApiResponse (Maybe Text) -apiResponseTypeL f ApiResponse{..} = (\apiResponseType -> ApiResponse { apiResponseType, ..} ) <$> f apiResponseType +apiResponseTypeL f ApiResponse{..} = (\apiResponseType -> ApiResponse { apiResponseType, ..} ) <$> f apiResponseType {-# INLINE apiResponseTypeL #-} -- | 'apiResponseMessage' Lens apiResponseMessageL :: Lens_' ApiResponse (Maybe Text) -apiResponseMessageL f ApiResponse{..} = (\apiResponseMessage -> ApiResponse { apiResponseMessage, ..} ) <$> f apiResponseMessage +apiResponseMessageL f ApiResponse{..} = (\apiResponseMessage -> ApiResponse { apiResponseMessage, ..} ) <$> f apiResponseMessage {-# INLINE apiResponseMessageL #-} @@ -195,7 +195,7 @@ Module : OpenAPIPetstore.Lens -- | 'arrayOfArrayOfNumberOnlyArrayArrayNumber' Lens arrayOfArrayOfNumberOnlyArrayArrayNumberL :: Lens_' ArrayOfArrayOfNumberOnly (Maybe [[Double]]) -arrayOfArrayOfNumberOnlyArrayArrayNumberL f ArrayOfArrayOfNumberOnly{..} = (\arrayOfArrayOfNumberOnlyArrayArrayNumber -> ArrayOfArrayOfNumberOnly { arrayOfArrayOfNumberOnlyArrayArrayNumber, ..} ) <$> f arrayOfArrayOfNumberOnlyArrayArrayNumber +arrayOfArrayOfNumberOnlyArrayArrayNumberL f ArrayOfArrayOfNumberOnly{..} = (\arrayOfArrayOfNumberOnlyArrayArrayNumber -> ArrayOfArrayOfNumberOnly { arrayOfArrayOfNumberOnlyArrayArrayNumber, ..} ) <$> f arrayOfArrayOfNumberOnlyArrayArrayNumber {-# INLINE arrayOfArrayOfNumberOnlyArrayArrayNumberL #-} @@ -204,7 +204,7 @@ Module : OpenAPIPetstore.Lens -- | 'arrayOfNumberOnlyArrayNumber' Lens arrayOfNumberOnlyArrayNumberL :: Lens_' ArrayOfNumberOnly (Maybe [Double]) -arrayOfNumberOnlyArrayNumberL f ArrayOfNumberOnly{..} = (\arrayOfNumberOnlyArrayNumber -> ArrayOfNumberOnly { arrayOfNumberOnlyArrayNumber, ..} ) <$> f arrayOfNumberOnlyArrayNumber +arrayOfNumberOnlyArrayNumberL f ArrayOfNumberOnly{..} = (\arrayOfNumberOnlyArrayNumber -> ArrayOfNumberOnly { arrayOfNumberOnlyArrayNumber, ..} ) <$> f arrayOfNumberOnlyArrayNumber {-# INLINE arrayOfNumberOnlyArrayNumberL #-} @@ -213,17 +213,17 @@ Module : OpenAPIPetstore.Lens -- | 'arrayTestArrayOfString' Lens arrayTestArrayOfStringL :: Lens_' ArrayTest (Maybe [Text]) -arrayTestArrayOfStringL f ArrayTest{..} = (\arrayTestArrayOfString -> ArrayTest { arrayTestArrayOfString, ..} ) <$> f arrayTestArrayOfString +arrayTestArrayOfStringL f ArrayTest{..} = (\arrayTestArrayOfString -> ArrayTest { arrayTestArrayOfString, ..} ) <$> f arrayTestArrayOfString {-# INLINE arrayTestArrayOfStringL #-} -- | 'arrayTestArrayArrayOfInteger' Lens arrayTestArrayArrayOfIntegerL :: Lens_' ArrayTest (Maybe [[Integer]]) -arrayTestArrayArrayOfIntegerL f ArrayTest{..} = (\arrayTestArrayArrayOfInteger -> ArrayTest { arrayTestArrayArrayOfInteger, ..} ) <$> f arrayTestArrayArrayOfInteger +arrayTestArrayArrayOfIntegerL f ArrayTest{..} = (\arrayTestArrayArrayOfInteger -> ArrayTest { arrayTestArrayArrayOfInteger, ..} ) <$> f arrayTestArrayArrayOfInteger {-# INLINE arrayTestArrayArrayOfIntegerL #-} -- | 'arrayTestArrayArrayOfModel' Lens arrayTestArrayArrayOfModelL :: Lens_' ArrayTest (Maybe [[ReadOnlyFirst]]) -arrayTestArrayArrayOfModelL f ArrayTest{..} = (\arrayTestArrayArrayOfModel -> ArrayTest { arrayTestArrayArrayOfModel, ..} ) <$> f arrayTestArrayArrayOfModel +arrayTestArrayArrayOfModelL f ArrayTest{..} = (\arrayTestArrayArrayOfModel -> ArrayTest { arrayTestArrayArrayOfModel, ..} ) <$> f arrayTestArrayArrayOfModel {-# INLINE arrayTestArrayArrayOfModelL #-} @@ -232,32 +232,32 @@ Module : OpenAPIPetstore.Lens -- | 'capitalizationSmallCamel' Lens capitalizationSmallCamelL :: Lens_' Capitalization (Maybe Text) -capitalizationSmallCamelL f Capitalization{..} = (\capitalizationSmallCamel -> Capitalization { capitalizationSmallCamel, ..} ) <$> f capitalizationSmallCamel +capitalizationSmallCamelL f Capitalization{..} = (\capitalizationSmallCamel -> Capitalization { capitalizationSmallCamel, ..} ) <$> f capitalizationSmallCamel {-# INLINE capitalizationSmallCamelL #-} -- | 'capitalizationCapitalCamel' Lens capitalizationCapitalCamelL :: Lens_' Capitalization (Maybe Text) -capitalizationCapitalCamelL f Capitalization{..} = (\capitalizationCapitalCamel -> Capitalization { capitalizationCapitalCamel, ..} ) <$> f capitalizationCapitalCamel +capitalizationCapitalCamelL f Capitalization{..} = (\capitalizationCapitalCamel -> Capitalization { capitalizationCapitalCamel, ..} ) <$> f capitalizationCapitalCamel {-# INLINE capitalizationCapitalCamelL #-} -- | 'capitalizationSmallSnake' Lens capitalizationSmallSnakeL :: Lens_' Capitalization (Maybe Text) -capitalizationSmallSnakeL f Capitalization{..} = (\capitalizationSmallSnake -> Capitalization { capitalizationSmallSnake, ..} ) <$> f capitalizationSmallSnake +capitalizationSmallSnakeL f Capitalization{..} = (\capitalizationSmallSnake -> Capitalization { capitalizationSmallSnake, ..} ) <$> f capitalizationSmallSnake {-# INLINE capitalizationSmallSnakeL #-} -- | 'capitalizationCapitalSnake' Lens capitalizationCapitalSnakeL :: Lens_' Capitalization (Maybe Text) -capitalizationCapitalSnakeL f Capitalization{..} = (\capitalizationCapitalSnake -> Capitalization { capitalizationCapitalSnake, ..} ) <$> f capitalizationCapitalSnake +capitalizationCapitalSnakeL f Capitalization{..} = (\capitalizationCapitalSnake -> Capitalization { capitalizationCapitalSnake, ..} ) <$> f capitalizationCapitalSnake {-# INLINE capitalizationCapitalSnakeL #-} -- | 'capitalizationScaEthFlowPoints' Lens capitalizationScaEthFlowPointsL :: Lens_' Capitalization (Maybe Text) -capitalizationScaEthFlowPointsL f Capitalization{..} = (\capitalizationScaEthFlowPoints -> Capitalization { capitalizationScaEthFlowPoints, ..} ) <$> f capitalizationScaEthFlowPoints +capitalizationScaEthFlowPointsL f Capitalization{..} = (\capitalizationScaEthFlowPoints -> Capitalization { capitalizationScaEthFlowPoints, ..} ) <$> f capitalizationScaEthFlowPoints {-# INLINE capitalizationScaEthFlowPointsL #-} -- | 'capitalizationAttName' Lens capitalizationAttNameL :: Lens_' Capitalization (Maybe Text) -capitalizationAttNameL f Capitalization{..} = (\capitalizationAttName -> Capitalization { capitalizationAttName, ..} ) <$> f capitalizationAttName +capitalizationAttNameL f Capitalization{..} = (\capitalizationAttName -> Capitalization { capitalizationAttName, ..} ) <$> f capitalizationAttName {-# INLINE capitalizationAttNameL #-} @@ -266,17 +266,17 @@ Module : OpenAPIPetstore.Lens -- | 'catClassName' Lens catClassNameL :: Lens_' Cat (Text) -catClassNameL f Cat{..} = (\catClassName -> Cat { catClassName, ..} ) <$> f catClassName +catClassNameL f Cat{..} = (\catClassName -> Cat { catClassName, ..} ) <$> f catClassName {-# INLINE catClassNameL #-} -- | 'catColor' Lens catColorL :: Lens_' Cat (Maybe Text) -catColorL f Cat{..} = (\catColor -> Cat { catColor, ..} ) <$> f catColor +catColorL f Cat{..} = (\catColor -> Cat { catColor, ..} ) <$> f catColor {-# INLINE catColorL #-} -- | 'catDeclawed' Lens catDeclawedL :: Lens_' Cat (Maybe Bool) -catDeclawedL f Cat{..} = (\catDeclawed -> Cat { catDeclawed, ..} ) <$> f catDeclawed +catDeclawedL f Cat{..} = (\catDeclawed -> Cat { catDeclawed, ..} ) <$> f catDeclawed {-# INLINE catDeclawedL #-} @@ -285,7 +285,7 @@ Module : OpenAPIPetstore.Lens -- | 'catAllOfDeclawed' Lens catAllOfDeclawedL :: Lens_' CatAllOf (Maybe Bool) -catAllOfDeclawedL f CatAllOf{..} = (\catAllOfDeclawed -> CatAllOf { catAllOfDeclawed, ..} ) <$> f catAllOfDeclawed +catAllOfDeclawedL f CatAllOf{..} = (\catAllOfDeclawed -> CatAllOf { catAllOfDeclawed, ..} ) <$> f catAllOfDeclawed {-# INLINE catAllOfDeclawedL #-} @@ -294,12 +294,12 @@ Module : OpenAPIPetstore.Lens -- | 'categoryId' Lens categoryIdL :: Lens_' Category (Maybe Integer) -categoryIdL f Category{..} = (\categoryId -> Category { categoryId, ..} ) <$> f categoryId +categoryIdL f Category{..} = (\categoryId -> Category { categoryId, ..} ) <$> f categoryId {-# INLINE categoryIdL #-} -- | 'categoryName' Lens categoryNameL :: Lens_' Category (Text) -categoryNameL f Category{..} = (\categoryName -> Category { categoryName, ..} ) <$> f categoryName +categoryNameL f Category{..} = (\categoryName -> Category { categoryName, ..} ) <$> f categoryName {-# INLINE categoryNameL #-} @@ -308,7 +308,7 @@ Module : OpenAPIPetstore.Lens -- | 'classModelClass' Lens classModelClassL :: Lens_' ClassModel (Maybe Text) -classModelClassL f ClassModel{..} = (\classModelClass -> ClassModel { classModelClass, ..} ) <$> f classModelClass +classModelClassL f ClassModel{..} = (\classModelClass -> ClassModel { classModelClass, ..} ) <$> f classModelClass {-# INLINE classModelClassL #-} @@ -317,7 +317,7 @@ Module : OpenAPIPetstore.Lens -- | 'clientClient' Lens clientClientL :: Lens_' Client (Maybe Text) -clientClientL f Client{..} = (\clientClient -> Client { clientClient, ..} ) <$> f clientClient +clientClientL f Client{..} = (\clientClient -> Client { clientClient, ..} ) <$> f clientClient {-# INLINE clientClientL #-} @@ -326,17 +326,17 @@ Module : OpenAPIPetstore.Lens -- | 'dogClassName' Lens dogClassNameL :: Lens_' Dog (Text) -dogClassNameL f Dog{..} = (\dogClassName -> Dog { dogClassName, ..} ) <$> f dogClassName +dogClassNameL f Dog{..} = (\dogClassName -> Dog { dogClassName, ..} ) <$> f dogClassName {-# INLINE dogClassNameL #-} -- | 'dogColor' Lens dogColorL :: Lens_' Dog (Maybe Text) -dogColorL f Dog{..} = (\dogColor -> Dog { dogColor, ..} ) <$> f dogColor +dogColorL f Dog{..} = (\dogColor -> Dog { dogColor, ..} ) <$> f dogColor {-# INLINE dogColorL #-} -- | 'dogBreed' Lens dogBreedL :: Lens_' Dog (Maybe Text) -dogBreedL f Dog{..} = (\dogBreed -> Dog { dogBreed, ..} ) <$> f dogBreed +dogBreedL f Dog{..} = (\dogBreed -> Dog { dogBreed, ..} ) <$> f dogBreed {-# INLINE dogBreedL #-} @@ -345,7 +345,7 @@ Module : OpenAPIPetstore.Lens -- | 'dogAllOfBreed' Lens dogAllOfBreedL :: Lens_' DogAllOf (Maybe Text) -dogAllOfBreedL f DogAllOf{..} = (\dogAllOfBreed -> DogAllOf { dogAllOfBreed, ..} ) <$> f dogAllOfBreed +dogAllOfBreedL f DogAllOf{..} = (\dogAllOfBreed -> DogAllOf { dogAllOfBreed, ..} ) <$> f dogAllOfBreed {-# INLINE dogAllOfBreedL #-} @@ -354,12 +354,12 @@ Module : OpenAPIPetstore.Lens -- | 'enumArraysJustSymbol' Lens enumArraysJustSymbolL :: Lens_' EnumArrays (Maybe E'JustSymbol) -enumArraysJustSymbolL f EnumArrays{..} = (\enumArraysJustSymbol -> EnumArrays { enumArraysJustSymbol, ..} ) <$> f enumArraysJustSymbol +enumArraysJustSymbolL f EnumArrays{..} = (\enumArraysJustSymbol -> EnumArrays { enumArraysJustSymbol, ..} ) <$> f enumArraysJustSymbol {-# INLINE enumArraysJustSymbolL #-} -- | 'enumArraysArrayEnum' Lens enumArraysArrayEnumL :: Lens_' EnumArrays (Maybe [E'ArrayEnum]) -enumArraysArrayEnumL f EnumArrays{..} = (\enumArraysArrayEnum -> EnumArrays { enumArraysArrayEnum, ..} ) <$> f enumArraysArrayEnum +enumArraysArrayEnumL f EnumArrays{..} = (\enumArraysArrayEnum -> EnumArrays { enumArraysArrayEnum, ..} ) <$> f enumArraysArrayEnum {-# INLINE enumArraysArrayEnumL #-} @@ -372,27 +372,27 @@ Module : OpenAPIPetstore.Lens -- | 'enumTestEnumString' Lens enumTestEnumStringL :: Lens_' EnumTest (Maybe E'EnumString) -enumTestEnumStringL f EnumTest{..} = (\enumTestEnumString -> EnumTest { enumTestEnumString, ..} ) <$> f enumTestEnumString +enumTestEnumStringL f EnumTest{..} = (\enumTestEnumString -> EnumTest { enumTestEnumString, ..} ) <$> f enumTestEnumString {-# INLINE enumTestEnumStringL #-} -- | 'enumTestEnumStringRequired' Lens enumTestEnumStringRequiredL :: Lens_' EnumTest (E'EnumString) -enumTestEnumStringRequiredL f EnumTest{..} = (\enumTestEnumStringRequired -> EnumTest { enumTestEnumStringRequired, ..} ) <$> f enumTestEnumStringRequired +enumTestEnumStringRequiredL f EnumTest{..} = (\enumTestEnumStringRequired -> EnumTest { enumTestEnumStringRequired, ..} ) <$> f enumTestEnumStringRequired {-# INLINE enumTestEnumStringRequiredL #-} -- | 'enumTestEnumInteger' Lens enumTestEnumIntegerL :: Lens_' EnumTest (Maybe E'EnumInteger) -enumTestEnumIntegerL f EnumTest{..} = (\enumTestEnumInteger -> EnumTest { enumTestEnumInteger, ..} ) <$> f enumTestEnumInteger +enumTestEnumIntegerL f EnumTest{..} = (\enumTestEnumInteger -> EnumTest { enumTestEnumInteger, ..} ) <$> f enumTestEnumInteger {-# INLINE enumTestEnumIntegerL #-} -- | 'enumTestEnumNumber' Lens enumTestEnumNumberL :: Lens_' EnumTest (Maybe E'EnumNumber) -enumTestEnumNumberL f EnumTest{..} = (\enumTestEnumNumber -> EnumTest { enumTestEnumNumber, ..} ) <$> f enumTestEnumNumber +enumTestEnumNumberL f EnumTest{..} = (\enumTestEnumNumber -> EnumTest { enumTestEnumNumber, ..} ) <$> f enumTestEnumNumber {-# INLINE enumTestEnumNumberL #-} -- | 'enumTestOuterEnum' Lens enumTestOuterEnumL :: Lens_' EnumTest (Maybe OuterEnum) -enumTestOuterEnumL f EnumTest{..} = (\enumTestOuterEnum -> EnumTest { enumTestOuterEnum, ..} ) <$> f enumTestOuterEnum +enumTestOuterEnumL f EnumTest{..} = (\enumTestOuterEnum -> EnumTest { enumTestOuterEnum, ..} ) <$> f enumTestOuterEnum {-# INLINE enumTestOuterEnumL #-} @@ -401,7 +401,7 @@ Module : OpenAPIPetstore.Lens -- | 'fileSourceUri' Lens fileSourceUriL :: Lens_' File (Maybe Text) -fileSourceUriL f File{..} = (\fileSourceUri -> File { fileSourceUri, ..} ) <$> f fileSourceUri +fileSourceUriL f File{..} = (\fileSourceUri -> File { fileSourceUri, ..} ) <$> f fileSourceUri {-# INLINE fileSourceUriL #-} @@ -410,12 +410,12 @@ Module : OpenAPIPetstore.Lens -- | 'fileSchemaTestClassFile' Lens fileSchemaTestClassFileL :: Lens_' FileSchemaTestClass (Maybe File) -fileSchemaTestClassFileL f FileSchemaTestClass{..} = (\fileSchemaTestClassFile -> FileSchemaTestClass { fileSchemaTestClassFile, ..} ) <$> f fileSchemaTestClassFile +fileSchemaTestClassFileL f FileSchemaTestClass{..} = (\fileSchemaTestClassFile -> FileSchemaTestClass { fileSchemaTestClassFile, ..} ) <$> f fileSchemaTestClassFile {-# INLINE fileSchemaTestClassFileL #-} -- | 'fileSchemaTestClassFiles' Lens fileSchemaTestClassFilesL :: Lens_' FileSchemaTestClass (Maybe [File]) -fileSchemaTestClassFilesL f FileSchemaTestClass{..} = (\fileSchemaTestClassFiles -> FileSchemaTestClass { fileSchemaTestClassFiles, ..} ) <$> f fileSchemaTestClassFiles +fileSchemaTestClassFilesL f FileSchemaTestClass{..} = (\fileSchemaTestClassFiles -> FileSchemaTestClass { fileSchemaTestClassFiles, ..} ) <$> f fileSchemaTestClassFiles {-# INLINE fileSchemaTestClassFilesL #-} @@ -424,569 +424,579 @@ Module : OpenAPIPetstore.Lens -- | 'formatTestInteger' Lens formatTestIntegerL :: Lens_' FormatTest (Maybe Int) -formatTestIntegerL f FormatTest{..} = (\formatTestInteger -> FormatTest { formatTestInteger, ..} ) <$> f formatTestInteger +formatTestIntegerL f FormatTest{..} = (\formatTestInteger -> FormatTest { formatTestInteger, ..} ) <$> f formatTestInteger {-# INLINE formatTestIntegerL #-} -- | 'formatTestInt32' Lens formatTestInt32L :: Lens_' FormatTest (Maybe Int) -formatTestInt32L f FormatTest{..} = (\formatTestInt32 -> FormatTest { formatTestInt32, ..} ) <$> f formatTestInt32 +formatTestInt32L f FormatTest{..} = (\formatTestInt32 -> FormatTest { formatTestInt32, ..} ) <$> f formatTestInt32 {-# INLINE formatTestInt32L #-} -- | 'formatTestInt64' Lens formatTestInt64L :: Lens_' FormatTest (Maybe Integer) -formatTestInt64L f FormatTest{..} = (\formatTestInt64 -> FormatTest { formatTestInt64, ..} ) <$> f formatTestInt64 +formatTestInt64L f FormatTest{..} = (\formatTestInt64 -> FormatTest { formatTestInt64, ..} ) <$> f formatTestInt64 {-# INLINE formatTestInt64L #-} -- | 'formatTestNumber' Lens formatTestNumberL :: Lens_' FormatTest (Double) -formatTestNumberL f FormatTest{..} = (\formatTestNumber -> FormatTest { formatTestNumber, ..} ) <$> f formatTestNumber +formatTestNumberL f FormatTest{..} = (\formatTestNumber -> FormatTest { formatTestNumber, ..} ) <$> f formatTestNumber {-# INLINE formatTestNumberL #-} -- | 'formatTestFloat' Lens formatTestFloatL :: Lens_' FormatTest (Maybe Float) -formatTestFloatL f FormatTest{..} = (\formatTestFloat -> FormatTest { formatTestFloat, ..} ) <$> f formatTestFloat +formatTestFloatL f FormatTest{..} = (\formatTestFloat -> FormatTest { formatTestFloat, ..} ) <$> f formatTestFloat {-# INLINE formatTestFloatL #-} -- | 'formatTestDouble' Lens formatTestDoubleL :: Lens_' FormatTest (Maybe Double) -formatTestDoubleL f FormatTest{..} = (\formatTestDouble -> FormatTest { formatTestDouble, ..} ) <$> f formatTestDouble +formatTestDoubleL f FormatTest{..} = (\formatTestDouble -> FormatTest { formatTestDouble, ..} ) <$> f formatTestDouble {-# INLINE formatTestDoubleL #-} -- | 'formatTestString' Lens formatTestStringL :: Lens_' FormatTest (Maybe Text) -formatTestStringL f FormatTest{..} = (\formatTestString -> FormatTest { formatTestString, ..} ) <$> f formatTestString +formatTestStringL f FormatTest{..} = (\formatTestString -> FormatTest { formatTestString, ..} ) <$> f formatTestString {-# INLINE formatTestStringL #-} -- | 'formatTestByte' Lens formatTestByteL :: Lens_' FormatTest (ByteArray) -formatTestByteL f FormatTest{..} = (\formatTestByte -> FormatTest { formatTestByte, ..} ) <$> f formatTestByte +formatTestByteL f FormatTest{..} = (\formatTestByte -> FormatTest { formatTestByte, ..} ) <$> f formatTestByte {-# INLINE formatTestByteL #-} -- | 'formatTestBinary' Lens formatTestBinaryL :: Lens_' FormatTest (Maybe FilePath) -formatTestBinaryL f FormatTest{..} = (\formatTestBinary -> FormatTest { formatTestBinary, ..} ) <$> f formatTestBinary +formatTestBinaryL f FormatTest{..} = (\formatTestBinary -> FormatTest { formatTestBinary, ..} ) <$> f formatTestBinary {-# INLINE formatTestBinaryL #-} -- | 'formatTestDate' Lens formatTestDateL :: Lens_' FormatTest (Date) -formatTestDateL f FormatTest{..} = (\formatTestDate -> FormatTest { formatTestDate, ..} ) <$> f formatTestDate +formatTestDateL f FormatTest{..} = (\formatTestDate -> FormatTest { formatTestDate, ..} ) <$> f formatTestDate {-# INLINE formatTestDateL #-} -- | 'formatTestDateTime' Lens formatTestDateTimeL :: Lens_' FormatTest (Maybe DateTime) -formatTestDateTimeL f FormatTest{..} = (\formatTestDateTime -> FormatTest { formatTestDateTime, ..} ) <$> f formatTestDateTime +formatTestDateTimeL f FormatTest{..} = (\formatTestDateTime -> FormatTest { formatTestDateTime, ..} ) <$> f formatTestDateTime {-# INLINE formatTestDateTimeL #-} -- | 'formatTestUuid' Lens formatTestUuidL :: Lens_' FormatTest (Maybe Text) -formatTestUuidL f FormatTest{..} = (\formatTestUuid -> FormatTest { formatTestUuid, ..} ) <$> f formatTestUuid +formatTestUuidL f FormatTest{..} = (\formatTestUuid -> FormatTest { formatTestUuid, ..} ) <$> f formatTestUuid {-# INLINE formatTestUuidL #-} -- | 'formatTestPassword' Lens formatTestPasswordL :: Lens_' FormatTest (Text) -formatTestPasswordL f FormatTest{..} = (\formatTestPassword -> FormatTest { formatTestPassword, ..} ) <$> f formatTestPassword +formatTestPasswordL f FormatTest{..} = (\formatTestPassword -> FormatTest { formatTestPassword, ..} ) <$> f formatTestPassword {-# INLINE formatTestPasswordL #-} - - --- * HasOnlyReadOnly - --- | 'hasOnlyReadOnlyBar' Lens -hasOnlyReadOnlyBarL :: Lens_' HasOnlyReadOnly (Maybe Text) -hasOnlyReadOnlyBarL f HasOnlyReadOnly{..} = (\hasOnlyReadOnlyBar -> HasOnlyReadOnly { hasOnlyReadOnlyBar, ..} ) <$> f hasOnlyReadOnlyBar -{-# INLINE hasOnlyReadOnlyBarL #-} +-- | 'formatTestBigDecimal' Lens +formatTestBigDecimalL :: Lens_' FormatTest (Maybe Double) +formatTestBigDecimalL f FormatTest{..} = (\formatTestBigDecimal -> FormatTest { formatTestBigDecimal, ..} ) <$> f formatTestBigDecimal +{-# INLINE formatTestBigDecimalL #-} + + + +-- * HasOnlyReadOnly --- | 'hasOnlyReadOnlyFoo' Lens -hasOnlyReadOnlyFooL :: Lens_' HasOnlyReadOnly (Maybe Text) -hasOnlyReadOnlyFooL f HasOnlyReadOnly{..} = (\hasOnlyReadOnlyFoo -> HasOnlyReadOnly { hasOnlyReadOnlyFoo, ..} ) <$> f hasOnlyReadOnlyFoo -{-# INLINE hasOnlyReadOnlyFooL #-} +-- | 'hasOnlyReadOnlyBar' Lens +hasOnlyReadOnlyBarL :: Lens_' HasOnlyReadOnly (Maybe Text) +hasOnlyReadOnlyBarL f HasOnlyReadOnly{..} = (\hasOnlyReadOnlyBar -> HasOnlyReadOnly { hasOnlyReadOnlyBar, ..} ) <$> f hasOnlyReadOnlyBar +{-# INLINE hasOnlyReadOnlyBarL #-} - - --- * MapTest - --- | 'mapTestMapMapOfString' Lens -mapTestMapMapOfStringL :: Lens_' MapTest (Maybe (Map.Map String (Map.Map String Text))) -mapTestMapMapOfStringL f MapTest{..} = (\mapTestMapMapOfString -> MapTest { mapTestMapMapOfString, ..} ) <$> f mapTestMapMapOfString -{-# INLINE mapTestMapMapOfStringL #-} +-- | 'hasOnlyReadOnlyFoo' Lens +hasOnlyReadOnlyFooL :: Lens_' HasOnlyReadOnly (Maybe Text) +hasOnlyReadOnlyFooL f HasOnlyReadOnly{..} = (\hasOnlyReadOnlyFoo -> HasOnlyReadOnly { hasOnlyReadOnlyFoo, ..} ) <$> f hasOnlyReadOnlyFoo +{-# INLINE hasOnlyReadOnlyFooL #-} + + + +-- * MapTest --- | 'mapTestMapOfEnumString' Lens -mapTestMapOfEnumStringL :: Lens_' MapTest (Maybe (Map.Map String E'Inner)) -mapTestMapOfEnumStringL f MapTest{..} = (\mapTestMapOfEnumString -> MapTest { mapTestMapOfEnumString, ..} ) <$> f mapTestMapOfEnumString -{-# INLINE mapTestMapOfEnumStringL #-} +-- | 'mapTestMapMapOfString' Lens +mapTestMapMapOfStringL :: Lens_' MapTest (Maybe (Map.Map String (Map.Map String Text))) +mapTestMapMapOfStringL f MapTest{..} = (\mapTestMapMapOfString -> MapTest { mapTestMapMapOfString, ..} ) <$> f mapTestMapMapOfString +{-# INLINE mapTestMapMapOfStringL #-} --- | 'mapTestDirectMap' Lens -mapTestDirectMapL :: Lens_' MapTest (Maybe (Map.Map String Bool)) -mapTestDirectMapL f MapTest{..} = (\mapTestDirectMap -> MapTest { mapTestDirectMap, ..} ) <$> f mapTestDirectMap -{-# INLINE mapTestDirectMapL #-} +-- | 'mapTestMapOfEnumString' Lens +mapTestMapOfEnumStringL :: Lens_' MapTest (Maybe (Map.Map String E'Inner)) +mapTestMapOfEnumStringL f MapTest{..} = (\mapTestMapOfEnumString -> MapTest { mapTestMapOfEnumString, ..} ) <$> f mapTestMapOfEnumString +{-# INLINE mapTestMapOfEnumStringL #-} --- | 'mapTestIndirectMap' Lens -mapTestIndirectMapL :: Lens_' MapTest (Maybe (Map.Map String Bool)) -mapTestIndirectMapL f MapTest{..} = (\mapTestIndirectMap -> MapTest { mapTestIndirectMap, ..} ) <$> f mapTestIndirectMap -{-# INLINE mapTestIndirectMapL #-} +-- | 'mapTestDirectMap' Lens +mapTestDirectMapL :: Lens_' MapTest (Maybe (Map.Map String Bool)) +mapTestDirectMapL f MapTest{..} = (\mapTestDirectMap -> MapTest { mapTestDirectMap, ..} ) <$> f mapTestDirectMap +{-# INLINE mapTestDirectMapL #-} - - --- * MixedPropertiesAndAdditionalPropertiesClass - --- | 'mixedPropertiesAndAdditionalPropertiesClassUuid' Lens -mixedPropertiesAndAdditionalPropertiesClassUuidL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe Text) -mixedPropertiesAndAdditionalPropertiesClassUuidL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassUuid -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassUuid, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassUuid -{-# INLINE mixedPropertiesAndAdditionalPropertiesClassUuidL #-} +-- | 'mapTestIndirectMap' Lens +mapTestIndirectMapL :: Lens_' MapTest (Maybe (Map.Map String Bool)) +mapTestIndirectMapL f MapTest{..} = (\mapTestIndirectMap -> MapTest { mapTestIndirectMap, ..} ) <$> f mapTestIndirectMap +{-# INLINE mapTestIndirectMapL #-} + + + +-- * MixedPropertiesAndAdditionalPropertiesClass --- | 'mixedPropertiesAndAdditionalPropertiesClassDateTime' Lens -mixedPropertiesAndAdditionalPropertiesClassDateTimeL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe DateTime) -mixedPropertiesAndAdditionalPropertiesClassDateTimeL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassDateTime -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassDateTime, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassDateTime -{-# INLINE mixedPropertiesAndAdditionalPropertiesClassDateTimeL #-} +-- | 'mixedPropertiesAndAdditionalPropertiesClassUuid' Lens +mixedPropertiesAndAdditionalPropertiesClassUuidL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe Text) +mixedPropertiesAndAdditionalPropertiesClassUuidL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassUuid -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassUuid, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassUuid +{-# INLINE mixedPropertiesAndAdditionalPropertiesClassUuidL #-} --- | 'mixedPropertiesAndAdditionalPropertiesClassMap' Lens -mixedPropertiesAndAdditionalPropertiesClassMapL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe (Map.Map String Animal)) -mixedPropertiesAndAdditionalPropertiesClassMapL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassMap -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassMap, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassMap -{-# INLINE mixedPropertiesAndAdditionalPropertiesClassMapL #-} +-- | 'mixedPropertiesAndAdditionalPropertiesClassDateTime' Lens +mixedPropertiesAndAdditionalPropertiesClassDateTimeL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe DateTime) +mixedPropertiesAndAdditionalPropertiesClassDateTimeL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassDateTime -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassDateTime, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassDateTime +{-# INLINE mixedPropertiesAndAdditionalPropertiesClassDateTimeL #-} - - --- * Model200Response - --- | 'model200ResponseName' Lens -model200ResponseNameL :: Lens_' Model200Response (Maybe Int) -model200ResponseNameL f Model200Response{..} = (\model200ResponseName -> Model200Response { model200ResponseName, ..} ) <$> f model200ResponseName -{-# INLINE model200ResponseNameL #-} +-- | 'mixedPropertiesAndAdditionalPropertiesClassMap' Lens +mixedPropertiesAndAdditionalPropertiesClassMapL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe (Map.Map String Animal)) +mixedPropertiesAndAdditionalPropertiesClassMapL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassMap -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassMap, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassMap +{-# INLINE mixedPropertiesAndAdditionalPropertiesClassMapL #-} + + + +-- * Model200Response --- | 'model200ResponseClass' Lens -model200ResponseClassL :: Lens_' Model200Response (Maybe Text) -model200ResponseClassL f Model200Response{..} = (\model200ResponseClass -> Model200Response { model200ResponseClass, ..} ) <$> f model200ResponseClass -{-# INLINE model200ResponseClassL #-} +-- | 'model200ResponseName' Lens +model200ResponseNameL :: Lens_' Model200Response (Maybe Int) +model200ResponseNameL f Model200Response{..} = (\model200ResponseName -> Model200Response { model200ResponseName, ..} ) <$> f model200ResponseName +{-# INLINE model200ResponseNameL #-} - - --- * ModelList - --- | 'modelList123list' Lens -modelList123listL :: Lens_' ModelList (Maybe Text) -modelList123listL f ModelList{..} = (\modelList123list -> ModelList { modelList123list, ..} ) <$> f modelList123list -{-# INLINE modelList123listL #-} +-- | 'model200ResponseClass' Lens +model200ResponseClassL :: Lens_' Model200Response (Maybe Text) +model200ResponseClassL f Model200Response{..} = (\model200ResponseClass -> Model200Response { model200ResponseClass, ..} ) <$> f model200ResponseClass +{-# INLINE model200ResponseClassL #-} + + + +-- * ModelList - - --- * ModelReturn - --- | 'modelReturnReturn' Lens -modelReturnReturnL :: Lens_' ModelReturn (Maybe Int) -modelReturnReturnL f ModelReturn{..} = (\modelReturnReturn -> ModelReturn { modelReturnReturn, ..} ) <$> f modelReturnReturn -{-# INLINE modelReturnReturnL #-} +-- | 'modelList123list' Lens +modelList123listL :: Lens_' ModelList (Maybe Text) +modelList123listL f ModelList{..} = (\modelList123list -> ModelList { modelList123list, ..} ) <$> f modelList123list +{-# INLINE modelList123listL #-} + + + +-- * ModelReturn - - --- * Name - --- | 'nameName' Lens -nameNameL :: Lens_' Name (Int) -nameNameL f Name{..} = (\nameName -> Name { nameName, ..} ) <$> f nameName -{-# INLINE nameNameL #-} +-- | 'modelReturnReturn' Lens +modelReturnReturnL :: Lens_' ModelReturn (Maybe Int) +modelReturnReturnL f ModelReturn{..} = (\modelReturnReturn -> ModelReturn { modelReturnReturn, ..} ) <$> f modelReturnReturn +{-# INLINE modelReturnReturnL #-} + + + +-- * Name --- | 'nameSnakeCase' Lens -nameSnakeCaseL :: Lens_' Name (Maybe Int) -nameSnakeCaseL f Name{..} = (\nameSnakeCase -> Name { nameSnakeCase, ..} ) <$> f nameSnakeCase -{-# INLINE nameSnakeCaseL #-} +-- | 'nameName' Lens +nameNameL :: Lens_' Name (Int) +nameNameL f Name{..} = (\nameName -> Name { nameName, ..} ) <$> f nameName +{-# INLINE nameNameL #-} --- | 'nameProperty' Lens -namePropertyL :: Lens_' Name (Maybe Text) -namePropertyL f Name{..} = (\nameProperty -> Name { nameProperty, ..} ) <$> f nameProperty -{-# INLINE namePropertyL #-} +-- | 'nameSnakeCase' Lens +nameSnakeCaseL :: Lens_' Name (Maybe Int) +nameSnakeCaseL f Name{..} = (\nameSnakeCase -> Name { nameSnakeCase, ..} ) <$> f nameSnakeCase +{-# INLINE nameSnakeCaseL #-} --- | 'name123number' Lens -name123numberL :: Lens_' Name (Maybe Int) -name123numberL f Name{..} = (\name123number -> Name { name123number, ..} ) <$> f name123number -{-# INLINE name123numberL #-} +-- | 'nameProperty' Lens +namePropertyL :: Lens_' Name (Maybe Text) +namePropertyL f Name{..} = (\nameProperty -> Name { nameProperty, ..} ) <$> f nameProperty +{-# INLINE namePropertyL #-} - - --- * NumberOnly - --- | 'numberOnlyJustNumber' Lens -numberOnlyJustNumberL :: Lens_' NumberOnly (Maybe Double) -numberOnlyJustNumberL f NumberOnly{..} = (\numberOnlyJustNumber -> NumberOnly { numberOnlyJustNumber, ..} ) <$> f numberOnlyJustNumber -{-# INLINE numberOnlyJustNumberL #-} +-- | 'name123number' Lens +name123numberL :: Lens_' Name (Maybe Int) +name123numberL f Name{..} = (\name123number -> Name { name123number, ..} ) <$> f name123number +{-# INLINE name123numberL #-} + + + +-- * NumberOnly - - --- * Order - --- | 'orderId' Lens -orderIdL :: Lens_' Order (Maybe Integer) -orderIdL f Order{..} = (\orderId -> Order { orderId, ..} ) <$> f orderId -{-# INLINE orderIdL #-} +-- | 'numberOnlyJustNumber' Lens +numberOnlyJustNumberL :: Lens_' NumberOnly (Maybe Double) +numberOnlyJustNumberL f NumberOnly{..} = (\numberOnlyJustNumber -> NumberOnly { numberOnlyJustNumber, ..} ) <$> f numberOnlyJustNumber +{-# INLINE numberOnlyJustNumberL #-} + + + +-- * Order --- | 'orderPetId' Lens -orderPetIdL :: Lens_' Order (Maybe Integer) -orderPetIdL f Order{..} = (\orderPetId -> Order { orderPetId, ..} ) <$> f orderPetId -{-# INLINE orderPetIdL #-} +-- | 'orderId' Lens +orderIdL :: Lens_' Order (Maybe Integer) +orderIdL f Order{..} = (\orderId -> Order { orderId, ..} ) <$> f orderId +{-# INLINE orderIdL #-} --- | 'orderQuantity' Lens -orderQuantityL :: Lens_' Order (Maybe Int) -orderQuantityL f Order{..} = (\orderQuantity -> Order { orderQuantity, ..} ) <$> f orderQuantity -{-# INLINE orderQuantityL #-} +-- | 'orderPetId' Lens +orderPetIdL :: Lens_' Order (Maybe Integer) +orderPetIdL f Order{..} = (\orderPetId -> Order { orderPetId, ..} ) <$> f orderPetId +{-# INLINE orderPetIdL #-} --- | 'orderShipDate' Lens -orderShipDateL :: Lens_' Order (Maybe DateTime) -orderShipDateL f Order{..} = (\orderShipDate -> Order { orderShipDate, ..} ) <$> f orderShipDate -{-# INLINE orderShipDateL #-} +-- | 'orderQuantity' Lens +orderQuantityL :: Lens_' Order (Maybe Int) +orderQuantityL f Order{..} = (\orderQuantity -> Order { orderQuantity, ..} ) <$> f orderQuantity +{-# INLINE orderQuantityL #-} --- | 'orderStatus' Lens -orderStatusL :: Lens_' Order (Maybe E'Status) -orderStatusL f Order{..} = (\orderStatus -> Order { orderStatus, ..} ) <$> f orderStatus -{-# INLINE orderStatusL #-} +-- | 'orderShipDate' Lens +orderShipDateL :: Lens_' Order (Maybe DateTime) +orderShipDateL f Order{..} = (\orderShipDate -> Order { orderShipDate, ..} ) <$> f orderShipDate +{-# INLINE orderShipDateL #-} --- | 'orderComplete' Lens -orderCompleteL :: Lens_' Order (Maybe Bool) -orderCompleteL f Order{..} = (\orderComplete -> Order { orderComplete, ..} ) <$> f orderComplete -{-# INLINE orderCompleteL #-} +-- | 'orderStatus' Lens +orderStatusL :: Lens_' Order (Maybe E'Status) +orderStatusL f Order{..} = (\orderStatus -> Order { orderStatus, ..} ) <$> f orderStatus +{-# INLINE orderStatusL #-} - - --- * OuterComposite - --- | 'outerCompositeMyNumber' Lens -outerCompositeMyNumberL :: Lens_' OuterComposite (Maybe Double) -outerCompositeMyNumberL f OuterComposite{..} = (\outerCompositeMyNumber -> OuterComposite { outerCompositeMyNumber, ..} ) <$> f outerCompositeMyNumber -{-# INLINE outerCompositeMyNumberL #-} +-- | 'orderComplete' Lens +orderCompleteL :: Lens_' Order (Maybe Bool) +orderCompleteL f Order{..} = (\orderComplete -> Order { orderComplete, ..} ) <$> f orderComplete +{-# INLINE orderCompleteL #-} + + + +-- * OuterComposite --- | 'outerCompositeMyString' Lens -outerCompositeMyStringL :: Lens_' OuterComposite (Maybe Text) -outerCompositeMyStringL f OuterComposite{..} = (\outerCompositeMyString -> OuterComposite { outerCompositeMyString, ..} ) <$> f outerCompositeMyString -{-# INLINE outerCompositeMyStringL #-} +-- | 'outerCompositeMyNumber' Lens +outerCompositeMyNumberL :: Lens_' OuterComposite (Maybe Double) +outerCompositeMyNumberL f OuterComposite{..} = (\outerCompositeMyNumber -> OuterComposite { outerCompositeMyNumber, ..} ) <$> f outerCompositeMyNumber +{-# INLINE outerCompositeMyNumberL #-} --- | 'outerCompositeMyBoolean' Lens -outerCompositeMyBooleanL :: Lens_' OuterComposite (Maybe Bool) -outerCompositeMyBooleanL f OuterComposite{..} = (\outerCompositeMyBoolean -> OuterComposite { outerCompositeMyBoolean, ..} ) <$> f outerCompositeMyBoolean -{-# INLINE outerCompositeMyBooleanL #-} +-- | 'outerCompositeMyString' Lens +outerCompositeMyStringL :: Lens_' OuterComposite (Maybe Text) +outerCompositeMyStringL f OuterComposite{..} = (\outerCompositeMyString -> OuterComposite { outerCompositeMyString, ..} ) <$> f outerCompositeMyString +{-# INLINE outerCompositeMyStringL #-} - - --- * OuterEnum - +-- | 'outerCompositeMyBoolean' Lens +outerCompositeMyBooleanL :: Lens_' OuterComposite (Maybe Bool) +outerCompositeMyBooleanL f OuterComposite{..} = (\outerCompositeMyBoolean -> OuterComposite { outerCompositeMyBoolean, ..} ) <$> f outerCompositeMyBoolean +{-# INLINE outerCompositeMyBooleanL #-} --- * Pet - --- | 'petId' Lens -petIdL :: Lens_' Pet (Maybe Integer) -petIdL f Pet{..} = (\petId -> Pet { petId, ..} ) <$> f petId -{-# INLINE petIdL #-} + +-- * OuterEnum + + + +-- * Pet --- | 'petCategory' Lens -petCategoryL :: Lens_' Pet (Maybe Category) -petCategoryL f Pet{..} = (\petCategory -> Pet { petCategory, ..} ) <$> f petCategory -{-# INLINE petCategoryL #-} +-- | 'petId' Lens +petIdL :: Lens_' Pet (Maybe Integer) +petIdL f Pet{..} = (\petId -> Pet { petId, ..} ) <$> f petId +{-# INLINE petIdL #-} --- | 'petName' Lens -petNameL :: Lens_' Pet (Text) -petNameL f Pet{..} = (\petName -> Pet { petName, ..} ) <$> f petName -{-# INLINE petNameL #-} +-- | 'petCategory' Lens +petCategoryL :: Lens_' Pet (Maybe Category) +petCategoryL f Pet{..} = (\petCategory -> Pet { petCategory, ..} ) <$> f petCategory +{-# INLINE petCategoryL #-} --- | 'petPhotoUrls' Lens -petPhotoUrlsL :: Lens_' Pet ([Text]) -petPhotoUrlsL f Pet{..} = (\petPhotoUrls -> Pet { petPhotoUrls, ..} ) <$> f petPhotoUrls -{-# INLINE petPhotoUrlsL #-} +-- | 'petName' Lens +petNameL :: Lens_' Pet (Text) +petNameL f Pet{..} = (\petName -> Pet { petName, ..} ) <$> f petName +{-# INLINE petNameL #-} --- | 'petTags' Lens -petTagsL :: Lens_' Pet (Maybe [Tag]) -petTagsL f Pet{..} = (\petTags -> Pet { petTags, ..} ) <$> f petTags -{-# INLINE petTagsL #-} +-- | 'petPhotoUrls' Lens +petPhotoUrlsL :: Lens_' Pet ([Text]) +petPhotoUrlsL f Pet{..} = (\petPhotoUrls -> Pet { petPhotoUrls, ..} ) <$> f petPhotoUrls +{-# INLINE petPhotoUrlsL #-} --- | 'petStatus' Lens -petStatusL :: Lens_' Pet (Maybe E'Status2) -petStatusL f Pet{..} = (\petStatus -> Pet { petStatus, ..} ) <$> f petStatus -{-# INLINE petStatusL #-} +-- | 'petTags' Lens +petTagsL :: Lens_' Pet (Maybe [Tag]) +petTagsL f Pet{..} = (\petTags -> Pet { petTags, ..} ) <$> f petTags +{-# INLINE petTagsL #-} - - --- * ReadOnlyFirst - --- | 'readOnlyFirstBar' Lens -readOnlyFirstBarL :: Lens_' ReadOnlyFirst (Maybe Text) -readOnlyFirstBarL f ReadOnlyFirst{..} = (\readOnlyFirstBar -> ReadOnlyFirst { readOnlyFirstBar, ..} ) <$> f readOnlyFirstBar -{-# INLINE readOnlyFirstBarL #-} +-- | 'petStatus' Lens +petStatusL :: Lens_' Pet (Maybe E'Status2) +petStatusL f Pet{..} = (\petStatus -> Pet { petStatus, ..} ) <$> f petStatus +{-# INLINE petStatusL #-} + + + +-- * ReadOnlyFirst --- | 'readOnlyFirstBaz' Lens -readOnlyFirstBazL :: Lens_' ReadOnlyFirst (Maybe Text) -readOnlyFirstBazL f ReadOnlyFirst{..} = (\readOnlyFirstBaz -> ReadOnlyFirst { readOnlyFirstBaz, ..} ) <$> f readOnlyFirstBaz -{-# INLINE readOnlyFirstBazL #-} +-- | 'readOnlyFirstBar' Lens +readOnlyFirstBarL :: Lens_' ReadOnlyFirst (Maybe Text) +readOnlyFirstBarL f ReadOnlyFirst{..} = (\readOnlyFirstBar -> ReadOnlyFirst { readOnlyFirstBar, ..} ) <$> f readOnlyFirstBar +{-# INLINE readOnlyFirstBarL #-} - - --- * SpecialModelName - --- | 'specialModelNameSpecialPropertyName' Lens -specialModelNameSpecialPropertyNameL :: Lens_' SpecialModelName (Maybe Integer) -specialModelNameSpecialPropertyNameL f SpecialModelName{..} = (\specialModelNameSpecialPropertyName -> SpecialModelName { specialModelNameSpecialPropertyName, ..} ) <$> f specialModelNameSpecialPropertyName -{-# INLINE specialModelNameSpecialPropertyNameL #-} +-- | 'readOnlyFirstBaz' Lens +readOnlyFirstBazL :: Lens_' ReadOnlyFirst (Maybe Text) +readOnlyFirstBazL f ReadOnlyFirst{..} = (\readOnlyFirstBaz -> ReadOnlyFirst { readOnlyFirstBaz, ..} ) <$> f readOnlyFirstBaz +{-# INLINE readOnlyFirstBazL #-} + + + +-- * SpecialModelName - - --- * Tag - --- | 'tagId' Lens -tagIdL :: Lens_' Tag (Maybe Integer) -tagIdL f Tag{..} = (\tagId -> Tag { tagId, ..} ) <$> f tagId -{-# INLINE tagIdL #-} +-- | 'specialModelNameSpecialPropertyName' Lens +specialModelNameSpecialPropertyNameL :: Lens_' SpecialModelName (Maybe Integer) +specialModelNameSpecialPropertyNameL f SpecialModelName{..} = (\specialModelNameSpecialPropertyName -> SpecialModelName { specialModelNameSpecialPropertyName, ..} ) <$> f specialModelNameSpecialPropertyName +{-# INLINE specialModelNameSpecialPropertyNameL #-} + + + +-- * Tag --- | 'tagName' Lens -tagNameL :: Lens_' Tag (Maybe Text) -tagNameL f Tag{..} = (\tagName -> Tag { tagName, ..} ) <$> f tagName -{-# INLINE tagNameL #-} +-- | 'tagId' Lens +tagIdL :: Lens_' Tag (Maybe Integer) +tagIdL f Tag{..} = (\tagId -> Tag { tagId, ..} ) <$> f tagId +{-# INLINE tagIdL #-} - - --- * TypeHolderDefault - --- | 'typeHolderDefaultStringItem' Lens -typeHolderDefaultStringItemL :: Lens_' TypeHolderDefault (Text) -typeHolderDefaultStringItemL f TypeHolderDefault{..} = (\typeHolderDefaultStringItem -> TypeHolderDefault { typeHolderDefaultStringItem, ..} ) <$> f typeHolderDefaultStringItem -{-# INLINE typeHolderDefaultStringItemL #-} +-- | 'tagName' Lens +tagNameL :: Lens_' Tag (Maybe Text) +tagNameL f Tag{..} = (\tagName -> Tag { tagName, ..} ) <$> f tagName +{-# INLINE tagNameL #-} + + + +-- * TypeHolderDefault --- | 'typeHolderDefaultNumberItem' Lens -typeHolderDefaultNumberItemL :: Lens_' TypeHolderDefault (Double) -typeHolderDefaultNumberItemL f TypeHolderDefault{..} = (\typeHolderDefaultNumberItem -> TypeHolderDefault { typeHolderDefaultNumberItem, ..} ) <$> f typeHolderDefaultNumberItem -{-# INLINE typeHolderDefaultNumberItemL #-} +-- | 'typeHolderDefaultStringItem' Lens +typeHolderDefaultStringItemL :: Lens_' TypeHolderDefault (Text) +typeHolderDefaultStringItemL f TypeHolderDefault{..} = (\typeHolderDefaultStringItem -> TypeHolderDefault { typeHolderDefaultStringItem, ..} ) <$> f typeHolderDefaultStringItem +{-# INLINE typeHolderDefaultStringItemL #-} --- | 'typeHolderDefaultIntegerItem' Lens -typeHolderDefaultIntegerItemL :: Lens_' TypeHolderDefault (Int) -typeHolderDefaultIntegerItemL f TypeHolderDefault{..} = (\typeHolderDefaultIntegerItem -> TypeHolderDefault { typeHolderDefaultIntegerItem, ..} ) <$> f typeHolderDefaultIntegerItem -{-# INLINE typeHolderDefaultIntegerItemL #-} +-- | 'typeHolderDefaultNumberItem' Lens +typeHolderDefaultNumberItemL :: Lens_' TypeHolderDefault (Double) +typeHolderDefaultNumberItemL f TypeHolderDefault{..} = (\typeHolderDefaultNumberItem -> TypeHolderDefault { typeHolderDefaultNumberItem, ..} ) <$> f typeHolderDefaultNumberItem +{-# INLINE typeHolderDefaultNumberItemL #-} --- | 'typeHolderDefaultBoolItem' Lens -typeHolderDefaultBoolItemL :: Lens_' TypeHolderDefault (Bool) -typeHolderDefaultBoolItemL f TypeHolderDefault{..} = (\typeHolderDefaultBoolItem -> TypeHolderDefault { typeHolderDefaultBoolItem, ..} ) <$> f typeHolderDefaultBoolItem -{-# INLINE typeHolderDefaultBoolItemL #-} +-- | 'typeHolderDefaultIntegerItem' Lens +typeHolderDefaultIntegerItemL :: Lens_' TypeHolderDefault (Int) +typeHolderDefaultIntegerItemL f TypeHolderDefault{..} = (\typeHolderDefaultIntegerItem -> TypeHolderDefault { typeHolderDefaultIntegerItem, ..} ) <$> f typeHolderDefaultIntegerItem +{-# INLINE typeHolderDefaultIntegerItemL #-} --- | 'typeHolderDefaultArrayItem' Lens -typeHolderDefaultArrayItemL :: Lens_' TypeHolderDefault ([Int]) -typeHolderDefaultArrayItemL f TypeHolderDefault{..} = (\typeHolderDefaultArrayItem -> TypeHolderDefault { typeHolderDefaultArrayItem, ..} ) <$> f typeHolderDefaultArrayItem -{-# INLINE typeHolderDefaultArrayItemL #-} +-- | 'typeHolderDefaultBoolItem' Lens +typeHolderDefaultBoolItemL :: Lens_' TypeHolderDefault (Bool) +typeHolderDefaultBoolItemL f TypeHolderDefault{..} = (\typeHolderDefaultBoolItem -> TypeHolderDefault { typeHolderDefaultBoolItem, ..} ) <$> f typeHolderDefaultBoolItem +{-# INLINE typeHolderDefaultBoolItemL #-} - - --- * TypeHolderExample - --- | 'typeHolderExampleStringItem' Lens -typeHolderExampleStringItemL :: Lens_' TypeHolderExample (Text) -typeHolderExampleStringItemL f TypeHolderExample{..} = (\typeHolderExampleStringItem -> TypeHolderExample { typeHolderExampleStringItem, ..} ) <$> f typeHolderExampleStringItem -{-# INLINE typeHolderExampleStringItemL #-} +-- | 'typeHolderDefaultArrayItem' Lens +typeHolderDefaultArrayItemL :: Lens_' TypeHolderDefault ([Int]) +typeHolderDefaultArrayItemL f TypeHolderDefault{..} = (\typeHolderDefaultArrayItem -> TypeHolderDefault { typeHolderDefaultArrayItem, ..} ) <$> f typeHolderDefaultArrayItem +{-# INLINE typeHolderDefaultArrayItemL #-} + + + +-- * TypeHolderExample --- | 'typeHolderExampleNumberItem' Lens -typeHolderExampleNumberItemL :: Lens_' TypeHolderExample (Double) -typeHolderExampleNumberItemL f TypeHolderExample{..} = (\typeHolderExampleNumberItem -> TypeHolderExample { typeHolderExampleNumberItem, ..} ) <$> f typeHolderExampleNumberItem -{-# INLINE typeHolderExampleNumberItemL #-} +-- | 'typeHolderExampleStringItem' Lens +typeHolderExampleStringItemL :: Lens_' TypeHolderExample (Text) +typeHolderExampleStringItemL f TypeHolderExample{..} = (\typeHolderExampleStringItem -> TypeHolderExample { typeHolderExampleStringItem, ..} ) <$> f typeHolderExampleStringItem +{-# INLINE typeHolderExampleStringItemL #-} --- | 'typeHolderExampleIntegerItem' Lens -typeHolderExampleIntegerItemL :: Lens_' TypeHolderExample (Int) -typeHolderExampleIntegerItemL f TypeHolderExample{..} = (\typeHolderExampleIntegerItem -> TypeHolderExample { typeHolderExampleIntegerItem, ..} ) <$> f typeHolderExampleIntegerItem -{-# INLINE typeHolderExampleIntegerItemL #-} +-- | 'typeHolderExampleNumberItem' Lens +typeHolderExampleNumberItemL :: Lens_' TypeHolderExample (Double) +typeHolderExampleNumberItemL f TypeHolderExample{..} = (\typeHolderExampleNumberItem -> TypeHolderExample { typeHolderExampleNumberItem, ..} ) <$> f typeHolderExampleNumberItem +{-# INLINE typeHolderExampleNumberItemL #-} --- | 'typeHolderExampleBoolItem' Lens -typeHolderExampleBoolItemL :: Lens_' TypeHolderExample (Bool) -typeHolderExampleBoolItemL f TypeHolderExample{..} = (\typeHolderExampleBoolItem -> TypeHolderExample { typeHolderExampleBoolItem, ..} ) <$> f typeHolderExampleBoolItem -{-# INLINE typeHolderExampleBoolItemL #-} +-- | 'typeHolderExampleFloatItem' Lens +typeHolderExampleFloatItemL :: Lens_' TypeHolderExample (Float) +typeHolderExampleFloatItemL f TypeHolderExample{..} = (\typeHolderExampleFloatItem -> TypeHolderExample { typeHolderExampleFloatItem, ..} ) <$> f typeHolderExampleFloatItem +{-# INLINE typeHolderExampleFloatItemL #-} --- | 'typeHolderExampleArrayItem' Lens -typeHolderExampleArrayItemL :: Lens_' TypeHolderExample ([Int]) -typeHolderExampleArrayItemL f TypeHolderExample{..} = (\typeHolderExampleArrayItem -> TypeHolderExample { typeHolderExampleArrayItem, ..} ) <$> f typeHolderExampleArrayItem -{-# INLINE typeHolderExampleArrayItemL #-} +-- | 'typeHolderExampleIntegerItem' Lens +typeHolderExampleIntegerItemL :: Lens_' TypeHolderExample (Int) +typeHolderExampleIntegerItemL f TypeHolderExample{..} = (\typeHolderExampleIntegerItem -> TypeHolderExample { typeHolderExampleIntegerItem, ..} ) <$> f typeHolderExampleIntegerItem +{-# INLINE typeHolderExampleIntegerItemL #-} - - --- * User - --- | 'userId' Lens -userIdL :: Lens_' User (Maybe Integer) -userIdL f User{..} = (\userId -> User { userId, ..} ) <$> f userId -{-# INLINE userIdL #-} - --- | 'userUsername' Lens -userUsernameL :: Lens_' User (Maybe Text) -userUsernameL f User{..} = (\userUsername -> User { userUsername, ..} ) <$> f userUsername -{-# INLINE userUsernameL #-} +-- | 'typeHolderExampleBoolItem' Lens +typeHolderExampleBoolItemL :: Lens_' TypeHolderExample (Bool) +typeHolderExampleBoolItemL f TypeHolderExample{..} = (\typeHolderExampleBoolItem -> TypeHolderExample { typeHolderExampleBoolItem, ..} ) <$> f typeHolderExampleBoolItem +{-# INLINE typeHolderExampleBoolItemL #-} + +-- | 'typeHolderExampleArrayItem' Lens +typeHolderExampleArrayItemL :: Lens_' TypeHolderExample ([Int]) +typeHolderExampleArrayItemL f TypeHolderExample{..} = (\typeHolderExampleArrayItem -> TypeHolderExample { typeHolderExampleArrayItem, ..} ) <$> f typeHolderExampleArrayItem +{-# INLINE typeHolderExampleArrayItemL #-} + + + +-- * User --- | 'userFirstName' Lens -userFirstNameL :: Lens_' User (Maybe Text) -userFirstNameL f User{..} = (\userFirstName -> User { userFirstName, ..} ) <$> f userFirstName -{-# INLINE userFirstNameL #-} +-- | 'userId' Lens +userIdL :: Lens_' User (Maybe Integer) +userIdL f User{..} = (\userId -> User { userId, ..} ) <$> f userId +{-# INLINE userIdL #-} --- | 'userLastName' Lens -userLastNameL :: Lens_' User (Maybe Text) -userLastNameL f User{..} = (\userLastName -> User { userLastName, ..} ) <$> f userLastName -{-# INLINE userLastNameL #-} +-- | 'userUsername' Lens +userUsernameL :: Lens_' User (Maybe Text) +userUsernameL f User{..} = (\userUsername -> User { userUsername, ..} ) <$> f userUsername +{-# INLINE userUsernameL #-} --- | 'userEmail' Lens -userEmailL :: Lens_' User (Maybe Text) -userEmailL f User{..} = (\userEmail -> User { userEmail, ..} ) <$> f userEmail -{-# INLINE userEmailL #-} +-- | 'userFirstName' Lens +userFirstNameL :: Lens_' User (Maybe Text) +userFirstNameL f User{..} = (\userFirstName -> User { userFirstName, ..} ) <$> f userFirstName +{-# INLINE userFirstNameL #-} --- | 'userPassword' Lens -userPasswordL :: Lens_' User (Maybe Text) -userPasswordL f User{..} = (\userPassword -> User { userPassword, ..} ) <$> f userPassword -{-# INLINE userPasswordL #-} +-- | 'userLastName' Lens +userLastNameL :: Lens_' User (Maybe Text) +userLastNameL f User{..} = (\userLastName -> User { userLastName, ..} ) <$> f userLastName +{-# INLINE userLastNameL #-} --- | 'userPhone' Lens -userPhoneL :: Lens_' User (Maybe Text) -userPhoneL f User{..} = (\userPhone -> User { userPhone, ..} ) <$> f userPhone -{-# INLINE userPhoneL #-} +-- | 'userEmail' Lens +userEmailL :: Lens_' User (Maybe Text) +userEmailL f User{..} = (\userEmail -> User { userEmail, ..} ) <$> f userEmail +{-# INLINE userEmailL #-} --- | 'userUserStatus' Lens -userUserStatusL :: Lens_' User (Maybe Int) -userUserStatusL f User{..} = (\userUserStatus -> User { userUserStatus, ..} ) <$> f userUserStatus -{-# INLINE userUserStatusL #-} +-- | 'userPassword' Lens +userPasswordL :: Lens_' User (Maybe Text) +userPasswordL f User{..} = (\userPassword -> User { userPassword, ..} ) <$> f userPassword +{-# INLINE userPasswordL #-} - - --- * XmlItem - --- | 'xmlItemAttributeString' Lens -xmlItemAttributeStringL :: Lens_' XmlItem (Maybe Text) -xmlItemAttributeStringL f XmlItem{..} = (\xmlItemAttributeString -> XmlItem { xmlItemAttributeString, ..} ) <$> f xmlItemAttributeString -{-# INLINE xmlItemAttributeStringL #-} - --- | 'xmlItemAttributeNumber' Lens -xmlItemAttributeNumberL :: Lens_' XmlItem (Maybe Double) -xmlItemAttributeNumberL f XmlItem{..} = (\xmlItemAttributeNumber -> XmlItem { xmlItemAttributeNumber, ..} ) <$> f xmlItemAttributeNumber -{-# INLINE xmlItemAttributeNumberL #-} +-- | 'userPhone' Lens +userPhoneL :: Lens_' User (Maybe Text) +userPhoneL f User{..} = (\userPhone -> User { userPhone, ..} ) <$> f userPhone +{-# INLINE userPhoneL #-} + +-- | 'userUserStatus' Lens +userUserStatusL :: Lens_' User (Maybe Int) +userUserStatusL f User{..} = (\userUserStatus -> User { userUserStatus, ..} ) <$> f userUserStatus +{-# INLINE userUserStatusL #-} + + + +-- * XmlItem --- | 'xmlItemAttributeInteger' Lens -xmlItemAttributeIntegerL :: Lens_' XmlItem (Maybe Int) -xmlItemAttributeIntegerL f XmlItem{..} = (\xmlItemAttributeInteger -> XmlItem { xmlItemAttributeInteger, ..} ) <$> f xmlItemAttributeInteger -{-# INLINE xmlItemAttributeIntegerL #-} +-- | 'xmlItemAttributeString' Lens +xmlItemAttributeStringL :: Lens_' XmlItem (Maybe Text) +xmlItemAttributeStringL f XmlItem{..} = (\xmlItemAttributeString -> XmlItem { xmlItemAttributeString, ..} ) <$> f xmlItemAttributeString +{-# INLINE xmlItemAttributeStringL #-} --- | 'xmlItemAttributeBoolean' Lens -xmlItemAttributeBooleanL :: Lens_' XmlItem (Maybe Bool) -xmlItemAttributeBooleanL f XmlItem{..} = (\xmlItemAttributeBoolean -> XmlItem { xmlItemAttributeBoolean, ..} ) <$> f xmlItemAttributeBoolean -{-# INLINE xmlItemAttributeBooleanL #-} +-- | 'xmlItemAttributeNumber' Lens +xmlItemAttributeNumberL :: Lens_' XmlItem (Maybe Double) +xmlItemAttributeNumberL f XmlItem{..} = (\xmlItemAttributeNumber -> XmlItem { xmlItemAttributeNumber, ..} ) <$> f xmlItemAttributeNumber +{-# INLINE xmlItemAttributeNumberL #-} --- | 'xmlItemWrappedArray' Lens -xmlItemWrappedArrayL :: Lens_' XmlItem (Maybe [Int]) -xmlItemWrappedArrayL f XmlItem{..} = (\xmlItemWrappedArray -> XmlItem { xmlItemWrappedArray, ..} ) <$> f xmlItemWrappedArray -{-# INLINE xmlItemWrappedArrayL #-} +-- | 'xmlItemAttributeInteger' Lens +xmlItemAttributeIntegerL :: Lens_' XmlItem (Maybe Int) +xmlItemAttributeIntegerL f XmlItem{..} = (\xmlItemAttributeInteger -> XmlItem { xmlItemAttributeInteger, ..} ) <$> f xmlItemAttributeInteger +{-# INLINE xmlItemAttributeIntegerL #-} --- | 'xmlItemNameString' Lens -xmlItemNameStringL :: Lens_' XmlItem (Maybe Text) -xmlItemNameStringL f XmlItem{..} = (\xmlItemNameString -> XmlItem { xmlItemNameString, ..} ) <$> f xmlItemNameString -{-# INLINE xmlItemNameStringL #-} +-- | 'xmlItemAttributeBoolean' Lens +xmlItemAttributeBooleanL :: Lens_' XmlItem (Maybe Bool) +xmlItemAttributeBooleanL f XmlItem{..} = (\xmlItemAttributeBoolean -> XmlItem { xmlItemAttributeBoolean, ..} ) <$> f xmlItemAttributeBoolean +{-# INLINE xmlItemAttributeBooleanL #-} --- | 'xmlItemNameNumber' Lens -xmlItemNameNumberL :: Lens_' XmlItem (Maybe Double) -xmlItemNameNumberL f XmlItem{..} = (\xmlItemNameNumber -> XmlItem { xmlItemNameNumber, ..} ) <$> f xmlItemNameNumber -{-# INLINE xmlItemNameNumberL #-} +-- | 'xmlItemWrappedArray' Lens +xmlItemWrappedArrayL :: Lens_' XmlItem (Maybe [Int]) +xmlItemWrappedArrayL f XmlItem{..} = (\xmlItemWrappedArray -> XmlItem { xmlItemWrappedArray, ..} ) <$> f xmlItemWrappedArray +{-# INLINE xmlItemWrappedArrayL #-} --- | 'xmlItemNameInteger' Lens -xmlItemNameIntegerL :: Lens_' XmlItem (Maybe Int) -xmlItemNameIntegerL f XmlItem{..} = (\xmlItemNameInteger -> XmlItem { xmlItemNameInteger, ..} ) <$> f xmlItemNameInteger -{-# INLINE xmlItemNameIntegerL #-} +-- | 'xmlItemNameString' Lens +xmlItemNameStringL :: Lens_' XmlItem (Maybe Text) +xmlItemNameStringL f XmlItem{..} = (\xmlItemNameString -> XmlItem { xmlItemNameString, ..} ) <$> f xmlItemNameString +{-# INLINE xmlItemNameStringL #-} --- | 'xmlItemNameBoolean' Lens -xmlItemNameBooleanL :: Lens_' XmlItem (Maybe Bool) -xmlItemNameBooleanL f XmlItem{..} = (\xmlItemNameBoolean -> XmlItem { xmlItemNameBoolean, ..} ) <$> f xmlItemNameBoolean -{-# INLINE xmlItemNameBooleanL #-} +-- | 'xmlItemNameNumber' Lens +xmlItemNameNumberL :: Lens_' XmlItem (Maybe Double) +xmlItemNameNumberL f XmlItem{..} = (\xmlItemNameNumber -> XmlItem { xmlItemNameNumber, ..} ) <$> f xmlItemNameNumber +{-# INLINE xmlItemNameNumberL #-} --- | 'xmlItemNameArray' Lens -xmlItemNameArrayL :: Lens_' XmlItem (Maybe [Int]) -xmlItemNameArrayL f XmlItem{..} = (\xmlItemNameArray -> XmlItem { xmlItemNameArray, ..} ) <$> f xmlItemNameArray -{-# INLINE xmlItemNameArrayL #-} +-- | 'xmlItemNameInteger' Lens +xmlItemNameIntegerL :: Lens_' XmlItem (Maybe Int) +xmlItemNameIntegerL f XmlItem{..} = (\xmlItemNameInteger -> XmlItem { xmlItemNameInteger, ..} ) <$> f xmlItemNameInteger +{-# INLINE xmlItemNameIntegerL #-} --- | 'xmlItemNameWrappedArray' Lens -xmlItemNameWrappedArrayL :: Lens_' XmlItem (Maybe [Int]) -xmlItemNameWrappedArrayL f XmlItem{..} = (\xmlItemNameWrappedArray -> XmlItem { xmlItemNameWrappedArray, ..} ) <$> f xmlItemNameWrappedArray -{-# INLINE xmlItemNameWrappedArrayL #-} +-- | 'xmlItemNameBoolean' Lens +xmlItemNameBooleanL :: Lens_' XmlItem (Maybe Bool) +xmlItemNameBooleanL f XmlItem{..} = (\xmlItemNameBoolean -> XmlItem { xmlItemNameBoolean, ..} ) <$> f xmlItemNameBoolean +{-# INLINE xmlItemNameBooleanL #-} --- | 'xmlItemPrefixString' Lens -xmlItemPrefixStringL :: Lens_' XmlItem (Maybe Text) -xmlItemPrefixStringL f XmlItem{..} = (\xmlItemPrefixString -> XmlItem { xmlItemPrefixString, ..} ) <$> f xmlItemPrefixString -{-# INLINE xmlItemPrefixStringL #-} +-- | 'xmlItemNameArray' Lens +xmlItemNameArrayL :: Lens_' XmlItem (Maybe [Int]) +xmlItemNameArrayL f XmlItem{..} = (\xmlItemNameArray -> XmlItem { xmlItemNameArray, ..} ) <$> f xmlItemNameArray +{-# INLINE xmlItemNameArrayL #-} --- | 'xmlItemPrefixNumber' Lens -xmlItemPrefixNumberL :: Lens_' XmlItem (Maybe Double) -xmlItemPrefixNumberL f XmlItem{..} = (\xmlItemPrefixNumber -> XmlItem { xmlItemPrefixNumber, ..} ) <$> f xmlItemPrefixNumber -{-# INLINE xmlItemPrefixNumberL #-} +-- | 'xmlItemNameWrappedArray' Lens +xmlItemNameWrappedArrayL :: Lens_' XmlItem (Maybe [Int]) +xmlItemNameWrappedArrayL f XmlItem{..} = (\xmlItemNameWrappedArray -> XmlItem { xmlItemNameWrappedArray, ..} ) <$> f xmlItemNameWrappedArray +{-# INLINE xmlItemNameWrappedArrayL #-} --- | 'xmlItemPrefixInteger' Lens -xmlItemPrefixIntegerL :: Lens_' XmlItem (Maybe Int) -xmlItemPrefixIntegerL f XmlItem{..} = (\xmlItemPrefixInteger -> XmlItem { xmlItemPrefixInteger, ..} ) <$> f xmlItemPrefixInteger -{-# INLINE xmlItemPrefixIntegerL #-} +-- | 'xmlItemPrefixString' Lens +xmlItemPrefixStringL :: Lens_' XmlItem (Maybe Text) +xmlItemPrefixStringL f XmlItem{..} = (\xmlItemPrefixString -> XmlItem { xmlItemPrefixString, ..} ) <$> f xmlItemPrefixString +{-# INLINE xmlItemPrefixStringL #-} --- | 'xmlItemPrefixBoolean' Lens -xmlItemPrefixBooleanL :: Lens_' XmlItem (Maybe Bool) -xmlItemPrefixBooleanL f XmlItem{..} = (\xmlItemPrefixBoolean -> XmlItem { xmlItemPrefixBoolean, ..} ) <$> f xmlItemPrefixBoolean -{-# INLINE xmlItemPrefixBooleanL #-} +-- | 'xmlItemPrefixNumber' Lens +xmlItemPrefixNumberL :: Lens_' XmlItem (Maybe Double) +xmlItemPrefixNumberL f XmlItem{..} = (\xmlItemPrefixNumber -> XmlItem { xmlItemPrefixNumber, ..} ) <$> f xmlItemPrefixNumber +{-# INLINE xmlItemPrefixNumberL #-} --- | 'xmlItemPrefixArray' Lens -xmlItemPrefixArrayL :: Lens_' XmlItem (Maybe [Int]) -xmlItemPrefixArrayL f XmlItem{..} = (\xmlItemPrefixArray -> XmlItem { xmlItemPrefixArray, ..} ) <$> f xmlItemPrefixArray -{-# INLINE xmlItemPrefixArrayL #-} +-- | 'xmlItemPrefixInteger' Lens +xmlItemPrefixIntegerL :: Lens_' XmlItem (Maybe Int) +xmlItemPrefixIntegerL f XmlItem{..} = (\xmlItemPrefixInteger -> XmlItem { xmlItemPrefixInteger, ..} ) <$> f xmlItemPrefixInteger +{-# INLINE xmlItemPrefixIntegerL #-} --- | 'xmlItemPrefixWrappedArray' Lens -xmlItemPrefixWrappedArrayL :: Lens_' XmlItem (Maybe [Int]) -xmlItemPrefixWrappedArrayL f XmlItem{..} = (\xmlItemPrefixWrappedArray -> XmlItem { xmlItemPrefixWrappedArray, ..} ) <$> f xmlItemPrefixWrappedArray -{-# INLINE xmlItemPrefixWrappedArrayL #-} +-- | 'xmlItemPrefixBoolean' Lens +xmlItemPrefixBooleanL :: Lens_' XmlItem (Maybe Bool) +xmlItemPrefixBooleanL f XmlItem{..} = (\xmlItemPrefixBoolean -> XmlItem { xmlItemPrefixBoolean, ..} ) <$> f xmlItemPrefixBoolean +{-# INLINE xmlItemPrefixBooleanL #-} --- | 'xmlItemNamespaceString' Lens -xmlItemNamespaceStringL :: Lens_' XmlItem (Maybe Text) -xmlItemNamespaceStringL f XmlItem{..} = (\xmlItemNamespaceString -> XmlItem { xmlItemNamespaceString, ..} ) <$> f xmlItemNamespaceString -{-# INLINE xmlItemNamespaceStringL #-} +-- | 'xmlItemPrefixArray' Lens +xmlItemPrefixArrayL :: Lens_' XmlItem (Maybe [Int]) +xmlItemPrefixArrayL f XmlItem{..} = (\xmlItemPrefixArray -> XmlItem { xmlItemPrefixArray, ..} ) <$> f xmlItemPrefixArray +{-# INLINE xmlItemPrefixArrayL #-} --- | 'xmlItemNamespaceNumber' Lens -xmlItemNamespaceNumberL :: Lens_' XmlItem (Maybe Double) -xmlItemNamespaceNumberL f XmlItem{..} = (\xmlItemNamespaceNumber -> XmlItem { xmlItemNamespaceNumber, ..} ) <$> f xmlItemNamespaceNumber -{-# INLINE xmlItemNamespaceNumberL #-} +-- | 'xmlItemPrefixWrappedArray' Lens +xmlItemPrefixWrappedArrayL :: Lens_' XmlItem (Maybe [Int]) +xmlItemPrefixWrappedArrayL f XmlItem{..} = (\xmlItemPrefixWrappedArray -> XmlItem { xmlItemPrefixWrappedArray, ..} ) <$> f xmlItemPrefixWrappedArray +{-# INLINE xmlItemPrefixWrappedArrayL #-} --- | 'xmlItemNamespaceInteger' Lens -xmlItemNamespaceIntegerL :: Lens_' XmlItem (Maybe Int) -xmlItemNamespaceIntegerL f XmlItem{..} = (\xmlItemNamespaceInteger -> XmlItem { xmlItemNamespaceInteger, ..} ) <$> f xmlItemNamespaceInteger -{-# INLINE xmlItemNamespaceIntegerL #-} +-- | 'xmlItemNamespaceString' Lens +xmlItemNamespaceStringL :: Lens_' XmlItem (Maybe Text) +xmlItemNamespaceStringL f XmlItem{..} = (\xmlItemNamespaceString -> XmlItem { xmlItemNamespaceString, ..} ) <$> f xmlItemNamespaceString +{-# INLINE xmlItemNamespaceStringL #-} --- | 'xmlItemNamespaceBoolean' Lens -xmlItemNamespaceBooleanL :: Lens_' XmlItem (Maybe Bool) -xmlItemNamespaceBooleanL f XmlItem{..} = (\xmlItemNamespaceBoolean -> XmlItem { xmlItemNamespaceBoolean, ..} ) <$> f xmlItemNamespaceBoolean -{-# INLINE xmlItemNamespaceBooleanL #-} +-- | 'xmlItemNamespaceNumber' Lens +xmlItemNamespaceNumberL :: Lens_' XmlItem (Maybe Double) +xmlItemNamespaceNumberL f XmlItem{..} = (\xmlItemNamespaceNumber -> XmlItem { xmlItemNamespaceNumber, ..} ) <$> f xmlItemNamespaceNumber +{-# INLINE xmlItemNamespaceNumberL #-} --- | 'xmlItemNamespaceArray' Lens -xmlItemNamespaceArrayL :: Lens_' XmlItem (Maybe [Int]) -xmlItemNamespaceArrayL f XmlItem{..} = (\xmlItemNamespaceArray -> XmlItem { xmlItemNamespaceArray, ..} ) <$> f xmlItemNamespaceArray -{-# INLINE xmlItemNamespaceArrayL #-} +-- | 'xmlItemNamespaceInteger' Lens +xmlItemNamespaceIntegerL :: Lens_' XmlItem (Maybe Int) +xmlItemNamespaceIntegerL f XmlItem{..} = (\xmlItemNamespaceInteger -> XmlItem { xmlItemNamespaceInteger, ..} ) <$> f xmlItemNamespaceInteger +{-# INLINE xmlItemNamespaceIntegerL #-} --- | 'xmlItemNamespaceWrappedArray' Lens -xmlItemNamespaceWrappedArrayL :: Lens_' XmlItem (Maybe [Int]) -xmlItemNamespaceWrappedArrayL f XmlItem{..} = (\xmlItemNamespaceWrappedArray -> XmlItem { xmlItemNamespaceWrappedArray, ..} ) <$> f xmlItemNamespaceWrappedArray -{-# INLINE xmlItemNamespaceWrappedArrayL #-} +-- | 'xmlItemNamespaceBoolean' Lens +xmlItemNamespaceBooleanL :: Lens_' XmlItem (Maybe Bool) +xmlItemNamespaceBooleanL f XmlItem{..} = (\xmlItemNamespaceBoolean -> XmlItem { xmlItemNamespaceBoolean, ..} ) <$> f xmlItemNamespaceBoolean +{-# INLINE xmlItemNamespaceBooleanL #-} --- | 'xmlItemPrefixNsString' Lens -xmlItemPrefixNsStringL :: Lens_' XmlItem (Maybe Text) -xmlItemPrefixNsStringL f XmlItem{..} = (\xmlItemPrefixNsString -> XmlItem { xmlItemPrefixNsString, ..} ) <$> f xmlItemPrefixNsString -{-# INLINE xmlItemPrefixNsStringL #-} +-- | 'xmlItemNamespaceArray' Lens +xmlItemNamespaceArrayL :: Lens_' XmlItem (Maybe [Int]) +xmlItemNamespaceArrayL f XmlItem{..} = (\xmlItemNamespaceArray -> XmlItem { xmlItemNamespaceArray, ..} ) <$> f xmlItemNamespaceArray +{-# INLINE xmlItemNamespaceArrayL #-} --- | 'xmlItemPrefixNsNumber' Lens -xmlItemPrefixNsNumberL :: Lens_' XmlItem (Maybe Double) -xmlItemPrefixNsNumberL f XmlItem{..} = (\xmlItemPrefixNsNumber -> XmlItem { xmlItemPrefixNsNumber, ..} ) <$> f xmlItemPrefixNsNumber -{-# INLINE xmlItemPrefixNsNumberL #-} +-- | 'xmlItemNamespaceWrappedArray' Lens +xmlItemNamespaceWrappedArrayL :: Lens_' XmlItem (Maybe [Int]) +xmlItemNamespaceWrappedArrayL f XmlItem{..} = (\xmlItemNamespaceWrappedArray -> XmlItem { xmlItemNamespaceWrappedArray, ..} ) <$> f xmlItemNamespaceWrappedArray +{-# INLINE xmlItemNamespaceWrappedArrayL #-} --- | 'xmlItemPrefixNsInteger' Lens -xmlItemPrefixNsIntegerL :: Lens_' XmlItem (Maybe Int) -xmlItemPrefixNsIntegerL f XmlItem{..} = (\xmlItemPrefixNsInteger -> XmlItem { xmlItemPrefixNsInteger, ..} ) <$> f xmlItemPrefixNsInteger -{-# INLINE xmlItemPrefixNsIntegerL #-} +-- | 'xmlItemPrefixNsString' Lens +xmlItemPrefixNsStringL :: Lens_' XmlItem (Maybe Text) +xmlItemPrefixNsStringL f XmlItem{..} = (\xmlItemPrefixNsString -> XmlItem { xmlItemPrefixNsString, ..} ) <$> f xmlItemPrefixNsString +{-# INLINE xmlItemPrefixNsStringL #-} --- | 'xmlItemPrefixNsBoolean' Lens -xmlItemPrefixNsBooleanL :: Lens_' XmlItem (Maybe Bool) -xmlItemPrefixNsBooleanL f XmlItem{..} = (\xmlItemPrefixNsBoolean -> XmlItem { xmlItemPrefixNsBoolean, ..} ) <$> f xmlItemPrefixNsBoolean -{-# INLINE xmlItemPrefixNsBooleanL #-} +-- | 'xmlItemPrefixNsNumber' Lens +xmlItemPrefixNsNumberL :: Lens_' XmlItem (Maybe Double) +xmlItemPrefixNsNumberL f XmlItem{..} = (\xmlItemPrefixNsNumber -> XmlItem { xmlItemPrefixNsNumber, ..} ) <$> f xmlItemPrefixNsNumber +{-# INLINE xmlItemPrefixNsNumberL #-} --- | 'xmlItemPrefixNsArray' Lens -xmlItemPrefixNsArrayL :: Lens_' XmlItem (Maybe [Int]) -xmlItemPrefixNsArrayL f XmlItem{..} = (\xmlItemPrefixNsArray -> XmlItem { xmlItemPrefixNsArray, ..} ) <$> f xmlItemPrefixNsArray -{-# INLINE xmlItemPrefixNsArrayL #-} +-- | 'xmlItemPrefixNsInteger' Lens +xmlItemPrefixNsIntegerL :: Lens_' XmlItem (Maybe Int) +xmlItemPrefixNsIntegerL f XmlItem{..} = (\xmlItemPrefixNsInteger -> XmlItem { xmlItemPrefixNsInteger, ..} ) <$> f xmlItemPrefixNsInteger +{-# INLINE xmlItemPrefixNsIntegerL #-} --- | 'xmlItemPrefixNsWrappedArray' Lens -xmlItemPrefixNsWrappedArrayL :: Lens_' XmlItem (Maybe [Int]) -xmlItemPrefixNsWrappedArrayL f XmlItem{..} = (\xmlItemPrefixNsWrappedArray -> XmlItem { xmlItemPrefixNsWrappedArray, ..} ) <$> f xmlItemPrefixNsWrappedArray -{-# INLINE xmlItemPrefixNsWrappedArrayL #-} +-- | 'xmlItemPrefixNsBoolean' Lens +xmlItemPrefixNsBooleanL :: Lens_' XmlItem (Maybe Bool) +xmlItemPrefixNsBooleanL f XmlItem{..} = (\xmlItemPrefixNsBoolean -> XmlItem { xmlItemPrefixNsBoolean, ..} ) <$> f xmlItemPrefixNsBoolean +{-# INLINE xmlItemPrefixNsBooleanL #-} - - \ No newline at end of file +-- | 'xmlItemPrefixNsArray' Lens +xmlItemPrefixNsArrayL :: Lens_' XmlItem (Maybe [Int]) +xmlItemPrefixNsArrayL f XmlItem{..} = (\xmlItemPrefixNsArray -> XmlItem { xmlItemPrefixNsArray, ..} ) <$> f xmlItemPrefixNsArray +{-# INLINE xmlItemPrefixNsArrayL #-} + +-- | 'xmlItemPrefixNsWrappedArray' Lens +xmlItemPrefixNsWrappedArrayL :: Lens_' XmlItem (Maybe [Int]) +xmlItemPrefixNsWrappedArrayL f XmlItem{..} = (\xmlItemPrefixNsWrappedArray -> XmlItem { xmlItemPrefixNsWrappedArray, ..} ) <$> f xmlItemPrefixNsWrappedArray +{-# INLINE xmlItemPrefixNsWrappedArrayL #-} + + + \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/Paths_openapi_petstore.html b/samples/client/petstore/haskell-http-client/docs/src/Paths_openapi_petstore.html index 1e69c03e48..433a6d0450 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/Paths_openapi_petstore.html +++ b/samples/client/petstore/haskell-http-client/docs/src/Paths_openapi_petstore.html @@ -15,7 +15,7 @@ #if defined(VERSION_base) #if MIN_VERSION_base(4,0,0) -catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a +catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a #else catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a #endif @@ -29,12 +29,12 @@ version = Version [0,1,0,0] [] bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath -bindir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/0e55b588a6e0f73d5281a0e79ff90ed1a2f68be7e90de0d4415c83e0146eb843/8.6.5/bin" -libdir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/0e55b588a6e0f73d5281a0e79ff90ed1a2f68be7e90de0d4415c83e0146eb843/8.6.5/lib/x86_64-linux-ghc-8.6.5/openapi-petstore-0.1.0.0-AOImxrOgHINA0WeGn39wyO" -dynlibdir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/0e55b588a6e0f73d5281a0e79ff90ed1a2f68be7e90de0d4415c83e0146eb843/8.6.5/lib/x86_64-linux-ghc-8.6.5" -datadir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/0e55b588a6e0f73d5281a0e79ff90ed1a2f68be7e90de0d4415c83e0146eb843/8.6.5/share/x86_64-linux-ghc-8.6.5/openapi-petstore-0.1.0.0" -libexecdir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/0e55b588a6e0f73d5281a0e79ff90ed1a2f68be7e90de0d4415c83e0146eb843/8.6.5/libexec/x86_64-linux-ghc-8.6.5/openapi-petstore-0.1.0.0" -sysconfdir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/0e55b588a6e0f73d5281a0e79ff90ed1a2f68be7e90de0d4415c83e0146eb843/8.6.5/etc" +bindir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/fc145f4ab01b753015783fd723c1c1f444881d8c0916f76620d5858ea781cc04/8.6.5/bin" +libdir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/fc145f4ab01b753015783fd723c1c1f444881d8c0916f76620d5858ea781cc04/8.6.5/lib/x86_64-linux-ghc-8.6.5/openapi-petstore-0.1.0.0-Dxqq77hX6Ed87xlo7kZobP" +dynlibdir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/fc145f4ab01b753015783fd723c1c1f444881d8c0916f76620d5858ea781cc04/8.6.5/lib/x86_64-linux-ghc-8.6.5" +datadir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/fc145f4ab01b753015783fd723c1c1f444881d8c0916f76620d5858ea781cc04/8.6.5/share/x86_64-linux-ghc-8.6.5/openapi-petstore-0.1.0.0" +libexecdir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/fc145f4ab01b753015783fd723c1c1f444881d8c0916f76620d5858ea781cc04/8.6.5/libexec/x86_64-linux-ghc-8.6.5/openapi-petstore-0.1.0.0" +sysconfdir = "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/fc145f4ab01b753015783fd723c1c1f444881d8c0916f76620d5858ea781cc04/8.6.5/etc" getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath getBinDir = catchIO (getEnv "openapi_petstore_bindir") (\_ -> return bindir) @@ -45,7 +45,7 @@ getSysconfDir = catchIO (getEnv "openapi_petstore_sysconfdir") (\_ -> return sysconfdir) getDataFileName :: FilePath -> IO FilePath -getDataFileName name = do - dir <- getDataDir - return (dir ++ "/" ++ name) +getDataFileName name = do + dir <- getDataDir + return (dir ++ "/" ++ name) \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/example-app/stack.yaml b/samples/client/petstore/haskell-http-client/example-app/stack.yaml index 31ae84e5f2..01febb980c 100644 --- a/samples/client/petstore/haskell-http-client/example-app/stack.yaml +++ b/samples/client/petstore/haskell-http-client/example-app/stack.yaml @@ -1,2 +1,2 @@ -resolver: lts-14.3 -extra-deps: [ '..', katip-0.8.3.0 ] +resolver: lts-14.7 +extra-deps: [ '..' ] diff --git a/samples/client/petstore/haskell-http-client/example-app/stack.yaml.lock b/samples/client/petstore/haskell-http-client/example-app/stack.yaml.lock index d4ba7488f1..8d6222267c 100644 --- a/samples/client/petstore/haskell-http-client/example-app/stack.yaml.lock +++ b/samples/client/petstore/haskell-http-client/example-app/stack.yaml.lock @@ -3,17 +3,10 @@ # For more information, please see the documentation at: # https://docs.haskellstack.org/en/stable/lock_files -packages: -- completed: - hackage: katip-0.8.3.0@sha256:8a67c0aec3ba1f0eabcfae443cb909e4cf9405e29bac99ccf1420f1f1bbda9c4,4097 - pantry-tree: - size: 1140 - sha256: cad8c67256ec85819309d77bdcbc15b67885940ef76f2b850c8be20c2efd0149 - original: - hackage: katip-0.8.3.0 +packages: [] snapshots: - completed: - size: 523878 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/3.yaml - sha256: 470c46c27746a48c7c50f829efc0cf00112787a7804ee4ac7a27754658f6d92c - original: lts-14.3 + size: 523700 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/7.yaml + sha256: 8e3f3c894be74d71fa4bf085e0a8baae7e4d7622d07ea31a52736b80f8b9bb1a + original: lts-14.7 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 10d2203f1d..8bfb741aeb 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -1146,8 +1146,8 @@ mkFormatTest formatTestNumber formatTestByte formatTestDate formatTestPassword = -- ** HasOnlyReadOnly -- | HasOnlyReadOnly data HasOnlyReadOnly = HasOnlyReadOnly - { hasOnlyReadOnlyBar :: !(Maybe Text) -- ^ "bar" - , hasOnlyReadOnlyFoo :: !(Maybe Text) -- ^ "foo" + { hasOnlyReadOnlyBar :: !(Maybe Text) -- ^ /ReadOnly/ "bar" + , hasOnlyReadOnlyFoo :: !(Maybe Text) -- ^ /ReadOnly/ "foo" } deriving (P.Show, P.Eq, P.Typeable) -- | FromJSON HasOnlyReadOnly @@ -1346,9 +1346,9 @@ mkModelReturn = -- Model for testing model name same as property name data Name = Name { nameName :: !(Int) -- ^ /Required/ "name" - , nameSnakeCase :: !(Maybe Int) -- ^ "snake_case" + , nameSnakeCase :: !(Maybe Int) -- ^ /ReadOnly/ "snake_case" , nameProperty :: !(Maybe Text) -- ^ "property" - , name123number :: !(Maybe Int) -- ^ "123Number" + , name123number :: !(Maybe Int) -- ^ /ReadOnly/ "123Number" } deriving (P.Show, P.Eq, P.Typeable) -- | FromJSON Name @@ -1548,7 +1548,7 @@ mkPet petName petPhotoUrls = -- ** ReadOnlyFirst -- | ReadOnlyFirst data ReadOnlyFirst = ReadOnlyFirst - { readOnlyFirstBar :: !(Maybe Text) -- ^ "bar" + { readOnlyFirstBar :: !(Maybe Text) -- ^ /ReadOnly/ "bar" , readOnlyFirstBaz :: !(Maybe Text) -- ^ "baz" } deriving (P.Show, P.Eq, P.Typeable) diff --git a/samples/client/petstore/haskell-http-client/stack.yaml b/samples/client/petstore/haskell-http-client/stack.yaml index ef3c63b223..7023285982 100644 --- a/samples/client/petstore/haskell-http-client/stack.yaml +++ b/samples/client/petstore/haskell-http-client/stack.yaml @@ -1,8 +1,7 @@ -resolver: lts-14.3 +resolver: lts-14.7 build: haddock-arguments: haddock-args: - "--odir=./docs" -extra-deps: [ katip-0.8.3.0 ] packages: - '.' diff --git a/samples/client/petstore/haskell-http-client/tests-integration/stack.yaml b/samples/client/petstore/haskell-http-client/tests-integration/stack.yaml index 31ae84e5f2..01febb980c 100644 --- a/samples/client/petstore/haskell-http-client/tests-integration/stack.yaml +++ b/samples/client/petstore/haskell-http-client/tests-integration/stack.yaml @@ -1,2 +1,2 @@ -resolver: lts-14.3 -extra-deps: [ '..', katip-0.8.3.0 ] +resolver: lts-14.7 +extra-deps: [ '..' ] diff --git a/samples/client/petstore/haskell-http-client/tests-integration/stack.yaml.lock b/samples/client/petstore/haskell-http-client/tests-integration/stack.yaml.lock index d4ba7488f1..8d6222267c 100644 --- a/samples/client/petstore/haskell-http-client/tests-integration/stack.yaml.lock +++ b/samples/client/petstore/haskell-http-client/tests-integration/stack.yaml.lock @@ -3,17 +3,10 @@ # For more information, please see the documentation at: # https://docs.haskellstack.org/en/stable/lock_files -packages: -- completed: - hackage: katip-0.8.3.0@sha256:8a67c0aec3ba1f0eabcfae443cb909e4cf9405e29bac99ccf1420f1f1bbda9c4,4097 - pantry-tree: - size: 1140 - sha256: cad8c67256ec85819309d77bdcbc15b67885940ef76f2b850c8be20c2efd0149 - original: - hackage: katip-0.8.3.0 +packages: [] snapshots: - completed: - size: 523878 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/3.yaml - sha256: 470c46c27746a48c7c50f829efc0cf00112787a7804ee4ac7a27754658f6d92c - original: lts-14.3 + size: 523700 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/7.yaml + sha256: 8e3f3c894be74d71fa4bf085e0a8baae7e4d7622d07ea31a52736b80f8b9bb1a + original: lts-14.7 diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle index 94d0029825..51158af50d 100644 --- a/samples/client/petstore/java/feign/build.gradle +++ b/samples/client/petstore/java/feign/build.gradle @@ -98,7 +98,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" threepane_version = "2.6.4" feign_version = "9.7.0" feign_form_version = "2.1.0" @@ -116,7 +116,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threepane_version" compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version" compile "com.brsanthu:migbase64:2.2" diff --git a/samples/client/petstore/java/feign10x/build.gradle b/samples/client/petstore/java/feign10x/build.gradle index 7aaee78ff4..0d6878503c 100644 --- a/samples/client/petstore/java/feign10x/build.gradle +++ b/samples/client/petstore/java/feign10x/build.gradle @@ -98,7 +98,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" threepane_version = "2.6.4" feign_version = "10.2.3" feign_form_version = "2.1.0" @@ -116,7 +116,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threepane_version" compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version" compile "com.brsanthu:migbase64:2.2" diff --git a/samples/client/petstore/java/google-api-client/build.gradle b/samples/client/petstore/java/google-api-client/build.gradle index 208d7a57dc..a16b641c1a 100644 --- a/samples/client/petstore/java/google-api-client/build.gradle +++ b/samples/client/petstore/java/google-api-client/build.gradle @@ -98,7 +98,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" google_api_client_version = "1.23.0" jersey_common_version = "2.25.1" jodatime_version = "2.9.9" @@ -115,7 +115,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version" testCompile "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/google-api-client/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/google-api-client/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/google-api-client/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/google-api-client/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/google-api-client/docs/Name.md b/samples/client/petstore/java/google-api-client/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/google-api-client/docs/Name.md +++ b/samples/client/petstore/java/google-api-client/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/google-api-client/docs/ReadOnlyFirst.md b/samples/client/petstore/java/google-api-client/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/google-api-client/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/google-api-client/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle index d372e03988..e94fca4449 100644 --- a/samples/client/petstore/java/jersey1/build.gradle +++ b/samples/client/petstore/java/jersey1/build.gradle @@ -114,7 +114,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.6.4" jackson_databind_version = "2.6.4" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" jersey_version = "1.19.4" jodatime_version = "2.9.9" junit_version = "4.12" @@ -129,7 +129,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_version" compile "com.brsanthu:migbase64:2.2" testCompile "junit:junit:$junit_version" diff --git a/samples/client/petstore/java/jersey1/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/jersey1/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/jersey1/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/jersey1/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/jersey1/docs/Name.md b/samples/client/petstore/java/jersey1/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/jersey1/docs/Name.md +++ b/samples/client/petstore/java/jersey1/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/jersey1/docs/ReadOnlyFirst.md b/samples/client/petstore/java/jersey1/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/jersey1/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/jersey1/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/jersey2-java6/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/jersey2-java6/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/jersey2-java6/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/jersey2-java6/docs/Name.md b/samples/client/petstore/java/jersey2-java6/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/Name.md +++ b/samples/client/petstore/java/jersey2-java6/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/jersey2-java6/docs/ReadOnlyFirst.md b/samples/client/petstore/java/jersey2-java6/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/jersey2-java6/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/jersey2-java8/build.gradle b/samples/client/petstore/java/jersey2-java8/build.gradle index 44798b9125..646b451a54 100644 --- a/samples/client/petstore/java/jersey2-java8/build.gradle +++ b/samples/client/petstore/java/jersey2-java8/build.gradle @@ -97,7 +97,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" jersey_version = "2.27" junit_version = "4.12" } @@ -111,7 +111,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" testCompile "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/jersey2-java8/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/jersey2-java8/docs/Name.md b/samples/client/petstore/java/jersey2-java8/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Name.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md b/samples/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/jersey2/build.gradle b/samples/client/petstore/java/jersey2/build.gradle index 9f9ce6cdf7..c94a36a9fa 100644 --- a/samples/client/petstore/java/jersey2/build.gradle +++ b/samples/client/petstore/java/jersey2/build.gradle @@ -97,7 +97,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" jersey_version = "2.27" junit_version = "4.12" threetenbp_version = "2.6.4" @@ -112,7 +112,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" compile "com.brsanthu:migbase64:2.2" testCompile "junit:junit:$junit_version" diff --git a/samples/client/petstore/java/jersey2/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/jersey2/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/jersey2/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/jersey2/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/jersey2/docs/Name.md b/samples/client/petstore/java/jersey2/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/jersey2/docs/Name.md +++ b/samples/client/petstore/java/jersey2/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/jersey2/docs/ReadOnlyFirst.md b/samples/client/petstore/java/jersey2/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/jersey2/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/jersey2/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/native/docs/Name.md b/samples/client/petstore/java/native/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/native/docs/Name.md +++ b/samples/client/petstore/java/native/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/native/docs/ReadOnlyFirst.md b/samples/client/petstore/java/native/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/native/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/native/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ReadOnlyFirst.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/okhttp-gson/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/okhttp-gson/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/okhttp-gson/docs/Name.md b/samples/client/petstore/java/okhttp-gson/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Name.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/okhttp-gson/docs/ReadOnlyFirst.md b/samples/client/petstore/java/okhttp-gson/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/rest-assured/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/rest-assured/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/rest-assured/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/rest-assured/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/rest-assured/docs/Name.md b/samples/client/petstore/java/rest-assured/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/rest-assured/docs/Name.md +++ b/samples/client/petstore/java/rest-assured/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/rest-assured/docs/ReadOnlyFirst.md b/samples/client/petstore/java/rest-assured/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/rest-assured/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/rest-assured/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/resteasy/build.gradle b/samples/client/petstore/java/resteasy/build.gradle index 0fa0a028d2..cbbbb51169 100644 --- a/samples/client/petstore/java/resteasy/build.gradle +++ b/samples/client/petstore/java/resteasy/build.gradle @@ -97,7 +97,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" threetenbp_version = "2.6.4" resteasy_version = "3.1.3.Final" jodatime_version = "2.9.9" @@ -114,7 +114,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" compile "joda-time:joda-time:$jodatime_version" compile "com.brsanthu:migbase64:2.2" diff --git a/samples/client/petstore/java/resteasy/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/resteasy/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/resteasy/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/resteasy/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/resteasy/docs/Name.md b/samples/client/petstore/java/resteasy/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/resteasy/docs/Name.md +++ b/samples/client/petstore/java/resteasy/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/resteasy/docs/ReadOnlyFirst.md b/samples/client/petstore/java/resteasy/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/resteasy/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/resteasy/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle index 6345e3b0f2..a1b680873b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/build.gradle +++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle @@ -98,7 +98,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" junit_version = "4.12" @@ -113,7 +113,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version" compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version" testCompile "junit:junit:$junit_version" diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/resttemplate-withXml/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Name.md b/samples/client/petstore/java/resttemplate-withXml/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Name.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ReadOnlyFirst.md b/samples/client/petstore/java/resttemplate-withXml/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java index 5d8fa7b9a8..007c0b9d7a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java @@ -91,9 +91,6 @@ public class ApiClient { private Map authentications; - private HttpStatus statusCode; - private MultiValueMap responseHeaders; - private DateFormat dateFormat; public ApiClient() { @@ -146,22 +143,6 @@ public class ApiClient { return this; } - /** - * Gets the status code of the previous request - * @return HttpStatus the status code - */ - public HttpStatus getStatusCode() { - return statusCode; - } - - /** - * Gets the response headers of the previous request - * @return MultiValueMap a map of response headers - */ - public MultiValueMap getResponseHeaders() { - return responseHeaders; - } - /** * Get authentications (key: authentication name, value: authentication). * @return Map the currently configured authentication types @@ -568,9 +549,9 @@ public class ApiClient { * @param contentType The request's Content-Type header * @param authNames The authentications to apply * @param returnType The return type into which to deserialize the response - * @return The response body in chosen type + * @return ResponseEntity<T> The response of the chosen type */ - public T invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + public ResponseEntity invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { updateParamsForAuth(authNames, queryParams, headerParams); final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path); @@ -612,16 +593,11 @@ public class ApiClient { ResponseEntity responseEntity = restTemplate.exchange(requestEntity, returnType); - statusCode = responseEntity.getStatusCode(); - responseHeaders = responseEntity.getHeaders(); - - if (responseEntity.getStatusCode() == HttpStatus.NO_CONTENT) { - return null; - } else if (responseEntity.getStatusCode().is2xxSuccessful()) { - return responseEntity.getBody(); + if (responseEntity.getStatusCode().is2xxSuccessful()) { + return responseEntity; } else { // The error handler built into the RestTemplate should handle 400 and 500 series errors. - throw new RestClientException("API returned " + statusCode + " and it wasn't handled by the RestTemplate error handler"); + throw new RestClientException("API returned " + responseEntity.getStatusCode() + " and it wasn't handled by the RestTemplate error handler"); } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index ffb5afa7d0..542171d1d5 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -24,6 +24,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.AnotherFakeApi") @@ -51,11 +52,23 @@ public class AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation - * @param body client model + * @param body client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ public Client call123testSpecialTags(Client body) throws RestClientException { + return call123testSpecialTagsWithHttpInfo(body).getBody(); + } + + /** + * To test special tags + * To test special tags and operation ID starting with number + *

200 - successful operation + * @param body client model (required) + * @return ResponseEntity<Client> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity call123testSpecialTagsWithHttpInfo(Client body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set 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 8b7f1118e5..73d0e62ffa 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 @@ -32,6 +32,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.FakeApi") @@ -59,10 +60,22 @@ public class FakeApi { * creates an XmlItem * this route creates an XmlItem *

200 - successful operation - * @param xmlItem XmlItem Body + * @param xmlItem XmlItem Body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void createXmlItem(XmlItem xmlItem) throws RestClientException { + createXmlItemWithHttpInfo(xmlItem); + } + + /** + * creates an XmlItem + * this route creates an XmlItem + *

200 - successful operation + * @param xmlItem XmlItem Body (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createXmlItemWithHttpInfo(XmlItem xmlItem) throws RestClientException { Object postBody = xmlItem; // verify the required parameter 'xmlItem' is set @@ -86,17 +99,29 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * Test serialization of outer boolean types *

200 - Output boolean - * @param body Input boolean as post body + * @param body Input boolean as post body (optional) * @return Boolean * @throws RestClientException if an error occurs while attempting to invoke the API */ public Boolean fakeOuterBooleanSerialize(Boolean body) throws RestClientException { + return fakeOuterBooleanSerializeWithHttpInfo(body).getBody(); + } + + /** + * + * Test serialization of outer boolean types + *

200 - Output boolean + * @param body Input boolean as post body (optional) + * @return ResponseEntity<Boolean> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws RestClientException { Object postBody = body; String path = apiClient.expandPath("/fake/outer/boolean", Collections.emptyMap()); @@ -121,11 +146,23 @@ public class FakeApi { * * Test serialization of object with outer number type *

200 - Output composite - * @param body Input composite as post body + * @param body Input composite as post body (optional) * @return OuterComposite * @throws RestClientException if an error occurs while attempting to invoke the API */ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws RestClientException { + return fakeOuterCompositeSerializeWithHttpInfo(body).getBody(); + } + + /** + * + * Test serialization of object with outer number type + *

200 - Output composite + * @param body Input composite as post body (optional) + * @return ResponseEntity<OuterComposite> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws RestClientException { Object postBody = body; String path = apiClient.expandPath("/fake/outer/composite", Collections.emptyMap()); @@ -150,11 +187,23 @@ public class FakeApi { * * Test serialization of outer number types *

200 - Output number - * @param body Input number as post body + * @param body Input number as post body (optional) * @return BigDecimal * @throws RestClientException if an error occurs while attempting to invoke the API */ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws RestClientException { + return fakeOuterNumberSerializeWithHttpInfo(body).getBody(); + } + + /** + * + * Test serialization of outer number types + *

200 - Output number + * @param body Input number as post body (optional) + * @return ResponseEntity<BigDecimal> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws RestClientException { Object postBody = body; String path = apiClient.expandPath("/fake/outer/number", Collections.emptyMap()); @@ -179,11 +228,23 @@ public class FakeApi { * * Test serialization of outer string types *

200 - Output string - * @param body Input string as post body + * @param body Input string as post body (optional) * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ public String fakeOuterStringSerialize(String body) throws RestClientException { + return fakeOuterStringSerializeWithHttpInfo(body).getBody(); + } + + /** + * + * Test serialization of outer string types + *

200 - Output string + * @param body Input string as post body (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeOuterStringSerializeWithHttpInfo(String body) throws RestClientException { Object postBody = body; String path = apiClient.expandPath("/fake/outer/string", Collections.emptyMap()); @@ -208,10 +269,22 @@ public class FakeApi { * * For this test, the body for this request much reference a schema named `File`. *

200 - Success - * @param body The body parameter + * @param body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testBodyWithFileSchema(FileSchemaTestClass body) throws RestClientException { + testBodyWithFileSchemaWithHttpInfo(body); + } + + /** + * + * For this test, the body for this request much reference a schema named `File`. + *

200 - Success + * @param body (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -235,17 +308,30 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * *

200 - Success - * @param query The query parameter - * @param body The body parameter + * @param query (required) + * @param body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testBodyWithQueryParams(String query, User body) throws RestClientException { + testBodyWithQueryParamsWithHttpInfo(query, body); + } + + /** + * + * + *

200 - Success + * @param query (required) + * @param body (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testBodyWithQueryParamsWithHttpInfo(String query, User body) throws RestClientException { Object postBody = body; // verify the required parameter 'query' is set @@ -276,17 +362,29 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * To test \"client\" model * To test \"client\" model *

200 - successful operation - * @param body client model + * @param body client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ public Client testClientModel(Client body) throws RestClientException { + return testClientModelWithHttpInfo(body).getBody(); + } + + /** + * To test \"client\" model + * To test \"client\" model + *

200 - successful operation + * @param body client model (required) + * @return ResponseEntity<Client> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testClientModelWithHttpInfo(Client body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -319,23 +417,49 @@ public class FakeApi { * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

400 - Invalid username supplied *

404 - User not found - * @param number None - * @param _double None - * @param patternWithoutDelimiter None - * @param _byte None - * @param integer None - * @param int32 None - * @param int64 None - * @param _float None - * @param string None - * @param binary None - * @param date None - * @param dateTime None - * @param password None - * @param paramCallback None + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws RestClientException { + testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } + + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + *

400 - Invalid username supplied + *

404 - User not found + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws RestClientException { Object postBody = null; // verify the required parameter 'number' is set @@ -403,24 +527,44 @@ public class FakeApi { String[] authNames = new String[] { "http_basic_test" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * To test enum parameters * To test enum parameters *

400 - Invalid request *

404 - Not found - * @param enumHeaderStringArray Header parameter enum test (string array) - * @param enumHeaderString Header parameter enum test (string) - * @param enumQueryStringArray Query parameter enum test (string array) - * @param enumQueryString Query parameter enum test (string) - * @param enumQueryInteger Query parameter enum test (double) - * @param enumQueryDouble Query parameter enum test (double) - * @param enumFormStringArray Form parameter enum test (string array) - * @param enumFormString Form parameter enum test (string) + * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<String>()) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<String>()) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws RestClientException { + testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } + + /** + * To test enum parameters + * To test enum parameters + *

400 - Invalid request + *

404 - Not found + * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<String>()) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<String>()) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws RestClientException { Object postBody = null; String path = apiClient.expandPath("/fake", Collections.emptyMap()); @@ -454,21 +598,38 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + 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 requiredStringGroup Required String in group parameters - * @param requiredBooleanGroup Required Boolean in group parameters - * @param requiredInt64Group Required Integer in group parameters - * @param stringGroup String in group parameters - * @param booleanGroup Boolean in group parameters - * @param int64Group Integer in group parameters + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { + testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + *

400 - Someting wrong + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { Object postBody = null; // verify the required parameter 'requiredStringGroup' is set @@ -510,16 +671,28 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * test inline additionalProperties * *

200 - successful operation - * @param param request body + * @param param request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testInlineAdditionalProperties(Map param) throws RestClientException { + testInlineAdditionalPropertiesWithHttpInfo(param); + } + + /** + * test inline additionalProperties + * + *

200 - successful operation + * @param param request body (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(Map param) throws RestClientException { Object postBody = param; // verify the required parameter 'param' is set @@ -543,17 +716,30 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * test json serialization of form data * *

200 - successful operation - * @param param field1 - * @param param2 field2 + * @param param field1 (required) + * @param param2 field2 (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testJsonFormData(String param, String param2) throws RestClientException { + testJsonFormDataWithHttpInfo(param, param2); + } + + /** + * test json serialization of form data + * + *

200 - successful operation + * @param param field1 (required) + * @param param2 field2 (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testJsonFormDataWithHttpInfo(String param, String param2) throws RestClientException { Object postBody = null; // verify the required parameter 'param' is set @@ -587,20 +773,36 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * To test the collection format in query parameters *

200 - Success - * @param pipe The pipe parameter - * @param ioutil The ioutil parameter - * @param http The http parameter - * @param url The url parameter - * @param context The context parameter + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws RestClientException { + testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + } + + /** + * + * To test the collection format in query parameters + *

200 - Success + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws RestClientException { Object postBody = null; // verify the required parameter 'pipe' is set @@ -648,6 +850,6 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index b619b51c26..74d86633d8 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -24,6 +24,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.FakeClassnameTags123Api") @@ -51,11 +52,23 @@ public class FakeClassnameTags123Api { * To test class name in snake case * To test class name in snake case *

200 - successful operation - * @param body client model + * @param body client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ public Client testClassname(Client body) throws RestClientException { + return testClassnameWithHttpInfo(body).getBody(); + } + + /** + * To test class name in snake case + * To test class name in snake case + *

200 - successful operation + * @param body client model (required) + * @return ResponseEntity<Client> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testClassnameWithHttpInfo(Client body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java index d012578f0f..31c2f785a2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java @@ -26,6 +26,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.PetApi") @@ -54,10 +55,23 @@ public class PetApi { * *

200 - successful operation *

405 - Invalid input - * @param body Pet object that needs to be added to the store + * @param body Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void addPet(Pet body) throws RestClientException { + addPetWithHttpInfo(body); + } + + /** + * Add a new pet to the store + * + *

200 - successful operation + *

405 - Invalid input + * @param body Pet object that needs to be added to the store (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity addPetWithHttpInfo(Pet body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -81,18 +95,32 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Deletes a pet * *

200 - successful operation *

400 - Invalid pet value - * @param petId Pet id to delete - * @param apiKey The apiKey parameter + * @param petId Pet id to delete (required) + * @param apiKey (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deletePet(Long petId, String apiKey) throws RestClientException { + deletePetWithHttpInfo(petId, apiKey); + } + + /** + * Deletes a pet + * + *

200 - successful operation + *

400 - Invalid pet value + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set @@ -120,18 +148,31 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Finds Pets by status * Multiple status values can be provided with comma separated strings *

200 - successful operation *

400 - Invalid status value - * @param status Status values that need to be considered for filter + * @param status Status values that need to be considered for filter (required) * @return List<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ public List findPetsByStatus(List status) throws RestClientException { + return findPetsByStatusWithHttpInfo(status).getBody(); + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + *

200 - successful operation + *

400 - Invalid status value + * @param status Status values that need to be considered for filter (required) + * @return ResponseEntity<List<Pet>> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity> findPetsByStatusWithHttpInfo(List status) throws RestClientException { Object postBody = null; // verify the required parameter 'status' is set @@ -164,11 +205,26 @@ public class PetApi { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. *

200 - successful operation *

400 - Invalid tag value - * @param tags Tags to filter by + * @param tags Tags to filter by (required) * @return List<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ + @Deprecated public List findPetsByTags(List tags) throws RestClientException { + return findPetsByTagsWithHttpInfo(tags).getBody(); + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + *

200 - successful operation + *

400 - Invalid tag value + * @param tags Tags to filter by (required) + * @return ResponseEntity<List<Pet>> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + @Deprecated + public ResponseEntity> findPetsByTagsWithHttpInfo(List tags) throws RestClientException { Object postBody = null; // verify the required parameter 'tags' is set @@ -202,11 +258,25 @@ public class PetApi { *

200 - successful operation *

400 - Invalid ID supplied *

404 - Pet not found - * @param petId ID of pet to return + * @param petId ID of pet to return (required) * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ public Pet getPetById(Long petId) throws RestClientException { + return getPetByIdWithHttpInfo(petId).getBody(); + } + + /** + * Find pet by ID + * Returns a single pet + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + * @param petId ID of pet to return (required) + * @return ResponseEntity<Pet> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set @@ -242,10 +312,25 @@ public class PetApi { *

400 - Invalid ID supplied *

404 - Pet not found *

405 - Validation exception - * @param body Pet object that needs to be added to the store + * @param body Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void updatePet(Pet body) throws RestClientException { + updatePetWithHttpInfo(body); + } + + /** + * Update an existing pet + * + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + *

405 - Validation exception + * @param body Pet object that needs to be added to the store (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity updatePetWithHttpInfo(Pet body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -269,18 +354,32 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Updates a pet in the store with form data * *

405 - Invalid input - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void updatePetWithForm(Long petId, String name, String status) throws RestClientException { + updatePetWithFormWithHttpInfo(petId, name, status); + } + + /** + * Updates a pet in the store with form data + * + *

405 - Invalid input + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set @@ -312,19 +411,33 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * uploads an image * *

200 - successful operation - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws RestClientException { + return uploadFileWithHttpInfo(petId, additionalMetadata, file).getBody(); + } + + /** + * uploads an image + * + *

200 - successful operation + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return ResponseEntity<ModelApiResponse> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set @@ -364,13 +477,27 @@ public class PetApi { * uploads an image (required) * *

200 - successful operation - * @param petId ID of pet to update - * @param requiredFile file to upload - * @param additionalMetadata Additional data to pass to server + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws RestClientException { + return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getBody(); + } + + /** + * uploads an image (required) + * + *

200 - successful operation + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return ResponseEntity<ModelApiResponse> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java index 4488bd0ae0..29b990a85d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java @@ -24,6 +24,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.StoreApi") @@ -52,10 +53,23 @@ public class StoreApi { * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors *

400 - Invalid ID supplied *

404 - Order not found - * @param orderId ID of the order that needs to be deleted + * @param orderId ID of the order that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deleteOrder(String orderId) throws RestClientException { + deleteOrderWithHttpInfo(orderId); + } + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of the order that needs to be deleted (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity deleteOrderWithHttpInfo(String orderId) throws RestClientException { Object postBody = null; // verify the required parameter 'orderId' is set @@ -80,7 +94,7 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Returns pet inventories by status @@ -90,6 +104,17 @@ public class StoreApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public Map getInventory() throws RestClientException { + return getInventoryWithHttpInfo().getBody(); + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + *

200 - successful operation + * @return ResponseEntity<Map<String, Integer>> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity> getInventoryWithHttpInfo() throws RestClientException { Object postBody = null; String path = apiClient.expandPath("/store/inventory", Collections.emptyMap()); @@ -116,11 +141,25 @@ public class StoreApi { *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found - * @param orderId ID of pet that needs to be fetched + * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ public Order getOrderById(Long orderId) throws RestClientException { + return getOrderByIdWithHttpInfo(orderId).getBody(); + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of pet that needs to be fetched (required) + * @return ResponseEntity<Order> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestClientException { Object postBody = null; // verify the required parameter 'orderId' is set @@ -154,11 +193,24 @@ public class StoreApi { * *

200 - successful operation *

400 - Invalid Order - * @param body order placed for purchasing the pet + * @param body order placed for purchasing the pet (required) * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ public Order placeOrder(Order body) throws RestClientException { + return placeOrderWithHttpInfo(body).getBody(); + } + + /** + * Place an order for a pet + * + *

200 - successful operation + *

400 - Invalid Order + * @param body order placed for purchasing the pet (required) + * @return ResponseEntity<Order> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity placeOrderWithHttpInfo(Order body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java index 1d2d59616b..66db8e8cd1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java @@ -24,6 +24,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.UserApi") @@ -51,10 +52,22 @@ public class UserApi { * Create user * This can only be done by the logged in user. *

0 - successful operation - * @param body Created user object + * @param body Created user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void createUser(User body) throws RestClientException { + createUserWithHttpInfo(body); + } + + /** + * Create user + * This can only be done by the logged in user. + *

0 - successful operation + * @param body Created user object (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createUserWithHttpInfo(User body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -76,16 +89,28 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object + * @param body List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void createUsersWithArrayInput(List body) throws RestClientException { + createUsersWithArrayInputWithHttpInfo(body); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param body List of user object (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createUsersWithArrayInputWithHttpInfo(List body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -107,16 +132,28 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object + * @param body List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void createUsersWithListInput(List body) throws RestClientException { + createUsersWithListInputWithHttpInfo(body); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param body List of user object (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createUsersWithListInputWithHttpInfo(List body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -138,17 +175,30 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Delete user * This can only be done by the logged in user. *

400 - Invalid username supplied *

404 - User not found - * @param username The name that needs to be deleted + * @param username The name that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deleteUser(String username) throws RestClientException { + deleteUserWithHttpInfo(username); + } + + /** + * Delete user + * This can only be done by the logged in user. + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be deleted (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity deleteUserWithHttpInfo(String username) throws RestClientException { Object postBody = null; // verify the required parameter 'username' is set @@ -173,7 +223,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Get user by user name @@ -181,11 +231,25 @@ public class UserApi { *

200 - successful operation *

400 - Invalid username supplied *

404 - User not found - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return User * @throws RestClientException if an error occurs while attempting to invoke the API */ public User getUserByName(String username) throws RestClientException { + return getUserByNameWithHttpInfo(username).getBody(); + } + + /** + * Get user by user name + * + *

200 - successful operation + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return ResponseEntity<User> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity getUserByNameWithHttpInfo(String username) throws RestClientException { Object postBody = null; // verify the required parameter 'username' is set @@ -219,12 +283,26 @@ public class UserApi { * *

200 - successful operation *

400 - Invalid username/password supplied - * @param username The user name for login - * @param password The password for login in clear text + * @param username The user name for login (required) + * @param password The password for login in clear text (required) * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ public String loginUser(String username, String password) throws RestClientException { + return loginUserWithHttpInfo(username, password).getBody(); + } + + /** + * Logs user into the system + * + *

200 - successful operation + *

400 - Invalid username/password supplied + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity loginUserWithHttpInfo(String username, String password) throws RestClientException { Object postBody = null; // verify the required parameter 'username' is set @@ -265,6 +343,17 @@ public class UserApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void logoutUser() throws RestClientException { + logoutUserWithHttpInfo(); + } + + /** + * Logs out current logged in user session + * + *

0 - successful operation + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity logoutUserWithHttpInfo() throws RestClientException { Object postBody = null; String path = apiClient.expandPath("/user/logout", Collections.emptyMap()); @@ -281,18 +370,32 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Updated user * This can only be done by the logged in user. *

400 - Invalid user supplied *

404 - User not found - * @param username name that need to be deleted - * @param body Updated user object + * @param username name that need to be deleted (required) + * @param body Updated user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void updateUser(String username, User body) throws RestClientException { + updateUserWithHttpInfo(username, body); + } + + /** + * Updated user + * This can only be done by the logged in user. + *

400 - Invalid user supplied + *

404 - User not found + * @param username name that need to be deleted (required) + * @param body Updated user object (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity updateUserWithHttpInfo(String username, User body) throws RestClientException { Object postBody = body; // verify the required parameter 'username' is set @@ -322,6 +425,6 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 1ab77fed73..8e7cbfcf1b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -38,8 +38,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "AdditionalPropertiesAnyType") public class AdditionalPropertiesAnyType extends HashMap { - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private String name; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 4c6150829c..21d7cddc97 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -39,8 +39,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "AdditionalPropertiesArray") public class AdditionalPropertiesArray extends HashMap { - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private String name; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index c4d8741f24..3d77005056 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -38,8 +38,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "AdditionalPropertiesBoolean") public class AdditionalPropertiesBoolean extends HashMap { - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private String name; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 893a831d60..323234e058 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -50,72 +50,72 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "AdditionalPropertiesClass") public class AdditionalPropertiesClass { + public static final String JSON_PROPERTY_MAP_STRING = "map_string"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=String @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; private Map mapString = null; + public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=BigDecimal @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; private Map mapNumber = null; + public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=Integer @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; private Map mapInteger = null; + public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=Boolean @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; private Map mapBoolean = null; + public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=List<Integer> @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; private Map> mapArrayInteger = null; + public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=List<Object> @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; private Map> mapArrayAnytype = null; + public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=Map<String, String> @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; private Map> mapMapString = null; + public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=Map<String, Object> @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - @XmlElement(name = "anytype_1") public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; + @XmlElement(name = "anytype_1") private Object anytype1; - @XmlElement(name = "anytype_2") public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; + @XmlElement(name = "anytype_2") private Object anytype2; - @XmlElement(name = "anytype_3") public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; + @XmlElement(name = "anytype_3") private Object anytype3; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index f6c3424388..a1697af5fd 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -38,8 +38,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "AdditionalPropertiesInteger") public class AdditionalPropertiesInteger extends HashMap { - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private String name; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index ae39a9f48e..2885d93234 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -39,8 +39,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "AdditionalPropertiesNumber") public class AdditionalPropertiesNumber extends HashMap { - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private String name; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 897018cb53..44b7e8f4c7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -38,8 +38,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "AdditionalPropertiesObject") public class AdditionalPropertiesObject extends HashMap { - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private String name; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index c8a94eea08..bc3f9aae25 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -38,8 +38,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "AdditionalPropertiesString") public class AdditionalPropertiesString extends HashMap { - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private String name; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java index 9265b5317e..1a1cba4a68 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java @@ -45,12 +45,12 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Animal") public class Animal { - @XmlElement(name = "className") public static final String JSON_PROPERTY_CLASS_NAME = "className"; + @XmlElement(name = "className") private String className; - @XmlElement(name = "color") public static final String JSON_PROPERTY_COLOR = "color"; + @XmlElement(name = "color") private String color = "red"; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 11ed5ea280..ff8f7245a2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -39,11 +39,11 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "ArrayOfArrayOfNumberOnly") public class ArrayOfArrayOfNumberOnly { + public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; // Is a container wrapped=false // items.name=arrayArrayNumber items.baseName=arrayArrayNumber items.xmlName= items.xmlNamespace= // items.example= items.type=List<BigDecimal> @XmlElement(name = "arrayArrayNumber") - public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; private List> arrayArrayNumber = null; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 6d8d8f6fdb..c20a3cce74 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -39,11 +39,11 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "ArrayOfNumberOnly") public class ArrayOfNumberOnly { + public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; // Is a container wrapped=false // items.name=arrayNumber items.baseName=arrayNumber items.xmlName= items.xmlNamespace= // items.example= items.type=BigDecimal @XmlElement(name = "arrayNumber") - public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; private List arrayNumber = null; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java index 5c82d3c89c..031eac54b2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -41,25 +41,25 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "ArrayTest") public class ArrayTest { + public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string"; // Is a container wrapped=false // items.name=arrayOfString items.baseName=arrayOfString items.xmlName= items.xmlNamespace= // items.example= items.type=String @XmlElement(name = "arrayOfString") - public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string"; private List arrayOfString = null; + public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer"; // Is a container wrapped=false // items.name=arrayArrayOfInteger items.baseName=arrayArrayOfInteger items.xmlName= items.xmlNamespace= // items.example= items.type=List<Long> @XmlElement(name = "arrayArrayOfInteger") - public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer"; private List> arrayArrayOfInteger = null; + public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; // Is a container wrapped=false // items.name=arrayArrayOfModel items.baseName=arrayArrayOfModel items.xmlName= items.xmlNamespace= // items.example= items.type=List<ReadOnlyFirst> @XmlElement(name = "arrayArrayOfModel") - public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; private List> arrayArrayOfModel = null; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java index 9dbf22d4cc..1ea4534169 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java @@ -41,28 +41,28 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Capitalization") public class Capitalization { - @XmlElement(name = "smallCamel") public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel"; + @XmlElement(name = "smallCamel") private String smallCamel; - @XmlElement(name = "CapitalCamel") public static final String JSON_PROPERTY_CAPITAL_CAMEL = "CapitalCamel"; + @XmlElement(name = "CapitalCamel") private String capitalCamel; - @XmlElement(name = "small_Snake") public static final String JSON_PROPERTY_SMALL_SNAKE = "small_Snake"; + @XmlElement(name = "small_Snake") private String smallSnake; - @XmlElement(name = "Capital_Snake") public static final String JSON_PROPERTY_CAPITAL_SNAKE = "Capital_Snake"; + @XmlElement(name = "Capital_Snake") private String capitalSnake; - @XmlElement(name = "SCA_ETH_Flow_Points") public static final String JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points"; + @XmlElement(name = "SCA_ETH_Flow_Points") private String scAETHFlowPoints; - @XmlElement(name = "ATT_NAME") public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME"; + @XmlElement(name = "ATT_NAME") private String ATT_NAME; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java index 914ae0e1d6..f674ee10cf 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java @@ -38,8 +38,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Cat") public class Cat extends Animal { - @XmlElement(name = "declawed") public static final String JSON_PROPERTY_DECLAWED = "declawed"; + @XmlElement(name = "declawed") private Boolean declawed; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java index d4787cee33..b932c985c3 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -36,8 +36,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "CatAllOf") public class CatAllOf { - @XmlElement(name = "declawed") public static final String JSON_PROPERTY_DECLAWED = "declawed"; + @XmlElement(name = "declawed") private Boolean declawed; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java index ba1daba690..5d6fed6ea9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java @@ -37,12 +37,12 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Category") public class Category { - @XmlElement(name = "id") public static final String JSON_PROPERTY_ID = "id"; + @XmlElement(name = "id") private Long id; - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private String name = "default-name"; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java index 25d9c8d4f0..391d133453 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java @@ -37,8 +37,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "ClassModel") public class ClassModel { - @XmlElement(name = "_class") public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class"; + @XmlElement(name = "_class") private String propertyClass; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java index ecb934696f..bedf7d9c43 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java @@ -36,8 +36,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Client") public class Client { - @XmlElement(name = "client") public static final String JSON_PROPERTY_CLIENT = "client"; + @XmlElement(name = "client") private String client; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java index 0e198c2302..873dc14118 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java @@ -38,8 +38,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Dog") public class Dog extends Animal { - @XmlElement(name = "breed") public static final String JSON_PROPERTY_BREED = "breed"; + @XmlElement(name = "breed") private String breed; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java index f413def1dc..3b05cc3bd3 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -36,8 +36,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "DogAllOf") public class DogAllOf { - @XmlElement(name = "breed") public static final String JSON_PROPERTY_BREED = "breed"; + @XmlElement(name = "breed") private String breed; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java index 64939f3923..49d707b1ee 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -74,8 +74,8 @@ public class EnumArrays { } } - @XmlElement(name = "just_symbol") public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol"; + @XmlElement(name = "just_symbol") private JustSymbolEnum justSymbol; /** @@ -113,11 +113,11 @@ public class EnumArrays { } } + public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; // Is a container wrapped=false // items.name=arrayEnum items.baseName=arrayEnum items.xmlName= items.xmlNamespace= // items.example= items.type=String @XmlElement(name = "arrayEnum") - public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; private List arrayEnum = null; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java index 0e979e564c..2027735cb9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java @@ -78,8 +78,8 @@ public class EnumTest { } } - @XmlElement(name = "enum_string") public static final String JSON_PROPERTY_ENUM_STRING = "enum_string"; + @XmlElement(name = "enum_string") private EnumStringEnum enumString; /** @@ -119,8 +119,8 @@ public class EnumTest { } } - @XmlElement(name = "enum_string_required") public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required"; + @XmlElement(name = "enum_string_required") private EnumStringRequiredEnum enumStringRequired; /** @@ -158,8 +158,8 @@ public class EnumTest { } } - @XmlElement(name = "enum_integer") public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer"; + @XmlElement(name = "enum_integer") private EnumIntegerEnum enumInteger; /** @@ -197,12 +197,12 @@ public class EnumTest { } } - @XmlElement(name = "enum_number") public static final String JSON_PROPERTY_ENUM_NUMBER = "enum_number"; + @XmlElement(name = "enum_number") private EnumNumberEnum enumNumber; - @XmlElement(name = "outerEnum") public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; + @XmlElement(name = "outerEnum") private OuterEnum outerEnum; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 9690372c1c..99e581462c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -39,15 +39,15 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "FileSchemaTestClass") public class FileSchemaTestClass { - @XmlElement(name = "file") public static final String JSON_PROPERTY_FILE = "file"; + @XmlElement(name = "file") private java.io.File file; + public static final String JSON_PROPERTY_FILES = "files"; // Is a container wrapped=false // items.name=files items.baseName=files items.xmlName= items.xmlNamespace= // items.example= items.type=java.io.File @XmlElement(name = "files") - public static final String JSON_PROPERTY_FILES = "files"; private List files = null; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java index ecd05624e4..3c8b4fcb26 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java @@ -54,60 +54,60 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "FormatTest") public class FormatTest { - @XmlElement(name = "integer") public static final String JSON_PROPERTY_INTEGER = "integer"; + @XmlElement(name = "integer") private Integer integer; - @XmlElement(name = "int32") public static final String JSON_PROPERTY_INT32 = "int32"; + @XmlElement(name = "int32") private Integer int32; - @XmlElement(name = "int64") public static final String JSON_PROPERTY_INT64 = "int64"; + @XmlElement(name = "int64") private Long int64; - @XmlElement(name = "number") public static final String JSON_PROPERTY_NUMBER = "number"; + @XmlElement(name = "number") private BigDecimal number; - @XmlElement(name = "float") public static final String JSON_PROPERTY_FLOAT = "float"; + @XmlElement(name = "float") private Float _float; - @XmlElement(name = "double") public static final String JSON_PROPERTY_DOUBLE = "double"; + @XmlElement(name = "double") private Double _double; - @XmlElement(name = "string") public static final String JSON_PROPERTY_STRING = "string"; + @XmlElement(name = "string") private String string; - @XmlElement(name = "byte") public static final String JSON_PROPERTY_BYTE = "byte"; + @XmlElement(name = "byte") private byte[] _byte; - @XmlElement(name = "binary") public static final String JSON_PROPERTY_BINARY = "binary"; + @XmlElement(name = "binary") private File binary; - @XmlElement(name = "date") public static final String JSON_PROPERTY_DATE = "date"; + @XmlElement(name = "date") private LocalDate date; - @XmlElement(name = "dateTime") public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; + @XmlElement(name = "dateTime") private OffsetDateTime dateTime; - @XmlElement(name = "uuid") public static final String JSON_PROPERTY_UUID = "uuid"; + @XmlElement(name = "uuid") private UUID uuid; - @XmlElement(name = "password") public static final String JSON_PROPERTY_PASSWORD = "password"; + @XmlElement(name = "password") private String password; - @XmlElement(name = "BigDecimal") public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; + @XmlElement(name = "BigDecimal") private BigDecimal bigDecimal; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index b7770eed1b..b3b1db0f33 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -37,12 +37,12 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "HasOnlyReadOnly") public class HasOnlyReadOnly { - @XmlElement(name = "bar") public static final String JSON_PROPERTY_BAR = "bar"; + @XmlElement(name = "bar") private String bar; - @XmlElement(name = "foo") public static final String JSON_PROPERTY_FOO = "foo"; + @XmlElement(name = "foo") private String foo; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java index d309e855cf..3a418ffb13 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java @@ -42,11 +42,11 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "MapTest") public class MapTest { + public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=Map<String, String> @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string"; private Map> mapMapOfString = null; /** @@ -84,25 +84,25 @@ public class MapTest { } } + public static final String JSON_PROPERTY_MAP_OF_ENUM_STRING = "map_of_enum_string"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=String @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP_OF_ENUM_STRING = "map_of_enum_string"; private Map mapOfEnumString = null; + public static final String JSON_PROPERTY_DIRECT_MAP = "direct_map"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=Boolean @XmlElement(name = "inner") - public static final String JSON_PROPERTY_DIRECT_MAP = "direct_map"; private Map directMap = null; + public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=Boolean @XmlElement(name = "inner") - public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; private Map indirectMap = null; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 94d3c51ce1..8270fdd3d0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -44,19 +44,19 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "MixedPropertiesAndAdditionalPropertiesClass") public class MixedPropertiesAndAdditionalPropertiesClass { - @XmlElement(name = "uuid") public static final String JSON_PROPERTY_UUID = "uuid"; + @XmlElement(name = "uuid") private UUID uuid; - @XmlElement(name = "dateTime") public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; + @XmlElement(name = "dateTime") private OffsetDateTime dateTime; + public static final String JSON_PROPERTY_MAP = "map"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=Animal @XmlElement(name = "inner") - public static final String JSON_PROPERTY_MAP = "map"; private Map map = null; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java index 255a2fe8c7..c4f17d9a85 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java @@ -38,12 +38,12 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Name") public class Model200Response { - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private Integer name; - @XmlElement(name = "class") public static final String JSON_PROPERTY_PROPERTY_CLASS = "class"; + @XmlElement(name = "class") private String propertyClass; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 5b968f3aac..7ca9db8015 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -38,16 +38,16 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "ModelApiResponse") public class ModelApiResponse { - @XmlElement(name = "code") public static final String JSON_PROPERTY_CODE = "code"; + @XmlElement(name = "code") private Integer code; - @XmlElement(name = "type") public static final String JSON_PROPERTY_TYPE = "type"; + @XmlElement(name = "type") private String type; - @XmlElement(name = "message") public static final String JSON_PROPERTY_MESSAGE = "message"; + @XmlElement(name = "message") private String message; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java index 20deeb9358..fa74761c4e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -37,8 +37,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Return") public class ModelReturn { - @XmlElement(name = "return") public static final String JSON_PROPERTY_RETURN = "return"; + @XmlElement(name = "return") private Integer _return; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java index 5a9d2d1803..f994999665 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java @@ -40,20 +40,20 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Name") public class Name { - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private Integer name; - @XmlElement(name = "snake_case") public static final String JSON_PROPERTY_SNAKE_CASE = "snake_case"; + @XmlElement(name = "snake_case") private Integer snakeCase; - @XmlElement(name = "property") public static final String JSON_PROPERTY_PROPERTY = "property"; + @XmlElement(name = "property") private String property; - @XmlElement(name = "123Number") public static final String JSON_PROPERTY_123NUMBER = "123Number"; + @XmlElement(name = "123Number") private Integer _123number; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java index 80346db3f8..57227fd93d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -37,8 +37,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "NumberOnly") public class NumberOnly { - @XmlElement(name = "JustNumber") public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber"; + @XmlElement(name = "JustNumber") private BigDecimal justNumber; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java index 18ab19f967..42b0244a11 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java @@ -42,20 +42,20 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Order") public class Order { - @XmlElement(name = "id") public static final String JSON_PROPERTY_ID = "id"; + @XmlElement(name = "id") private Long id; - @XmlElement(name = "petId") public static final String JSON_PROPERTY_PET_ID = "petId"; + @XmlElement(name = "petId") private Long petId; - @XmlElement(name = "quantity") public static final String JSON_PROPERTY_QUANTITY = "quantity"; + @XmlElement(name = "quantity") private Integer quantity; - @XmlElement(name = "shipDate") public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; + @XmlElement(name = "shipDate") private OffsetDateTime shipDate; /** @@ -95,12 +95,12 @@ public class Order { } } - @XmlElement(name = "status") public static final String JSON_PROPERTY_STATUS = "status"; + @XmlElement(name = "status") private StatusEnum status; - @XmlElement(name = "complete") public static final String JSON_PROPERTY_COMPLETE = "complete"; + @XmlElement(name = "complete") private Boolean complete = false; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java index 77f0ff1aba..5ffdea475d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -39,16 +39,16 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "OuterComposite") public class OuterComposite { - @XmlElement(name = "my_number") public static final String JSON_PROPERTY_MY_NUMBER = "my_number"; + @XmlElement(name = "my_number") private BigDecimal myNumber; - @XmlElement(name = "my_string") public static final String JSON_PROPERTY_MY_STRING = "my_string"; + @XmlElement(name = "my_string") private String myString; - @XmlElement(name = "my_boolean") public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean"; + @XmlElement(name = "my_boolean") private Boolean myBoolean; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java index 98bcda421f..065a511093 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java @@ -45,32 +45,32 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Pet") public class Pet { - @XmlElement(name = "id") public static final String JSON_PROPERTY_ID = "id"; + @XmlElement(name = "id") private Long id; - @XmlElement(name = "category") public static final String JSON_PROPERTY_CATEGORY = "category"; + @XmlElement(name = "category") private Category category; - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private String name; + public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; // Is a container wrapped=true // items.name=photoUrls items.baseName=photoUrls items.xmlName= items.xmlNamespace= // items.example= items.type=String @XmlElement(name = "photoUrls") @XmlElementWrapper(name = "photoUrl") - public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; private List photoUrls = new ArrayList(); + public static final String JSON_PROPERTY_TAGS = "tags"; // Is a container wrapped=true // items.name=tags items.baseName=tags items.xmlName= items.xmlNamespace= // items.example= items.type=Tag @XmlElement(name = "tags") @XmlElementWrapper(name = "tag") - public static final String JSON_PROPERTY_TAGS = "tags"; private List tags = null; /** @@ -110,8 +110,8 @@ public class Pet { } } - @XmlElement(name = "status") public static final String JSON_PROPERTY_STATUS = "status"; + @XmlElement(name = "status") private StatusEnum status; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 6b9493b228..3221e8a62b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -37,12 +37,12 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "ReadOnlyFirst") public class ReadOnlyFirst { - @XmlElement(name = "bar") public static final String JSON_PROPERTY_BAR = "bar"; + @XmlElement(name = "bar") private String bar; - @XmlElement(name = "baz") public static final String JSON_PROPERTY_BAZ = "baz"; + @XmlElement(name = "baz") private String baz; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java index 8c48493002..1c7603ec4d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -36,8 +36,8 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "$special[model.name]") public class SpecialModelName { - @XmlElement(name = "$special[property.name]") public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; + @XmlElement(name = "$special[property.name]") private Long $specialPropertyName; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java index 376ac030ed..54a473f799 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java @@ -37,12 +37,12 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Tag") public class Tag { - @XmlElement(name = "id") public static final String JSON_PROPERTY_ID = "id"; + @XmlElement(name = "id") private Long id; - @XmlElement(name = "name") public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") private String name; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 74894489c0..923a0522f4 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -43,27 +43,27 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "TypeHolderDefault") public class TypeHolderDefault { - @XmlElement(name = "string_item") public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; + @XmlElement(name = "string_item") private String stringItem = "what"; - @XmlElement(name = "number_item") public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; + @XmlElement(name = "number_item") private BigDecimal numberItem; - @XmlElement(name = "integer_item") public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; + @XmlElement(name = "integer_item") private Integer integerItem; - @XmlElement(name = "bool_item") public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; + @XmlElement(name = "bool_item") private Boolean boolItem = true; + public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; // Is a container wrapped=false // items.name=arrayItem items.baseName=arrayItem items.xmlName= items.xmlNamespace= // items.example= items.type=Integer @XmlElement(name = "arrayItem") - public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; private List arrayItem = new ArrayList(); diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 7508b3fe96..e8f4586991 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -44,31 +44,31 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "TypeHolderExample") public class TypeHolderExample { - @XmlElement(name = "string_item") public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; + @XmlElement(name = "string_item") private String stringItem; - @XmlElement(name = "number_item") public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; + @XmlElement(name = "number_item") private BigDecimal numberItem; - @XmlElement(name = "float_item") public static final String JSON_PROPERTY_FLOAT_ITEM = "float_item"; + @XmlElement(name = "float_item") private Float floatItem; - @XmlElement(name = "integer_item") public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; + @XmlElement(name = "integer_item") private Integer integerItem; - @XmlElement(name = "bool_item") public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; + @XmlElement(name = "bool_item") private Boolean boolItem; + public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; // Is a container wrapped=false // items.name=arrayItem items.baseName=arrayItem items.xmlName= items.xmlNamespace= // items.example= items.type=Integer @XmlElement(name = "arrayItem") - public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; private List arrayItem = new ArrayList(); diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java index 6bd7b43bc9..ffe7d14f3b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java @@ -43,36 +43,36 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "User") public class User { - @XmlElement(name = "id") public static final String JSON_PROPERTY_ID = "id"; + @XmlElement(name = "id") private Long id; - @XmlElement(name = "username") public static final String JSON_PROPERTY_USERNAME = "username"; + @XmlElement(name = "username") private String username; - @XmlElement(name = "firstName") public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + @XmlElement(name = "firstName") private String firstName; - @XmlElement(name = "lastName") public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + @XmlElement(name = "lastName") private String lastName; - @XmlElement(name = "email") public static final String JSON_PROPERTY_EMAIL = "email"; + @XmlElement(name = "email") private String email; - @XmlElement(name = "password") public static final String JSON_PROPERTY_PASSWORD = "password"; + @XmlElement(name = "password") private String password; - @XmlElement(name = "phone") public static final String JSON_PROPERTY_PHONE = "phone"; + @XmlElement(name = "phone") private String phone; - @XmlElement(name = "userStatus") public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; + @XmlElement(name = "userStatus") private Integer userStatus; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java index 37e961474b..5bdc87bc36 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java @@ -67,152 +67,152 @@ import javax.xml.bind.annotation.*; @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(namespace="http://a.com/schema", localName = "XmlItem") public class XmlItem { - @XmlAttribute(name = "attribute_string") public static final String JSON_PROPERTY_ATTRIBUTE_STRING = "attribute_string"; + @XmlAttribute(name = "attribute_string") private String attributeString; - @XmlAttribute(name = "attribute_number") public static final String JSON_PROPERTY_ATTRIBUTE_NUMBER = "attribute_number"; + @XmlAttribute(name = "attribute_number") private BigDecimal attributeNumber; - @XmlAttribute(name = "attribute_integer") public static final String JSON_PROPERTY_ATTRIBUTE_INTEGER = "attribute_integer"; + @XmlAttribute(name = "attribute_integer") private Integer attributeInteger; - @XmlAttribute(name = "attribute_boolean") public static final String JSON_PROPERTY_ATTRIBUTE_BOOLEAN = "attribute_boolean"; + @XmlAttribute(name = "attribute_boolean") private Boolean attributeBoolean; + public static final String JSON_PROPERTY_WRAPPED_ARRAY = "wrapped_array"; // Is a container wrapped=true // items.name=wrappedArray items.baseName=wrappedArray items.xmlName= items.xmlNamespace= // items.example= items.type=Integer @XmlElement(name = "wrappedArray") @XmlElementWrapper(name = "wrapped_array") - public static final String JSON_PROPERTY_WRAPPED_ARRAY = "wrapped_array"; private List wrappedArray = null; - @XmlElement(name = "xml_name_string") public static final String JSON_PROPERTY_NAME_STRING = "name_string"; + @XmlElement(name = "xml_name_string") private String nameString; - @XmlElement(name = "xml_name_number") public static final String JSON_PROPERTY_NAME_NUMBER = "name_number"; + @XmlElement(name = "xml_name_number") private BigDecimal nameNumber; - @XmlElement(name = "xml_name_integer") public static final String JSON_PROPERTY_NAME_INTEGER = "name_integer"; + @XmlElement(name = "xml_name_integer") private Integer nameInteger; - @XmlElement(name = "xml_name_boolean") public static final String JSON_PROPERTY_NAME_BOOLEAN = "name_boolean"; + @XmlElement(name = "xml_name_boolean") private Boolean nameBoolean; + public static final String JSON_PROPERTY_NAME_ARRAY = "name_array"; // Is a container wrapped=false // items.name=nameArray items.baseName=nameArray items.xmlName=xml_name_array_item items.xmlNamespace= // items.example= items.type=Integer @XmlElement(name = "xml_name_array_item") - public static final String JSON_PROPERTY_NAME_ARRAY = "name_array"; private List nameArray = null; + public static final String JSON_PROPERTY_NAME_WRAPPED_ARRAY = "name_wrapped_array"; // Is a container wrapped=true // items.name=nameWrappedArray items.baseName=nameWrappedArray items.xmlName=xml_name_wrapped_array_item items.xmlNamespace= // items.example= items.type=Integer @XmlElement(name = "xml_name_wrapped_array_item") @XmlElementWrapper(name = "xml_name_wrapped_array") - public static final String JSON_PROPERTY_NAME_WRAPPED_ARRAY = "name_wrapped_array"; private List nameWrappedArray = null; - @XmlElement(name = "prefix_string") public static final String JSON_PROPERTY_PREFIX_STRING = "prefix_string"; + @XmlElement(name = "prefix_string") private String prefixString; - @XmlElement(name = "prefix_number") public static final String JSON_PROPERTY_PREFIX_NUMBER = "prefix_number"; + @XmlElement(name = "prefix_number") private BigDecimal prefixNumber; - @XmlElement(name = "prefix_integer") public static final String JSON_PROPERTY_PREFIX_INTEGER = "prefix_integer"; + @XmlElement(name = "prefix_integer") private Integer prefixInteger; - @XmlElement(name = "prefix_boolean") public static final String JSON_PROPERTY_PREFIX_BOOLEAN = "prefix_boolean"; + @XmlElement(name = "prefix_boolean") private Boolean prefixBoolean; + public static final String JSON_PROPERTY_PREFIX_ARRAY = "prefix_array"; // Is a container wrapped=false // items.name=prefixArray items.baseName=prefixArray items.xmlName= items.xmlNamespace= // items.example= items.type=Integer @XmlElement(name = "prefixArray") - public static final String JSON_PROPERTY_PREFIX_ARRAY = "prefix_array"; private List prefixArray = null; + public static final String JSON_PROPERTY_PREFIX_WRAPPED_ARRAY = "prefix_wrapped_array"; // Is a container wrapped=true // items.name=prefixWrappedArray items.baseName=prefixWrappedArray items.xmlName= items.xmlNamespace= // items.example= items.type=Integer @XmlElement(name = "prefixWrappedArray") @XmlElementWrapper(name = "prefix_wrapped_array") - public static final String JSON_PROPERTY_PREFIX_WRAPPED_ARRAY = "prefix_wrapped_array"; private List prefixWrappedArray = null; - @XmlElement(namespace="http://a.com/schema", name = "namespace_string") public static final String JSON_PROPERTY_NAMESPACE_STRING = "namespace_string"; + @XmlElement(namespace="http://a.com/schema", name = "namespace_string") private String namespaceString; - @XmlElement(namespace="http://b.com/schema", name = "namespace_number") public static final String JSON_PROPERTY_NAMESPACE_NUMBER = "namespace_number"; + @XmlElement(namespace="http://b.com/schema", name = "namespace_number") private BigDecimal namespaceNumber; - @XmlElement(namespace="http://c.com/schema", name = "namespace_integer") public static final String JSON_PROPERTY_NAMESPACE_INTEGER = "namespace_integer"; + @XmlElement(namespace="http://c.com/schema", name = "namespace_integer") private Integer namespaceInteger; - @XmlElement(namespace="http://d.com/schema", name = "namespace_boolean") public static final String JSON_PROPERTY_NAMESPACE_BOOLEAN = "namespace_boolean"; + @XmlElement(namespace="http://d.com/schema", name = "namespace_boolean") private Boolean namespaceBoolean; + public static final String JSON_PROPERTY_NAMESPACE_ARRAY = "namespace_array"; // Is a container wrapped=false // items.name=namespaceArray items.baseName=namespaceArray items.xmlName= items.xmlNamespace=http://e.com/schema // items.example= items.type=Integer @XmlElement(namespace="http://e.com/schema", name = "namespaceArray") - public static final String JSON_PROPERTY_NAMESPACE_ARRAY = "namespace_array"; private List namespaceArray = null; + public static final String JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY = "namespace_wrapped_array"; // Is a container wrapped=true // items.name=namespaceWrappedArray items.baseName=namespaceWrappedArray items.xmlName= items.xmlNamespace=http://g.com/schema // items.example= items.type=Integer @XmlElement(namespace="http://g.com/schema", name = "namespaceWrappedArray") @XmlElementWrapper(namespace="http://f.com/schema", name = "namespace_wrapped_array") - public static final String JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY = "namespace_wrapped_array"; private List namespaceWrappedArray = null; - @XmlElement(namespace="http://a.com/schema", name = "prefix_ns_string") public static final String JSON_PROPERTY_PREFIX_NS_STRING = "prefix_ns_string"; + @XmlElement(namespace="http://a.com/schema", name = "prefix_ns_string") private String prefixNsString; - @XmlElement(namespace="http://b.com/schema", name = "prefix_ns_number") public static final String JSON_PROPERTY_PREFIX_NS_NUMBER = "prefix_ns_number"; + @XmlElement(namespace="http://b.com/schema", name = "prefix_ns_number") private BigDecimal prefixNsNumber; - @XmlElement(namespace="http://c.com/schema", name = "prefix_ns_integer") public static final String JSON_PROPERTY_PREFIX_NS_INTEGER = "prefix_ns_integer"; + @XmlElement(namespace="http://c.com/schema", name = "prefix_ns_integer") private Integer prefixNsInteger; - @XmlElement(namespace="http://d.com/schema", name = "prefix_ns_boolean") public static final String JSON_PROPERTY_PREFIX_NS_BOOLEAN = "prefix_ns_boolean"; + @XmlElement(namespace="http://d.com/schema", name = "prefix_ns_boolean") private Boolean prefixNsBoolean; + public static final String JSON_PROPERTY_PREFIX_NS_ARRAY = "prefix_ns_array"; // Is a container wrapped=false // items.name=prefixNsArray items.baseName=prefixNsArray items.xmlName= items.xmlNamespace=http://e.com/schema // items.example= items.type=Integer @XmlElement(namespace="http://e.com/schema", name = "prefixNsArray") - public static final String JSON_PROPERTY_PREFIX_NS_ARRAY = "prefix_ns_array"; private List prefixNsArray = null; + public static final String JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY = "prefix_ns_wrapped_array"; // Is a container wrapped=true // items.name=prefixNsWrappedArray items.baseName=prefixNsWrappedArray items.xmlName= items.xmlNamespace=http://g.com/schema // items.example= items.type=Integer @XmlElement(namespace="http://g.com/schema", name = "prefixNsWrappedArray") @XmlElementWrapper(namespace="http://f.com/schema", name = "prefix_ns_wrapped_array") - public static final String JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY = "prefix_ns_wrapped_array"; private List prefixNsWrappedArray = null; diff --git a/samples/client/petstore/java/resttemplate/build.gradle b/samples/client/petstore/java/resttemplate/build.gradle index 6081aaded2..7c26e09874 100644 --- a/samples/client/petstore/java/resttemplate/build.gradle +++ b/samples/client/petstore/java/resttemplate/build.gradle @@ -98,7 +98,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" junit_version = "4.12" @@ -113,7 +113,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version" testCompile "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/resttemplate/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/resttemplate/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/resttemplate/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/resttemplate/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/resttemplate/docs/Name.md b/samples/client/petstore/java/resttemplate/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/resttemplate/docs/Name.md +++ b/samples/client/petstore/java/resttemplate/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/resttemplate/docs/ReadOnlyFirst.md b/samples/client/petstore/java/resttemplate/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/resttemplate/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/resttemplate/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java index 264ea075d1..5915c3dc66 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java @@ -86,9 +86,6 @@ public class ApiClient { private Map authentications; - private HttpStatus statusCode; - private MultiValueMap responseHeaders; - private DateFormat dateFormat; public ApiClient() { @@ -141,22 +138,6 @@ public class ApiClient { return this; } - /** - * Gets the status code of the previous request - * @return HttpStatus the status code - */ - public HttpStatus getStatusCode() { - return statusCode; - } - - /** - * Gets the response headers of the previous request - * @return MultiValueMap a map of response headers - */ - public MultiValueMap getResponseHeaders() { - return responseHeaders; - } - /** * Get authentications (key: authentication name, value: authentication). * @return Map the currently configured authentication types @@ -563,9 +544,9 @@ public class ApiClient { * @param contentType The request's Content-Type header * @param authNames The authentications to apply * @param returnType The return type into which to deserialize the response - * @return The response body in chosen type + * @return ResponseEntity<T> The response of the chosen type */ - public T invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + public ResponseEntity invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { updateParamsForAuth(authNames, queryParams, headerParams); final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path); @@ -607,16 +588,11 @@ public class ApiClient { ResponseEntity responseEntity = restTemplate.exchange(requestEntity, returnType); - statusCode = responseEntity.getStatusCode(); - responseHeaders = responseEntity.getHeaders(); - - if (responseEntity.getStatusCode() == HttpStatus.NO_CONTENT) { - return null; - } else if (responseEntity.getStatusCode().is2xxSuccessful()) { - return responseEntity.getBody(); + if (responseEntity.getStatusCode().is2xxSuccessful()) { + return responseEntity; } else { // The error handler built into the RestTemplate should handle 400 and 500 series errors. - throw new RestClientException("API returned " + statusCode + " and it wasn't handled by the RestTemplate error handler"); + throw new RestClientException("API returned " + responseEntity.getStatusCode() + " and it wasn't handled by the RestTemplate error handler"); } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index ffb5afa7d0..542171d1d5 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -24,6 +24,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.AnotherFakeApi") @@ -51,11 +52,23 @@ public class AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation - * @param body client model + * @param body client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ public Client call123testSpecialTags(Client body) throws RestClientException { + return call123testSpecialTagsWithHttpInfo(body).getBody(); + } + + /** + * To test special tags + * To test special tags and operation ID starting with number + *

200 - successful operation + * @param body client model (required) + * @return ResponseEntity<Client> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity call123testSpecialTagsWithHttpInfo(Client body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set 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 8b7f1118e5..73d0e62ffa 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 @@ -32,6 +32,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.FakeApi") @@ -59,10 +60,22 @@ public class FakeApi { * creates an XmlItem * this route creates an XmlItem *

200 - successful operation - * @param xmlItem XmlItem Body + * @param xmlItem XmlItem Body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void createXmlItem(XmlItem xmlItem) throws RestClientException { + createXmlItemWithHttpInfo(xmlItem); + } + + /** + * creates an XmlItem + * this route creates an XmlItem + *

200 - successful operation + * @param xmlItem XmlItem Body (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createXmlItemWithHttpInfo(XmlItem xmlItem) throws RestClientException { Object postBody = xmlItem; // verify the required parameter 'xmlItem' is set @@ -86,17 +99,29 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * Test serialization of outer boolean types *

200 - Output boolean - * @param body Input boolean as post body + * @param body Input boolean as post body (optional) * @return Boolean * @throws RestClientException if an error occurs while attempting to invoke the API */ public Boolean fakeOuterBooleanSerialize(Boolean body) throws RestClientException { + return fakeOuterBooleanSerializeWithHttpInfo(body).getBody(); + } + + /** + * + * Test serialization of outer boolean types + *

200 - Output boolean + * @param body Input boolean as post body (optional) + * @return ResponseEntity<Boolean> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws RestClientException { Object postBody = body; String path = apiClient.expandPath("/fake/outer/boolean", Collections.emptyMap()); @@ -121,11 +146,23 @@ public class FakeApi { * * Test serialization of object with outer number type *

200 - Output composite - * @param body Input composite as post body + * @param body Input composite as post body (optional) * @return OuterComposite * @throws RestClientException if an error occurs while attempting to invoke the API */ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws RestClientException { + return fakeOuterCompositeSerializeWithHttpInfo(body).getBody(); + } + + /** + * + * Test serialization of object with outer number type + *

200 - Output composite + * @param body Input composite as post body (optional) + * @return ResponseEntity<OuterComposite> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws RestClientException { Object postBody = body; String path = apiClient.expandPath("/fake/outer/composite", Collections.emptyMap()); @@ -150,11 +187,23 @@ public class FakeApi { * * Test serialization of outer number types *

200 - Output number - * @param body Input number as post body + * @param body Input number as post body (optional) * @return BigDecimal * @throws RestClientException if an error occurs while attempting to invoke the API */ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws RestClientException { + return fakeOuterNumberSerializeWithHttpInfo(body).getBody(); + } + + /** + * + * Test serialization of outer number types + *

200 - Output number + * @param body Input number as post body (optional) + * @return ResponseEntity<BigDecimal> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws RestClientException { Object postBody = body; String path = apiClient.expandPath("/fake/outer/number", Collections.emptyMap()); @@ -179,11 +228,23 @@ public class FakeApi { * * Test serialization of outer string types *

200 - Output string - * @param body Input string as post body + * @param body Input string as post body (optional) * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ public String fakeOuterStringSerialize(String body) throws RestClientException { + return fakeOuterStringSerializeWithHttpInfo(body).getBody(); + } + + /** + * + * Test serialization of outer string types + *

200 - Output string + * @param body Input string as post body (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeOuterStringSerializeWithHttpInfo(String body) throws RestClientException { Object postBody = body; String path = apiClient.expandPath("/fake/outer/string", Collections.emptyMap()); @@ -208,10 +269,22 @@ public class FakeApi { * * For this test, the body for this request much reference a schema named `File`. *

200 - Success - * @param body The body parameter + * @param body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testBodyWithFileSchema(FileSchemaTestClass body) throws RestClientException { + testBodyWithFileSchemaWithHttpInfo(body); + } + + /** + * + * For this test, the body for this request much reference a schema named `File`. + *

200 - Success + * @param body (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -235,17 +308,30 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * *

200 - Success - * @param query The query parameter - * @param body The body parameter + * @param query (required) + * @param body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testBodyWithQueryParams(String query, User body) throws RestClientException { + testBodyWithQueryParamsWithHttpInfo(query, body); + } + + /** + * + * + *

200 - Success + * @param query (required) + * @param body (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testBodyWithQueryParamsWithHttpInfo(String query, User body) throws RestClientException { Object postBody = body; // verify the required parameter 'query' is set @@ -276,17 +362,29 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * To test \"client\" model * To test \"client\" model *

200 - successful operation - * @param body client model + * @param body client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ public Client testClientModel(Client body) throws RestClientException { + return testClientModelWithHttpInfo(body).getBody(); + } + + /** + * To test \"client\" model + * To test \"client\" model + *

200 - successful operation + * @param body client model (required) + * @return ResponseEntity<Client> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testClientModelWithHttpInfo(Client body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -319,23 +417,49 @@ public class FakeApi { * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

400 - Invalid username supplied *

404 - User not found - * @param number None - * @param _double None - * @param patternWithoutDelimiter None - * @param _byte None - * @param integer None - * @param int32 None - * @param int64 None - * @param _float None - * @param string None - * @param binary None - * @param date None - * @param dateTime None - * @param password None - * @param paramCallback None + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws RestClientException { + testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } + + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + *

400 - Invalid username supplied + *

404 - User not found + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws RestClientException { Object postBody = null; // verify the required parameter 'number' is set @@ -403,24 +527,44 @@ public class FakeApi { String[] authNames = new String[] { "http_basic_test" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * To test enum parameters * To test enum parameters *

400 - Invalid request *

404 - Not found - * @param enumHeaderStringArray Header parameter enum test (string array) - * @param enumHeaderString Header parameter enum test (string) - * @param enumQueryStringArray Query parameter enum test (string array) - * @param enumQueryString Query parameter enum test (string) - * @param enumQueryInteger Query parameter enum test (double) - * @param enumQueryDouble Query parameter enum test (double) - * @param enumFormStringArray Form parameter enum test (string array) - * @param enumFormString Form parameter enum test (string) + * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<String>()) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<String>()) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws RestClientException { + testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } + + /** + * To test enum parameters + * To test enum parameters + *

400 - Invalid request + *

404 - Not found + * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<String>()) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<String>()) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws RestClientException { Object postBody = null; String path = apiClient.expandPath("/fake", Collections.emptyMap()); @@ -454,21 +598,38 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + 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 requiredStringGroup Required String in group parameters - * @param requiredBooleanGroup Required Boolean in group parameters - * @param requiredInt64Group Required Integer in group parameters - * @param stringGroup String in group parameters - * @param booleanGroup Boolean in group parameters - * @param int64Group Integer in group parameters + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { + testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + *

400 - Someting wrong + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { Object postBody = null; // verify the required parameter 'requiredStringGroup' is set @@ -510,16 +671,28 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * test inline additionalProperties * *

200 - successful operation - * @param param request body + * @param param request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testInlineAdditionalProperties(Map param) throws RestClientException { + testInlineAdditionalPropertiesWithHttpInfo(param); + } + + /** + * test inline additionalProperties + * + *

200 - successful operation + * @param param request body (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(Map param) throws RestClientException { Object postBody = param; // verify the required parameter 'param' is set @@ -543,17 +716,30 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * test json serialization of form data * *

200 - successful operation - * @param param field1 - * @param param2 field2 + * @param param field1 (required) + * @param param2 field2 (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testJsonFormData(String param, String param2) throws RestClientException { + testJsonFormDataWithHttpInfo(param, param2); + } + + /** + * test json serialization of form data + * + *

200 - successful operation + * @param param field1 (required) + * @param param2 field2 (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testJsonFormDataWithHttpInfo(String param, String param2) throws RestClientException { Object postBody = null; // verify the required parameter 'param' is set @@ -587,20 +773,36 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * To test the collection format in query parameters *

200 - Success - * @param pipe The pipe parameter - * @param ioutil The ioutil parameter - * @param http The http parameter - * @param url The url parameter - * @param context The context parameter + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws RestClientException { + testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + } + + /** + * + * To test the collection format in query parameters + *

200 - Success + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws RestClientException { Object postBody = null; // verify the required parameter 'pipe' is set @@ -648,6 +850,6 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index b619b51c26..74d86633d8 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -24,6 +24,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.FakeClassnameTags123Api") @@ -51,11 +52,23 @@ public class FakeClassnameTags123Api { * To test class name in snake case * To test class name in snake case *

200 - successful operation - * @param body client model + * @param body client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ public Client testClassname(Client body) throws RestClientException { + return testClassnameWithHttpInfo(body).getBody(); + } + + /** + * To test class name in snake case + * To test class name in snake case + *

200 - successful operation + * @param body client model (required) + * @return ResponseEntity<Client> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testClassnameWithHttpInfo(Client body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java index d012578f0f..31c2f785a2 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java @@ -26,6 +26,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.PetApi") @@ -54,10 +55,23 @@ public class PetApi { * *

200 - successful operation *

405 - Invalid input - * @param body Pet object that needs to be added to the store + * @param body Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void addPet(Pet body) throws RestClientException { + addPetWithHttpInfo(body); + } + + /** + * Add a new pet to the store + * + *

200 - successful operation + *

405 - Invalid input + * @param body Pet object that needs to be added to the store (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity addPetWithHttpInfo(Pet body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -81,18 +95,32 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Deletes a pet * *

200 - successful operation *

400 - Invalid pet value - * @param petId Pet id to delete - * @param apiKey The apiKey parameter + * @param petId Pet id to delete (required) + * @param apiKey (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deletePet(Long petId, String apiKey) throws RestClientException { + deletePetWithHttpInfo(petId, apiKey); + } + + /** + * Deletes a pet + * + *

200 - successful operation + *

400 - Invalid pet value + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set @@ -120,18 +148,31 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Finds Pets by status * Multiple status values can be provided with comma separated strings *

200 - successful operation *

400 - Invalid status value - * @param status Status values that need to be considered for filter + * @param status Status values that need to be considered for filter (required) * @return List<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ public List findPetsByStatus(List status) throws RestClientException { + return findPetsByStatusWithHttpInfo(status).getBody(); + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + *

200 - successful operation + *

400 - Invalid status value + * @param status Status values that need to be considered for filter (required) + * @return ResponseEntity<List<Pet>> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity> findPetsByStatusWithHttpInfo(List status) throws RestClientException { Object postBody = null; // verify the required parameter 'status' is set @@ -164,11 +205,26 @@ public class PetApi { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. *

200 - successful operation *

400 - Invalid tag value - * @param tags Tags to filter by + * @param tags Tags to filter by (required) * @return List<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ + @Deprecated public List findPetsByTags(List tags) throws RestClientException { + return findPetsByTagsWithHttpInfo(tags).getBody(); + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + *

200 - successful operation + *

400 - Invalid tag value + * @param tags Tags to filter by (required) + * @return ResponseEntity<List<Pet>> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + @Deprecated + public ResponseEntity> findPetsByTagsWithHttpInfo(List tags) throws RestClientException { Object postBody = null; // verify the required parameter 'tags' is set @@ -202,11 +258,25 @@ public class PetApi { *

200 - successful operation *

400 - Invalid ID supplied *

404 - Pet not found - * @param petId ID of pet to return + * @param petId ID of pet to return (required) * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ public Pet getPetById(Long petId) throws RestClientException { + return getPetByIdWithHttpInfo(petId).getBody(); + } + + /** + * Find pet by ID + * Returns a single pet + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + * @param petId ID of pet to return (required) + * @return ResponseEntity<Pet> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set @@ -242,10 +312,25 @@ public class PetApi { *

400 - Invalid ID supplied *

404 - Pet not found *

405 - Validation exception - * @param body Pet object that needs to be added to the store + * @param body Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void updatePet(Pet body) throws RestClientException { + updatePetWithHttpInfo(body); + } + + /** + * Update an existing pet + * + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + *

405 - Validation exception + * @param body Pet object that needs to be added to the store (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity updatePetWithHttpInfo(Pet body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -269,18 +354,32 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Updates a pet in the store with form data * *

405 - Invalid input - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void updatePetWithForm(Long petId, String name, String status) throws RestClientException { + updatePetWithFormWithHttpInfo(petId, name, status); + } + + /** + * Updates a pet in the store with form data + * + *

405 - Invalid input + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set @@ -312,19 +411,33 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * uploads an image * *

200 - successful operation - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws RestClientException { + return uploadFileWithHttpInfo(petId, additionalMetadata, file).getBody(); + } + + /** + * uploads an image + * + *

200 - successful operation + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return ResponseEntity<ModelApiResponse> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set @@ -364,13 +477,27 @@ public class PetApi { * uploads an image (required) * *

200 - successful operation - * @param petId ID of pet to update - * @param requiredFile file to upload - * @param additionalMetadata Additional data to pass to server + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws RestClientException { + return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getBody(); + } + + /** + * uploads an image (required) + * + *

200 - successful operation + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return ResponseEntity<ModelApiResponse> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java index 4488bd0ae0..29b990a85d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java @@ -24,6 +24,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.StoreApi") @@ -52,10 +53,23 @@ public class StoreApi { * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors *

400 - Invalid ID supplied *

404 - Order not found - * @param orderId ID of the order that needs to be deleted + * @param orderId ID of the order that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deleteOrder(String orderId) throws RestClientException { + deleteOrderWithHttpInfo(orderId); + } + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of the order that needs to be deleted (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity deleteOrderWithHttpInfo(String orderId) throws RestClientException { Object postBody = null; // verify the required parameter 'orderId' is set @@ -80,7 +94,7 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Returns pet inventories by status @@ -90,6 +104,17 @@ public class StoreApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public Map getInventory() throws RestClientException { + return getInventoryWithHttpInfo().getBody(); + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + *

200 - successful operation + * @return ResponseEntity<Map<String, Integer>> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity> getInventoryWithHttpInfo() throws RestClientException { Object postBody = null; String path = apiClient.expandPath("/store/inventory", Collections.emptyMap()); @@ -116,11 +141,25 @@ public class StoreApi { *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found - * @param orderId ID of pet that needs to be fetched + * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ public Order getOrderById(Long orderId) throws RestClientException { + return getOrderByIdWithHttpInfo(orderId).getBody(); + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of pet that needs to be fetched (required) + * @return ResponseEntity<Order> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestClientException { Object postBody = null; // verify the required parameter 'orderId' is set @@ -154,11 +193,24 @@ public class StoreApi { * *

200 - successful operation *

400 - Invalid Order - * @param body order placed for purchasing the pet + * @param body order placed for purchasing the pet (required) * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ public Order placeOrder(Order body) throws RestClientException { + return placeOrderWithHttpInfo(body).getBody(); + } + + /** + * Place an order for a pet + * + *

200 - successful operation + *

400 - Invalid Order + * @param body order placed for purchasing the pet (required) + * @return ResponseEntity<Order> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity placeOrderWithHttpInfo(Order body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java index 1d2d59616b..66db8e8cd1 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java @@ -24,6 +24,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; @Component("org.openapitools.client.api.UserApi") @@ -51,10 +52,22 @@ public class UserApi { * Create user * This can only be done by the logged in user. *

0 - successful operation - * @param body Created user object + * @param body Created user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void createUser(User body) throws RestClientException { + createUserWithHttpInfo(body); + } + + /** + * Create user + * This can only be done by the logged in user. + *

0 - successful operation + * @param body Created user object (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createUserWithHttpInfo(User body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -76,16 +89,28 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object + * @param body List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void createUsersWithArrayInput(List body) throws RestClientException { + createUsersWithArrayInputWithHttpInfo(body); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param body List of user object (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createUsersWithArrayInputWithHttpInfo(List body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -107,16 +132,28 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object + * @param body List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void createUsersWithListInput(List body) throws RestClientException { + createUsersWithListInputWithHttpInfo(body); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param body List of user object (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createUsersWithListInputWithHttpInfo(List body) throws RestClientException { Object postBody = body; // verify the required parameter 'body' is set @@ -138,17 +175,30 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Delete user * This can only be done by the logged in user. *

400 - Invalid username supplied *

404 - User not found - * @param username The name that needs to be deleted + * @param username The name that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deleteUser(String username) throws RestClientException { + deleteUserWithHttpInfo(username); + } + + /** + * Delete user + * This can only be done by the logged in user. + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be deleted (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity deleteUserWithHttpInfo(String username) throws RestClientException { Object postBody = null; // verify the required parameter 'username' is set @@ -173,7 +223,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Get user by user name @@ -181,11 +231,25 @@ public class UserApi { *

200 - successful operation *

400 - Invalid username supplied *

404 - User not found - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return User * @throws RestClientException if an error occurs while attempting to invoke the API */ public User getUserByName(String username) throws RestClientException { + return getUserByNameWithHttpInfo(username).getBody(); + } + + /** + * Get user by user name + * + *

200 - successful operation + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return ResponseEntity<User> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity getUserByNameWithHttpInfo(String username) throws RestClientException { Object postBody = null; // verify the required parameter 'username' is set @@ -219,12 +283,26 @@ public class UserApi { * *

200 - successful operation *

400 - Invalid username/password supplied - * @param username The user name for login - * @param password The password for login in clear text + * @param username The user name for login (required) + * @param password The password for login in clear text (required) * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ public String loginUser(String username, String password) throws RestClientException { + return loginUserWithHttpInfo(username, password).getBody(); + } + + /** + * Logs user into the system + * + *

200 - successful operation + *

400 - Invalid username/password supplied + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity loginUserWithHttpInfo(String username, String password) throws RestClientException { Object postBody = null; // verify the required parameter 'username' is set @@ -265,6 +343,17 @@ public class UserApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void logoutUser() throws RestClientException { + logoutUserWithHttpInfo(); + } + + /** + * Logs out current logged in user session + * + *

0 - successful operation + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity logoutUserWithHttpInfo() throws RestClientException { Object postBody = null; String path = apiClient.expandPath("/user/logout", Collections.emptyMap()); @@ -281,18 +370,32 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * Updated user * This can only be done by the logged in user. *

400 - Invalid user supplied *

404 - User not found - * @param username name that need to be deleted - * @param body Updated user object + * @param username name that need to be deleted (required) + * @param body Updated user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ public void updateUser(String username, User body) throws RestClientException { + updateUserWithHttpInfo(username, body); + } + + /** + * Updated user + * This can only be done by the logged in user. + *

400 - Invalid user supplied + *

404 - User not found + * @param username name that need to be deleted (required) + * @param body Updated user object (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity updateUserWithHttpInfo(String username, User body) throws RestClientException { Object postBody = body; // verify the required parameter 'username' is set @@ -322,6 +425,6 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/retrofit2-play24/build.gradle b/samples/client/petstore/java/retrofit2-play24/build.gradle index 663a8a3475..fc11884337 100644 --- a/samples/client/petstore/java/retrofit2-play24/build.gradle +++ b/samples/client/petstore/java/retrofit2-play24/build.gradle @@ -119,7 +119,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" testCompile "junit:junit:$junit_version" diff --git a/samples/client/petstore/java/retrofit2-play24/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/retrofit2-play24/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2-play24/docs/Name.md b/samples/client/petstore/java/retrofit2-play24/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/Name.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2-play24/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2-play24/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play25/build.gradle b/samples/client/petstore/java/retrofit2-play25/build.gradle index 6070a72336..54d850abe3 100644 --- a/samples/client/petstore/java/retrofit2-play25/build.gradle +++ b/samples/client/petstore/java/retrofit2-play25/build.gradle @@ -121,7 +121,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" testCompile "junit:junit:$junit_version" diff --git a/samples/client/petstore/java/retrofit2-play25/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/retrofit2-play25/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2-play25/docs/Name.md b/samples/client/petstore/java/retrofit2-play25/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/Name.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2-play25/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2-play25/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play26/build.gradle b/samples/client/petstore/java/retrofit2-play26/build.gradle index 5a8bdb5e05..37bbbee850 100644 --- a/samples/client/petstore/java/retrofit2-play26/build.gradle +++ b/samples/client/petstore/java/retrofit2-play26/build.gradle @@ -99,7 +99,7 @@ ext { retrofit_version = "2.3.0" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" play_version = "2.6.7" swagger_annotations_version = "1.5.22" junit_version = "4.12" @@ -124,7 +124,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" testCompile "junit:junit:$junit_version" diff --git a/samples/client/petstore/java/retrofit2-play26/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/retrofit2-play26/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2-play26/docs/Name.md b/samples/client/petstore/java/retrofit2-play26/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/Name.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2-play26/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2-play26/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/retrofit2/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/retrofit2/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/retrofit2/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/retrofit2/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2/docs/Name.md b/samples/client/petstore/java/retrofit2/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/retrofit2/docs/Name.md +++ b/samples/client/petstore/java/retrofit2/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/retrofit2rx/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/retrofit2rx/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/retrofit2rx/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2rx/docs/Name.md b/samples/client/petstore/java/retrofit2rx/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/Name.md +++ b/samples/client/petstore/java/retrofit2rx/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2rx/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2rx/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/retrofit2rx/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/retrofit2rx2/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/retrofit2rx2/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Name.md b/samples/client/petstore/java/retrofit2rx2/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Name.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2rx2/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/vertx/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/vertx/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/vertx/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/vertx/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/vertx/docs/Name.md b/samples/client/petstore/java/vertx/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/vertx/docs/Name.md +++ b/samples/client/petstore/java/vertx/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/vertx/docs/ReadOnlyFirst.md b/samples/client/petstore/java/vertx/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/vertx/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/vertx/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/java/webclient/build.gradle b/samples/client/petstore/java/webclient/build.gradle index 1637b07938..69b9c9a948 100644 --- a/samples/client/petstore/java/webclient/build.gradle +++ b/samples/client/petstore/java/webclient/build.gradle @@ -114,7 +114,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" jersey_version = "1.19.4" jodatime_version = "2.9.9" junit_version = "4.12" @@ -129,7 +129,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" testCompile "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/webclient/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/webclient/docs/HasOnlyReadOnly.md index 3abb662c38..4795b40ef6 100644 --- a/samples/client/petstore/java/webclient/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/webclient/docs/HasOnlyReadOnly.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/java/webclient/docs/Name.md b/samples/client/petstore/java/webclient/docs/Name.md index cde0ebd7f2..4bff2a937a 100644 --- a/samples/client/petstore/java/webclient/docs/Name.md +++ b/samples/client/petstore/java/webclient/docs/Name.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snakeCase** | **Integer** | | [optional] +**snakeCase** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Integer** | | [optional] +**_123number** | **Integer** | | [optional] [readonly] diff --git a/samples/client/petstore/java/webclient/docs/ReadOnlyFirst.md b/samples/client/petstore/java/webclient/docs/ReadOnlyFirst.md index c38ed3bae4..a692499dc6 100644 --- a/samples/client/petstore/java/webclient/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/webclient/docs/ReadOnlyFirst.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/javascript-es6/docs/HasOnlyReadOnly.md b/samples/client/petstore/javascript-es6/docs/HasOnlyReadOnly.md index f3d71895b5..bfe08a1bae 100644 --- a/samples/client/petstore/javascript-es6/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/javascript-es6/docs/HasOnlyReadOnly.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/javascript-es6/docs/Name.md b/samples/client/petstore/javascript-es6/docs/Name.md index be2344179b..d9f2fbeb68 100644 --- a/samples/client/petstore/javascript-es6/docs/Name.md +++ b/samples/client/petstore/javascript-es6/docs/Name.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Number** | | -**snakeCase** | **Number** | | [optional] +**snakeCase** | **Number** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Number** | | [optional] +**_123number** | **Number** | | [optional] [readonly] diff --git a/samples/client/petstore/javascript-es6/docs/ReadOnlyFirst.md b/samples/client/petstore/javascript-es6/docs/ReadOnlyFirst.md index 01063e61a9..eee7a321d4 100644 --- a/samples/client/petstore/javascript-es6/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/javascript-es6/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/javascript-promise-es6/docs/HasOnlyReadOnly.md b/samples/client/petstore/javascript-promise-es6/docs/HasOnlyReadOnly.md index f3d71895b5..bfe08a1bae 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/javascript-promise-es6/docs/HasOnlyReadOnly.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/javascript-promise-es6/docs/Name.md b/samples/client/petstore/javascript-promise-es6/docs/Name.md index be2344179b..d9f2fbeb68 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/Name.md +++ b/samples/client/petstore/javascript-promise-es6/docs/Name.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Number** | | -**snakeCase** | **Number** | | [optional] +**snakeCase** | **Number** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Number** | | [optional] +**_123number** | **Number** | | [optional] [readonly] diff --git a/samples/client/petstore/javascript-promise-es6/docs/ReadOnlyFirst.md b/samples/client/petstore/javascript-promise-es6/docs/ReadOnlyFirst.md index 01063e61a9..eee7a321d4 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/javascript-promise-es6/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/javascript-promise/docs/HasOnlyReadOnly.md b/samples/client/petstore/javascript-promise/docs/HasOnlyReadOnly.md index f3d71895b5..bfe08a1bae 100644 --- a/samples/client/petstore/javascript-promise/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/javascript-promise/docs/HasOnlyReadOnly.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/javascript-promise/docs/Name.md b/samples/client/petstore/javascript-promise/docs/Name.md index be2344179b..d9f2fbeb68 100644 --- a/samples/client/petstore/javascript-promise/docs/Name.md +++ b/samples/client/petstore/javascript-promise/docs/Name.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Number** | | -**snakeCase** | **Number** | | [optional] +**snakeCase** | **Number** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Number** | | [optional] +**_123number** | **Number** | | [optional] [readonly] diff --git a/samples/client/petstore/javascript-promise/docs/ReadOnlyFirst.md b/samples/client/petstore/javascript-promise/docs/ReadOnlyFirst.md index 01063e61a9..eee7a321d4 100644 --- a/samples/client/petstore/javascript-promise/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/javascript-promise/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/javascript/docs/HasOnlyReadOnly.md b/samples/client/petstore/javascript/docs/HasOnlyReadOnly.md index f3d71895b5..bfe08a1bae 100644 --- a/samples/client/petstore/javascript/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/javascript/docs/HasOnlyReadOnly.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] diff --git a/samples/client/petstore/javascript/docs/Name.md b/samples/client/petstore/javascript/docs/Name.md index be2344179b..d9f2fbeb68 100644 --- a/samples/client/petstore/javascript/docs/Name.md +++ b/samples/client/petstore/javascript/docs/Name.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Number** | | -**snakeCase** | **Number** | | [optional] +**snakeCase** | **Number** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Number** | | [optional] +**_123number** | **Number** | | [optional] [readonly] diff --git a/samples/client/petstore/javascript/docs/ReadOnlyFirst.md b/samples/client/petstore/javascript/docs/ReadOnlyFirst.md index 01063e61a9..eee7a321d4 100644 --- a/samples/client/petstore/javascript/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/javascript/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt index 76b9cf068e..7cf06b85d5 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt @@ -36,23 +36,17 @@ data class Order ( { - /** * Order Status * Values: placed,approved,delivered */ @Serializable(with = Status.Serializer::class) enum class Status(val value: kotlin.String){ - placed("placed"), - approved("approved"), - delivered("delivered"); - object Serializer : CommonEnumSerializer("Status", values(), values().map { it.value }.toTypedArray()) } - } diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt index 145683fe57..180c5ff98e 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt @@ -38,23 +38,17 @@ data class Pet ( { - /** * pet status in the store * Values: available,pending,sold */ @Serializable(with = Status.Serializer::class) enum class Status(val value: kotlin.String){ - available("available"), - pending("pending"), - sold("sold"); - object Serializer : CommonEnumSerializer("Status", values(), values().map { it.value }.toTypedArray()) } - } diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator-ignore b/samples/client/petstore/kotlin-nonpublic/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/.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/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION new file mode 100644 index 0000000000..c3a2c7076f --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/README.md b/samples/client/petstore/kotlin-nonpublic/README.md new file mode 100644 index 0000000000..aef4ea15be --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/README.md @@ -0,0 +1,90 @@ +# org.openapitools.client - Kotlin client library for OpenAPI Petstore + +## Requires + +* Kotlin 1.3.41 +* Gradle 4.9 + +## Build + +First, create the gradle wrapper script: + +``` +gradle wrapper +``` + +Then, run: + +``` +./gradlew check assemble +``` + +This runs all tests and packages the library. + +## Features/Implementation Notes + +* Supports JSON inputs/outputs, File inputs, and Form inputs. +* Supports collection formats for query parameters: csv, tsv, ssv, pipes. +* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. +* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. + + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + + +## Documentation for Models + + - [org.openapitools.client.models.ApiResponse](docs/ApiResponse.md) + - [org.openapitools.client.models.Category](docs/Category.md) + - [org.openapitools.client.models.Order](docs/Order.md) + - [org.openapitools.client.models.Pet](docs/Pet.md) + - [org.openapitools.client.models.Tag](docs/Tag.md) + - [org.openapitools.client.models.User](docs/User.md) + + + +## Documentation for Authorization + + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + + +### petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - write:pets: modify pets in your account + - read:pets: read your pets + diff --git a/samples/client/petstore/kotlin-nonpublic/build.gradle b/samples/client/petstore/kotlin-nonpublic/build.gradle new file mode 100644 index 0000000000..98ac4f243e --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/build.gradle @@ -0,0 +1,37 @@ +group 'org.openapitools' +version '1.0.0' + +wrapper { + gradleVersion = '4.9' + distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" +} + +buildscript { + ext.kotlin_version = '1.3.41' + + repositories { + mavenCentral() + } + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +apply plugin: 'kotlin' + +repositories { + mavenCentral() +} + +test { + useJUnitPlatform() +} + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + compile "com.squareup.moshi:moshi-kotlin:1.8.0" + compile "com.squareup.moshi:moshi-adapters:1.8.0" + compile "com.squareup.okhttp3:okhttp:4.2.0" + testImplementation "io.kotlintest:kotlintest-runner-junit5:3.1.0" +} diff --git a/samples/client/petstore/kotlin-nonpublic/docs/ApiResponse.md b/samples/client/petstore/kotlin-nonpublic/docs/ApiResponse.md new file mode 100644 index 0000000000..6b4c6bf277 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/docs/ApiResponse.md @@ -0,0 +1,12 @@ + +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **kotlin.Int** | | [optional] +**type** | **kotlin.String** | | [optional] +**message** | **kotlin.String** | | [optional] + + + diff --git a/samples/client/petstore/kotlin-nonpublic/docs/Category.md b/samples/client/petstore/kotlin-nonpublic/docs/Category.md new file mode 100644 index 0000000000..2c28a670fc --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/docs/Category.md @@ -0,0 +1,11 @@ + +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**name** | **kotlin.String** | | [optional] + + + diff --git a/samples/client/petstore/kotlin-nonpublic/docs/Order.md b/samples/client/petstore/kotlin-nonpublic/docs/Order.md new file mode 100644 index 0000000000..ef31dbf2f4 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/docs/Order.md @@ -0,0 +1,22 @@ + +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**petId** | **kotlin.Long** | | [optional] +**quantity** | **kotlin.Int** | | [optional] +**shipDate** | [**java.time.LocalDateTime**](java.time.LocalDateTime.md) | | [optional] +**status** | [**inline**](#StatusEnum) | Order Status | [optional] +**complete** | **kotlin.Boolean** | | [optional] + + + +## Enum: status +Name | Value +---- | ----- +status | placed, approved, delivered + + + diff --git a/samples/client/petstore/kotlin-nonpublic/docs/Pet.md b/samples/client/petstore/kotlin-nonpublic/docs/Pet.md new file mode 100644 index 0000000000..ec77560073 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/docs/Pet.md @@ -0,0 +1,22 @@ + +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **kotlin.String** | | +**photoUrls** | **kotlin.Array<kotlin.String>** | | +**tags** | [**kotlin.Array<Tag>**](Tag.md) | | [optional] +**status** | [**inline**](#StatusEnum) | pet status in the store | [optional] + + + +## Enum: status +Name | Value +---- | ----- +status | available, pending, sold + + + diff --git a/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md b/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md new file mode 100644 index 0000000000..ea93e17452 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/docs/PetApi.md @@ -0,0 +1,405 @@ +# PetApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image + + + +# **addPet** +> addPet(body) + +Add a new pet to the store + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val body : Pet = // Pet | Pet object that needs to be added to the store +try { + apiInstance.addPet(body) +} catch (e: ClientException) { + println("4xx response calling PetApi#addPet") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#addPet") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | Pet id to delete +val apiKey : kotlin.String = apiKey_example // kotlin.String | +try { + apiInstance.deletePet(petId, apiKey) +} catch (e: ClientException) { + println("4xx response calling PetApi#deletePet") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#deletePet") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| Pet id to delete | + **apiKey** | **kotlin.String**| | [optional] + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **findPetsByStatus** +> kotlin.Array<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val status : kotlin.Array = // kotlin.Array | Status values that need to be considered for filter +try { + val result : kotlin.Array = apiInstance.findPetsByStatus(status) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#findPetsByStatus") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#findPetsByStatus") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] + +### Return type + +[**kotlin.Array<Pet>**](Pet.md) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **findPetsByTags** +> kotlin.Array<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val tags : kotlin.Array = // kotlin.Array | Tags to filter by +try { + val result : kotlin.Array = apiInstance.findPetsByTags(tags) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#findPetsByTags") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#findPetsByTags") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Tags to filter by | + +### Return type + +[**kotlin.Array<Pet>**](Pet.md) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to return +try { + val result : Pet = apiInstance.getPetById(petId) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#getPetById") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#getPetById") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + + +Configure api_key: + ApiClient.apiKey["api_key"] = "" + ApiClient.apiKeyPrefix["api_key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **updatePet** +> updatePet(body) + +Update an existing pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val body : Pet = // Pet | Pet object that needs to be added to the store +try { + apiInstance.updatePet(body) +} catch (e: ClientException) { + println("4xx response calling PetApi#updatePet") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#updatePet") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be updated +val name : kotlin.String = name_example // kotlin.String | Updated name of the pet +val status : kotlin.String = status_example // kotlin.String | Updated status of the pet +try { + apiInstance.updatePetWithForm(petId, name, status) +} catch (e: ClientException) { + println("4xx response calling PetApi#updatePetWithForm") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#updatePetWithForm") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| ID of pet that needs to be updated | + **name** | **kotlin.String**| Updated name of the pet | [optional] + **status** | **kotlin.String**| Updated status of the pet | [optional] + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + + +# **uploadFile** +> ApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to update +val additionalMetadata : kotlin.String = additionalMetadata_example // kotlin.String | Additional data to pass to server +val file : java.io.File = BINARY_DATA_HERE // java.io.File | file to upload +try { + val result : ApiResponse = apiInstance.uploadFile(petId, additionalMetadata, file) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#uploadFile") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#uploadFile") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| ID of pet to update | + **additionalMetadata** | **kotlin.String**| Additional data to pass to server | [optional] + **file** | **java.io.File**| file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md b/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md new file mode 100644 index 0000000000..f4986041af --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md @@ -0,0 +1,196 @@ +# StoreApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet + + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +val orderId : kotlin.String = orderId_example // kotlin.String | ID of the order that needs to be deleted +try { + apiInstance.deleteOrder(orderId) +} catch (e: ClientException) { + println("4xx response calling StoreApi#deleteOrder") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#deleteOrder") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **kotlin.String**| ID of the order that needs to be deleted | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **getInventory** +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +try { + val result : kotlin.collections.Map = apiInstance.getInventory() + println(result) +} catch (e: ClientException) { + println("4xx response calling StoreApi#getInventory") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#getInventory") + e.printStackTrace() +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**kotlin.collections.Map<kotlin.String, kotlin.Int>** + +### Authorization + + +Configure api_key: + ApiClient.apiKey["api_key"] = "" + ApiClient.apiKeyPrefix["api_key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +val orderId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be fetched +try { + val result : Order = apiInstance.getOrderById(orderId) + println(result) +} catch (e: ClientException) { + println("4xx response calling StoreApi#getOrderById") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#getOrderById") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **kotlin.Long**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **placeOrder** +> Order placeOrder(body) + +Place an order for a pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +val body : Order = // Order | order placed for purchasing the pet +try { + val result : Order = apiInstance.placeOrder(body) + println(result) +} catch (e: ClientException) { + println("4xx response calling StoreApi#placeOrder") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#placeOrder") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + diff --git a/samples/client/petstore/ruby-faraday/docs/AnimalFarm.md b/samples/client/petstore/kotlin-nonpublic/docs/Tag.md similarity index 53% rename from samples/client/petstore/ruby-faraday/docs/AnimalFarm.md rename to samples/client/petstore/kotlin-nonpublic/docs/Tag.md index 30d704dc7d..60ce1bcdba 100644 --- a/samples/client/petstore/ruby-faraday/docs/AnimalFarm.md +++ b/samples/client/petstore/kotlin-nonpublic/docs/Tag.md @@ -1,7 +1,11 @@ -# Petstore::AnimalFarm + +# Tag ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**name** | **kotlin.String** | | [optional] + diff --git a/samples/client/petstore/kotlin-nonpublic/docs/User.md b/samples/client/petstore/kotlin-nonpublic/docs/User.md new file mode 100644 index 0000000000..e801729b5e --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/docs/User.md @@ -0,0 +1,17 @@ + +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**username** | **kotlin.String** | | [optional] +**firstName** | **kotlin.String** | | [optional] +**lastName** | **kotlin.String** | | [optional] +**email** | **kotlin.String** | | [optional] +**password** | **kotlin.String** | | [optional] +**phone** | **kotlin.String** | | [optional] +**userStatus** | **kotlin.Int** | User Status | [optional] + + + diff --git a/samples/client/petstore/kotlin-nonpublic/docs/UserApi.md b/samples/client/petstore/kotlin-nonpublic/docs/UserApi.md new file mode 100644 index 0000000000..0f55f06bc6 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/docs/UserApi.md @@ -0,0 +1,376 @@ +# UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user + + + +# **createUser** +> createUser(body) + +Create user + +This can only be done by the logged in user. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val body : User = // User | Created user object +try { + apiInstance.createUser(body) +} catch (e: ClientException) { + println("4xx response calling UserApi#createUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#createUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| Created user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(body) + +Creates list of users with given input array + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val body : kotlin.Array = // kotlin.Array | List of user object +try { + apiInstance.createUsersWithArrayInput(body) +} catch (e: ClientException) { + println("4xx response calling UserApi#createUsersWithArrayInput") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#createUsersWithArrayInput") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**kotlin.Array<User>**](User.md)| List of user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **createUsersWithListInput** +> createUsersWithListInput(body) + +Creates list of users with given input array + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val body : kotlin.Array = // kotlin.Array | List of user object +try { + apiInstance.createUsersWithListInput(body) +} catch (e: ClientException) { + println("4xx response calling UserApi#createUsersWithListInput") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#createUsersWithListInput") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**kotlin.Array<User>**](User.md)| List of user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | The name that needs to be deleted +try { + apiInstance.deleteUser(username) +} catch (e: ClientException) { + println("4xx response calling UserApi#deleteUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#deleteUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| The name that needs to be deleted | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | The name that needs to be fetched. Use user1 for testing. +try { + val result : User = apiInstance.getUserByName(username) + println(result) +} catch (e: ClientException) { + println("4xx response calling UserApi#getUserByName") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#getUserByName") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **loginUser** +> kotlin.String loginUser(username, password) + +Logs user into the system + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | The user name for login +val password : kotlin.String = password_example // kotlin.String | The password for login in clear text +try { + val result : kotlin.String = apiInstance.loginUser(username, password) + println(result) +} catch (e: ClientException) { + println("4xx response calling UserApi#loginUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#loginUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| The user name for login | + **password** | **kotlin.String**| The password for login in clear text | + +### Return type + +**kotlin.String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +try { + apiInstance.logoutUser() +} catch (e: ClientException) { + println("4xx response calling UserApi#logoutUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#logoutUser") + e.printStackTrace() +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **updateUser** +> updateUser(username, body) + +Updated user + +This can only be done by the logged in user. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | name that need to be deleted +val body : User = // User | Updated user object +try { + apiInstance.updateUser(username, body) +} catch (e: ClientException) { + println("4xx response calling UserApi#updateUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#updateUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| name that need to be deleted | + **body** | [**User**](User.md)| Updated user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + diff --git a/samples/client/petstore/kotlin-nonpublic/settings.gradle b/samples/client/petstore/kotlin-nonpublic/settings.gradle new file mode 100644 index 0000000000..b6d700d5a9 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/settings.gradle @@ -0,0 +1,2 @@ + +rootProject.name = 'kotlin-petstore-nonpublic' \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt new file mode 100644 index 0000000000..ea0bccdd44 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -0,0 +1,280 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.apis + +import org.openapitools.client.models.ApiResponse +import org.openapitools.client.models.Pet + +import org.openapitools.client.infrastructure.ApiClient +import org.openapitools.client.infrastructure.ClientException +import org.openapitools.client.infrastructure.ClientError +import org.openapitools.client.infrastructure.ServerException +import org.openapitools.client.infrastructure.ServerError +import org.openapitools.client.infrastructure.MultiValueMap +import org.openapitools.client.infrastructure.RequestConfig +import org.openapitools.client.infrastructure.RequestMethod +import org.openapitools.client.infrastructure.ResponseType +import org.openapitools.client.infrastructure.Success +import org.openapitools.client.infrastructure.toMultiValue + +internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiClient(basePath) { + + /** + * Add a new pet to the store + * + * @param body Pet object that needs to be added to the store + * @return void + */ + fun addPet(body: Pet) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/pet", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Deletes a pet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return void + */ + fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf("api_key" to apiKey.toString()) + val localVariableConfig = RequestConfig( + RequestMethod.DELETE, + "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + * @param status Status values that need to be considered for filter + * @return kotlin.Array + */ + @Suppress("UNCHECKED_CAST") + fun findPetsByStatus(status: kotlin.Array) : kotlin.Array { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf("status" to toMultiValue(status.toList(), "csv")) + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request>( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as kotlin.Array + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @param tags Tags to filter by + * @return kotlin.Array + */ + @Suppress("UNCHECKED_CAST") + fun findPetsByTags(tags: kotlin.Array) : kotlin.Array { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf("tags" to toMultiValue(tags.toList(), "csv")) + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request>( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as kotlin.Array + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Find pet by ID + * Returns a single pet + * @param petId ID of pet to return + * @return Pet + */ + @Suppress("UNCHECKED_CAST") + fun getPetById(petId: kotlin.Long) : Pet { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as Pet + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Update an existing pet + * + * @param body Pet object that needs to be added to the store + * @return void + */ + fun updatePet(body: Pet) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.PUT, + "/pet", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return void + */ + fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { + val localVariableBody: kotlin.Any? = mapOf("name" to "$name", "status" to "$status") + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * uploads an image + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return ApiResponse + */ + @Suppress("UNCHECKED_CAST") + fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to "$additionalMetadata", "file" to "$file") + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as ApiResponse + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + +} diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt new file mode 100644 index 0000000000..e2bf37917f --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -0,0 +1,152 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.apis + +import org.openapitools.client.models.Order + +import org.openapitools.client.infrastructure.ApiClient +import org.openapitools.client.infrastructure.ClientException +import org.openapitools.client.infrastructure.ClientError +import org.openapitools.client.infrastructure.ServerException +import org.openapitools.client.infrastructure.ServerError +import org.openapitools.client.infrastructure.MultiValueMap +import org.openapitools.client.infrastructure.RequestConfig +import org.openapitools.client.infrastructure.RequestMethod +import org.openapitools.client.infrastructure.ResponseType +import org.openapitools.client.infrastructure.Success +import org.openapitools.client.infrastructure.toMultiValue + +internal class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiClient(basePath) { + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @param orderId ID of the order that needs to be deleted + * @return void + */ + fun deleteOrder(orderId: kotlin.String) : Unit { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.DELETE, + "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * @return kotlin.collections.Map + */ + @Suppress("UNCHECKED_CAST") + fun getInventory() : kotlin.collections.Map { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request>( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as kotlin.collections.Map + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @param orderId ID of pet that needs to be fetched + * @return Order + */ + @Suppress("UNCHECKED_CAST") + fun getOrderById(orderId: kotlin.Long) : Order { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as Order + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Place an order for a pet + * + * @param body order placed for purchasing the pet + * @return Order + */ + @Suppress("UNCHECKED_CAST") + fun placeOrder(body: Order) : Order { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/store/order", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as Order + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + +} diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt new file mode 100644 index 0000000000..18506d2a27 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -0,0 +1,273 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.apis + +import org.openapitools.client.models.User + +import org.openapitools.client.infrastructure.ApiClient +import org.openapitools.client.infrastructure.ClientException +import org.openapitools.client.infrastructure.ClientError +import org.openapitools.client.infrastructure.ServerException +import org.openapitools.client.infrastructure.ServerError +import org.openapitools.client.infrastructure.MultiValueMap +import org.openapitools.client.infrastructure.RequestConfig +import org.openapitools.client.infrastructure.RequestMethod +import org.openapitools.client.infrastructure.ResponseType +import org.openapitools.client.infrastructure.Success +import org.openapitools.client.infrastructure.toMultiValue + +internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiClient(basePath) { + + /** + * Create user + * This can only be done by the logged in user. + * @param body Created user object + * @return void + */ + fun createUser(body: User) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/user", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Creates list of users with given input array + * + * @param body List of user object + * @return void + */ + fun createUsersWithArrayInput(body: kotlin.Array) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Creates list of users with given input array + * + * @param body List of user object + * @return void + */ + fun createUsersWithListInput(body: kotlin.Array) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Delete user + * This can only be done by the logged in user. + * @param username The name that needs to be deleted + * @return void + */ + fun deleteUser(username: kotlin.String) : Unit { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.DELETE, + "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return User + */ + @Suppress("UNCHECKED_CAST") + fun getUserByName(username: kotlin.String) : User { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as User + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Logs user into the system + * + * @param username The user name for login + * @param password The password for login in clear text + * @return kotlin.String + */ + @Suppress("UNCHECKED_CAST") + fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf("username" to listOf("$username"), "password" to listOf("$password")) + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/user/login", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as kotlin.String + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Logs out current logged in user session + * + * @return void + */ + fun logoutUser() : Unit { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Updated user + * This can only be done by the logged in user. + * @param username name that need to be deleted + * @param body Updated user object + * @return void + */ + fun updateUser(username: kotlin.String, body: User) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.PUT, + "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + +} diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt new file mode 100644 index 0000000000..b85d18def7 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt @@ -0,0 +1,23 @@ +package org.openapitools.client.infrastructure + +typealias MultiValueMap = Map> + +internal fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { + "csv" -> "," + "tsv" -> "\t" + "pipes" -> "|" + "ssv" -> " " + else -> "" +} + +internal val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } + +internal fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) + = toMultiValue(items.asIterable(), collectionFormat, map) + +internal fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { + return when(collectionFormat) { + "multi" -> items.map(map) + else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt new file mode 100644 index 0000000000..7a82f3eef2 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -0,0 +1,170 @@ +package org.openapitools.client.infrastructure + +import okhttp3.OkHttpClient +import okhttp3.RequestBody +import okhttp3.RequestBody.Companion.asRequestBody +import okhttp3.RequestBody.Companion.toRequestBody +import okhttp3.FormBody +import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +import okhttp3.ResponseBody +import okhttp3.MediaType.Companion.toMediaTypeOrNull +import okhttp3.Request +import java.io.File + +internal open class ApiClient(val baseUrl: String) { + internal companion object { + protected const val ContentType = "Content-Type" + protected const val Accept = "Accept" + protected const val Authorization = "Authorization" + protected const val JsonMediaType = "application/json" + protected const val FormDataMediaType = "multipart/form-data" + protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" + protected const val XmlMediaType = "application/xml" + + val apiKey: MutableMap = mutableMapOf() + val apiKeyPrefix: MutableMap = mutableMapOf() + var username: String? = null + var password: String? = null + var accessToken: String? = null + + @JvmStatic + val client: OkHttpClient by lazy { + builder.build() + } + + @JvmStatic + val builder: OkHttpClient.Builder = OkHttpClient.Builder() + } + + protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + when { + content is File -> content.asRequestBody( + mediaType.toMediaTypeOrNull() + ) + mediaType == FormDataMediaType || mediaType == FormUrlEncMediaType -> { + FormBody.Builder().apply { + // content's type *must* be Map + @Suppress("UNCHECKED_CAST") + (content as Map).forEach { (key, value) -> + add(key, value) + } + }.build() + } + mediaType == JsonMediaType -> Serializer.moshi.adapter(T::class.java).toJson(content).toRequestBody( + mediaType.toMediaTypeOrNull() + ) + mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") + // TODO: this should be extended with other serializers + else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") + } + + protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { + if(body == null) { + return null + } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } + return when(mediaType) { + JsonMediaType -> Serializer.moshi.adapter(T::class.java).fromJson(bodyContent) + else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") + } + } + + protected fun updateAuthParams(requestConfig: RequestConfig) { + if (requestConfig.headers["api_key"].isNullOrEmpty()) { + if (apiKey["api_key"] != null) { + if (apiKeyPrefix["api_key"] != null) { + requestConfig.headers["api_key"] = apiKeyPrefix["api_key"]!! + " " + apiKey["api_key"]!! + } else { + requestConfig.headers["api_key"] = apiKey["api_key"]!! + } + } + } + if (requestConfig.headers[Authorization].isNullOrEmpty()) { + requestConfig.headers[Authorization] = "Bearer " + accessToken + } + } + + protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") + + // take authMethod from operation + updateAuthParams(requestConfig) + + val url = httpUrl.newBuilder() + .addPathSegments(requestConfig.path.trimStart('/')) + .apply { + requestConfig.query.forEach { query -> + query.value.forEach { queryValue -> + addQueryParameter(query.key, queryValue) + } + } + }.build() + + // take content-type/accept from spec or set to default (application/json) if not defined + if (requestConfig.headers[ContentType].isNullOrEmpty()) { + requestConfig.headers[ContentType] = JsonMediaType + } + if (requestConfig.headers[Accept].isNullOrEmpty()) { + requestConfig.headers[Accept] = JsonMediaType + } + val headers = requestConfig.headers + + if(headers[ContentType] ?: "" == "") { + throw kotlin.IllegalStateException("Missing Content-Type header. This is required.") + } + + if(headers[Accept] ?: "" == "") { + throw kotlin.IllegalStateException("Missing Accept header. This is required.") + } + + // TODO: support multiple contentType options here. + val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() + + val request = when (requestConfig.method) { + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.GET -> Request.Builder().url(url) + RequestMethod.HEAD -> Request.Builder().url(url).head() + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) + }.apply { + headers.forEach { header -> addHeader(header.key, header.value) } + }.build() + + val response = client.newCall(request).execute() + val accept = response.header(ContentType)?.substringBefore(";")?.toLowerCase() + + // TODO: handle specific mapping types. e.g. Map> + when { + response.isRedirect -> return Redirection( + response.code, + response.headers.toMultimap() + ) + response.isInformational -> return Informational( + response.message, + response.code, + response.headers.toMultimap() + ) + response.isSuccessful -> return Success( + responseBody(response.body, accept), + response.code, + response.headers.toMultimap() + ) + response.isClientError -> return ClientError( + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + else -> return ServerError( + null, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + } + } +} diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt new file mode 100644 index 0000000000..6f38b7aa18 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt @@ -0,0 +1,40 @@ +package org.openapitools.client.infrastructure + +internal enum class ResponseType { + Success, Informational, Redirection, ClientError, ServerError +} + +internal abstract class ApiInfrastructureResponse(val responseType: ResponseType) { + abstract val statusCode: Int + abstract val headers: Map> +} + +internal class Success( + val data: T, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +): ApiInfrastructureResponse(ResponseType.Success) + +internal class Informational( + val statusText: String, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiInfrastructureResponse(ResponseType.Informational) + +internal class Redirection( + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiInfrastructureResponse(ResponseType.Redirection) + +internal class ClientError( + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiInfrastructureResponse(ResponseType.ClientError) + +internal class ServerError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> +): ApiInfrastructureResponse(ResponseType.ServerError) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt new file mode 100644 index 0000000000..d7f9079c0d --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt @@ -0,0 +1,29 @@ +package org.openapitools.client.infrastructure + +import kotlin.properties.ReadWriteProperty +import kotlin.reflect.KProperty + +internal object ApplicationDelegates { + /** + * Provides a property delegate, allowing the property to be set once and only once. + * + * If unset (no default value), a get on the property will throw [IllegalStateException]. + */ + fun setOnce(defaultValue: T? = null) : ReadWriteProperty = SetOnce(defaultValue) + + private class SetOnce(defaultValue: T? = null) : ReadWriteProperty { + private var isSet = false + private var value: T? = defaultValue + + override fun getValue(thisRef: Any?, property: KProperty<*>): T { + return value ?: throw IllegalStateException("${property.name} not initialized") + } + + override fun setValue(thisRef: Any?, property: KProperty<*>, value: T) = synchronized(this) { + if (!isSet) { + this.value = value + isSet = true + } + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt new file mode 100644 index 0000000000..8e1cefd248 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt @@ -0,0 +1,12 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson + +internal class ByteArrayAdapter { + @ToJson + fun toJson(data: ByteArray): String = String(data) + + @FromJson + fun fromJson(data: String): ByteArray = data.toByteArray() +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt new file mode 100644 index 0000000000..2521ff5e08 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt @@ -0,0 +1,42 @@ +@file:Suppress("unused") +package org.openapitools.client.infrastructure + +import java.lang.RuntimeException + +internal open class ClientException : RuntimeException { + + /** + * Constructs an [ClientException] with no detail message. + */ + constructor() : super() + + /** + * Constructs an [ClientException] with the specified detail message. + + * @param message the detail message. + */ + constructor(message: kotlin.String) : super(message) + + internal companion object { + private const val serialVersionUID: Long = 123L + } +} + +internal open class ServerException : RuntimeException { + + /** + * Constructs an [ServerException] with no detail message. + */ + constructor() : super() + + /** + * Constructs an [ServerException] with the specified detail message. + + * @param message the detail message. + */ + constructor(message: kotlin.String) : super(message) + + internal companion object { + private const val serialVersionUID: Long = 456L + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt new file mode 100644 index 0000000000..e86215d571 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt @@ -0,0 +1,19 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +internal class LocalDateAdapter { + @ToJson + fun toJson(value: LocalDate): String { + return DateTimeFormatter.ISO_LOCAL_DATE.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDate { + return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) + } + +} diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt new file mode 100644 index 0000000000..fe7069904c --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter + +internal class LocalDateTimeAdapter { + @ToJson + fun toJson(value: LocalDateTime): String { + return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDateTime { + return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) + } + +} diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt new file mode 100644 index 0000000000..14b306918f --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -0,0 +1,16 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given request. + * NOTE: This object doesn't include 'body' because it + * allows for caching of the constructed object + * for many request definitions. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +internal data class RequestConfig( + val method: RequestMethod, + val path: String, + val headers: MutableMap = mutableMapOf(), + val query: Map> = mapOf() +) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt new file mode 100644 index 0000000000..e0fbb1e652 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt @@ -0,0 +1,8 @@ +package org.openapitools.client.infrastructure + +/** + * Provides enumerated HTTP verbs + */ +internal enum class RequestMethod { + GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt new file mode 100644 index 0000000000..5b71262046 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt @@ -0,0 +1,23 @@ +package org.openapitools.client.infrastructure + +import okhttp3.Response + +/** + * Provides an extension to evaluation whether the response is a 1xx code + */ +internal val Response.isInformational : Boolean get() = this.code in 100..199 + +/** + * Provides an extension to evaluation whether the response is a 3xx code + */ +internal val Response.isRedirect : Boolean get() = this.code in 300..399 + +/** + * Provides an extension to evaluation whether the response is a 4xx code + */ +internal val Response.isClientError : Boolean get() = this.code in 400..499 + +/** + * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code + */ +internal val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt new file mode 100644 index 0000000000..051082f562 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -0,0 +1,18 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.Moshi +import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter +import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory +import java.util.Date + +internal object Serializer { + @JvmStatic + val moshi: Moshi = Moshi.Builder() + .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) + .add(LocalDateTimeAdapter()) + .add(LocalDateAdapter()) + .add(UUIDAdapter()) + .add(ByteArrayAdapter()) + .add(KotlinJsonAdapterFactory()) + .build() +} diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt new file mode 100644 index 0000000000..02fa692b57 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt @@ -0,0 +1,13 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.util.UUID + +internal class UUIDAdapter { + @ToJson + fun toJson(uuid: UUID) = uuid.toString() + + @FromJson + fun fromJson(s: String) = UUID.fromString(s) +} diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt new file mode 100644 index 0000000000..a5bb444891 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -0,0 +1,33 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + + +import com.squareup.moshi.Json +/** + * Describes the result of uploading an image resource + * @param code + * @param type + * @param message + */ + +internal data class ApiResponse ( + @Json(name = "code") + val code: kotlin.Int? = null, + @Json(name = "type") + val type: kotlin.String? = null, + @Json(name = "message") + val message: kotlin.String? = null +) + + + diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt new file mode 100644 index 0000000000..70ed6b25e5 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -0,0 +1,30 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + + +import com.squareup.moshi.Json +/** + * A category for a pet + * @param id + * @param name + */ + +internal data class Category ( + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "name") + val name: kotlin.String? = null +) + + + diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt new file mode 100644 index 0000000000..23ee50a8af --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -0,0 +1,55 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + + +import com.squareup.moshi.Json +/** + * An order for a pets from the pet store + * @param id + * @param petId + * @param quantity + * @param shipDate + * @param status Order Status + * @param complete + */ + +internal data class Order ( + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "petId") + val petId: kotlin.Long? = null, + @Json(name = "quantity") + val quantity: kotlin.Int? = null, + @Json(name = "shipDate") + val shipDate: java.time.LocalDateTime? = null, + /* Order Status */ + @Json(name = "status") + val status: Order.Status? = null, + @Json(name = "complete") + val complete: kotlin.Boolean? = null +) + + +{ + /** + * Order Status + * Values: placed,approved,delivered + */ + + internal enum class Status(val value: kotlin.String){ + @Json(name = "placed") placed("placed"), + @Json(name = "approved") approved("approved"), + @Json(name = "delivered") delivered("delivered"); + } +} + diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt new file mode 100644 index 0000000000..2c0dcaa1a8 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -0,0 +1,57 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + +import org.openapitools.client.models.Category +import org.openapitools.client.models.Tag + +import com.squareup.moshi.Json +/** + * A pet for sale in the pet store + * @param id + * @param category + * @param name + * @param photoUrls + * @param tags + * @param status pet status in the store + */ + +internal data class Pet ( + @Json(name = "name") + val name: kotlin.String, + @Json(name = "photoUrls") + val photoUrls: kotlin.Array, + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "category") + val category: Category? = null, + @Json(name = "tags") + val tags: kotlin.Array? = null, + /* pet status in the store */ + @Json(name = "status") + val status: Pet.Status? = null +) + + +{ + /** + * pet status in the store + * Values: available,pending,sold + */ + + internal enum class Status(val value: kotlin.String){ + @Json(name = "available") available("available"), + @Json(name = "pending") pending("pending"), + @Json(name = "sold") sold("sold"); + } +} + diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt new file mode 100644 index 0000000000..0c36f402fd --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -0,0 +1,30 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + + +import com.squareup.moshi.Json +/** + * A tag for a pet + * @param id + * @param name + */ + +internal data class Tag ( + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "name") + val name: kotlin.String? = null +) + + + diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt new file mode 100644 index 0000000000..2070fe6d80 --- /dev/null +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt @@ -0,0 +1,49 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + + +import com.squareup.moshi.Json +/** + * A User who is purchasing from the pet store + * @param id + * @param username + * @param firstName + * @param lastName + * @param email + * @param password + * @param phone + * @param userStatus User Status + */ + +internal data class User ( + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "username") + val username: kotlin.String? = null, + @Json(name = "firstName") + val firstName: kotlin.String? = null, + @Json(name = "lastName") + val lastName: kotlin.String? = null, + @Json(name = "email") + val email: kotlin.String? = null, + @Json(name = "password") + val password: kotlin.String? = null, + @Json(name = "phone") + val phone: kotlin.String? = null, + /* User Status */ + @Json(name = "userStatus") + val userStatus: kotlin.Int? = null +) + + + diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator-ignore b/samples/client/petstore/kotlin-okhttp3/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/.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/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION new file mode 100644 index 0000000000..c3a2c7076f --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/README.md b/samples/client/petstore/kotlin-okhttp3/README.md new file mode 100644 index 0000000000..aef4ea15be --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/README.md @@ -0,0 +1,90 @@ +# org.openapitools.client - Kotlin client library for OpenAPI Petstore + +## Requires + +* Kotlin 1.3.41 +* Gradle 4.9 + +## Build + +First, create the gradle wrapper script: + +``` +gradle wrapper +``` + +Then, run: + +``` +./gradlew check assemble +``` + +This runs all tests and packages the library. + +## Features/Implementation Notes + +* Supports JSON inputs/outputs, File inputs, and Form inputs. +* Supports collection formats for query parameters: csv, tsv, ssv, pipes. +* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. +* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. + + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + + +## Documentation for Models + + - [org.openapitools.client.models.ApiResponse](docs/ApiResponse.md) + - [org.openapitools.client.models.Category](docs/Category.md) + - [org.openapitools.client.models.Order](docs/Order.md) + - [org.openapitools.client.models.Pet](docs/Pet.md) + - [org.openapitools.client.models.Tag](docs/Tag.md) + - [org.openapitools.client.models.User](docs/User.md) + + + +## Documentation for Authorization + + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + + +### petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - write:pets: modify pets in your account + - read:pets: read your pets + diff --git a/samples/client/petstore/kotlin-okhttp3/build.gradle b/samples/client/petstore/kotlin-okhttp3/build.gradle new file mode 100644 index 0000000000..c3a555eaae --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/build.gradle @@ -0,0 +1,37 @@ +group 'org.openapitools' +version '1.0.0' + +wrapper { + gradleVersion = '4.9' + distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" +} + +buildscript { + ext.kotlin_version = '1.3.41' + + repositories { + mavenCentral() + } + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +apply plugin: 'kotlin' + +repositories { + mavenCentral() +} + +test { + useJUnitPlatform() +} + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + compile "com.squareup.moshi:moshi-kotlin:1.8.0" + compile "com.squareup.moshi:moshi-adapters:1.8.0" + compile "com.squareup.okhttp3:okhttp:3.12.4" + testImplementation "io.kotlintest:kotlintest-runner-junit5:3.1.0" +} diff --git a/samples/client/petstore/kotlin-okhttp3/docs/ApiResponse.md b/samples/client/petstore/kotlin-okhttp3/docs/ApiResponse.md new file mode 100644 index 0000000000..6b4c6bf277 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/docs/ApiResponse.md @@ -0,0 +1,12 @@ + +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **kotlin.Int** | | [optional] +**type** | **kotlin.String** | | [optional] +**message** | **kotlin.String** | | [optional] + + + diff --git a/samples/client/petstore/kotlin-okhttp3/docs/Category.md b/samples/client/petstore/kotlin-okhttp3/docs/Category.md new file mode 100644 index 0000000000..2c28a670fc --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/docs/Category.md @@ -0,0 +1,11 @@ + +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**name** | **kotlin.String** | | [optional] + + + diff --git a/samples/client/petstore/kotlin-okhttp3/docs/Order.md b/samples/client/petstore/kotlin-okhttp3/docs/Order.md new file mode 100644 index 0000000000..ef31dbf2f4 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/docs/Order.md @@ -0,0 +1,22 @@ + +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**petId** | **kotlin.Long** | | [optional] +**quantity** | **kotlin.Int** | | [optional] +**shipDate** | [**java.time.LocalDateTime**](java.time.LocalDateTime.md) | | [optional] +**status** | [**inline**](#StatusEnum) | Order Status | [optional] +**complete** | **kotlin.Boolean** | | [optional] + + + +## Enum: status +Name | Value +---- | ----- +status | placed, approved, delivered + + + diff --git a/samples/client/petstore/kotlin-okhttp3/docs/Pet.md b/samples/client/petstore/kotlin-okhttp3/docs/Pet.md new file mode 100644 index 0000000000..ec77560073 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/docs/Pet.md @@ -0,0 +1,22 @@ + +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **kotlin.String** | | +**photoUrls** | **kotlin.Array<kotlin.String>** | | +**tags** | [**kotlin.Array<Tag>**](Tag.md) | | [optional] +**status** | [**inline**](#StatusEnum) | pet status in the store | [optional] + + + +## Enum: status +Name | Value +---- | ----- +status | available, pending, sold + + + diff --git a/samples/client/petstore/kotlin-okhttp3/docs/PetApi.md b/samples/client/petstore/kotlin-okhttp3/docs/PetApi.md new file mode 100644 index 0000000000..ea93e17452 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/docs/PetApi.md @@ -0,0 +1,405 @@ +# PetApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image + + + +# **addPet** +> addPet(body) + +Add a new pet to the store + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val body : Pet = // Pet | Pet object that needs to be added to the store +try { + apiInstance.addPet(body) +} catch (e: ClientException) { + println("4xx response calling PetApi#addPet") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#addPet") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | Pet id to delete +val apiKey : kotlin.String = apiKey_example // kotlin.String | +try { + apiInstance.deletePet(petId, apiKey) +} catch (e: ClientException) { + println("4xx response calling PetApi#deletePet") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#deletePet") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| Pet id to delete | + **apiKey** | **kotlin.String**| | [optional] + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **findPetsByStatus** +> kotlin.Array<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val status : kotlin.Array = // kotlin.Array | Status values that need to be considered for filter +try { + val result : kotlin.Array = apiInstance.findPetsByStatus(status) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#findPetsByStatus") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#findPetsByStatus") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] + +### Return type + +[**kotlin.Array<Pet>**](Pet.md) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **findPetsByTags** +> kotlin.Array<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val tags : kotlin.Array = // kotlin.Array | Tags to filter by +try { + val result : kotlin.Array = apiInstance.findPetsByTags(tags) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#findPetsByTags") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#findPetsByTags") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Tags to filter by | + +### Return type + +[**kotlin.Array<Pet>**](Pet.md) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to return +try { + val result : Pet = apiInstance.getPetById(petId) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#getPetById") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#getPetById") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + + +Configure api_key: + ApiClient.apiKey["api_key"] = "" + ApiClient.apiKeyPrefix["api_key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **updatePet** +> updatePet(body) + +Update an existing pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val body : Pet = // Pet | Pet object that needs to be added to the store +try { + apiInstance.updatePet(body) +} catch (e: ClientException) { + println("4xx response calling PetApi#updatePet") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#updatePet") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be updated +val name : kotlin.String = name_example // kotlin.String | Updated name of the pet +val status : kotlin.String = status_example // kotlin.String | Updated status of the pet +try { + apiInstance.updatePetWithForm(petId, name, status) +} catch (e: ClientException) { + println("4xx response calling PetApi#updatePetWithForm") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#updatePetWithForm") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| ID of pet that needs to be updated | + **name** | **kotlin.String**| Updated name of the pet | [optional] + **status** | **kotlin.String**| Updated status of the pet | [optional] + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + + +# **uploadFile** +> ApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to update +val additionalMetadata : kotlin.String = additionalMetadata_example // kotlin.String | Additional data to pass to server +val file : java.io.File = BINARY_DATA_HERE // java.io.File | file to upload +try { + val result : ApiResponse = apiInstance.uploadFile(petId, additionalMetadata, file) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#uploadFile") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#uploadFile") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| ID of pet to update | + **additionalMetadata** | **kotlin.String**| Additional data to pass to server | [optional] + **file** | **java.io.File**| file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/kotlin-okhttp3/docs/StoreApi.md b/samples/client/petstore/kotlin-okhttp3/docs/StoreApi.md new file mode 100644 index 0000000000..f4986041af --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/docs/StoreApi.md @@ -0,0 +1,196 @@ +# StoreApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet + + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +val orderId : kotlin.String = orderId_example // kotlin.String | ID of the order that needs to be deleted +try { + apiInstance.deleteOrder(orderId) +} catch (e: ClientException) { + println("4xx response calling StoreApi#deleteOrder") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#deleteOrder") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **kotlin.String**| ID of the order that needs to be deleted | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **getInventory** +> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +try { + val result : kotlin.collections.Map = apiInstance.getInventory() + println(result) +} catch (e: ClientException) { + println("4xx response calling StoreApi#getInventory") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#getInventory") + e.printStackTrace() +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**kotlin.collections.Map<kotlin.String, kotlin.Int>** + +### Authorization + + +Configure api_key: + ApiClient.apiKey["api_key"] = "" + ApiClient.apiKeyPrefix["api_key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +val orderId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be fetched +try { + val result : Order = apiInstance.getOrderById(orderId) + println(result) +} catch (e: ClientException) { + println("4xx response calling StoreApi#getOrderById") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#getOrderById") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **kotlin.Long**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **placeOrder** +> Order placeOrder(body) + +Place an order for a pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +val body : Order = // Order | order placed for purchasing the pet +try { + val result : Order = apiInstance.placeOrder(body) + println(result) +} catch (e: ClientException) { + println("4xx response calling StoreApi#placeOrder") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#placeOrder") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + diff --git a/samples/client/petstore/ruby-faraday/docs/StringBooleanMap.md b/samples/client/petstore/kotlin-okhttp3/docs/Tag.md similarity index 53% rename from samples/client/petstore/ruby-faraday/docs/StringBooleanMap.md rename to samples/client/petstore/kotlin-okhttp3/docs/Tag.md index 0fbc07cb04..60ce1bcdba 100644 --- a/samples/client/petstore/ruby-faraday/docs/StringBooleanMap.md +++ b/samples/client/petstore/kotlin-okhttp3/docs/Tag.md @@ -1,7 +1,11 @@ -# Petstore::StringBooleanMap + +# Tag ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**name** | **kotlin.String** | | [optional] + diff --git a/samples/client/petstore/kotlin-okhttp3/docs/User.md b/samples/client/petstore/kotlin-okhttp3/docs/User.md new file mode 100644 index 0000000000..e801729b5e --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/docs/User.md @@ -0,0 +1,17 @@ + +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**username** | **kotlin.String** | | [optional] +**firstName** | **kotlin.String** | | [optional] +**lastName** | **kotlin.String** | | [optional] +**email** | **kotlin.String** | | [optional] +**password** | **kotlin.String** | | [optional] +**phone** | **kotlin.String** | | [optional] +**userStatus** | **kotlin.Int** | User Status | [optional] + + + diff --git a/samples/client/petstore/kotlin-okhttp3/docs/UserApi.md b/samples/client/petstore/kotlin-okhttp3/docs/UserApi.md new file mode 100644 index 0000000000..0f55f06bc6 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/docs/UserApi.md @@ -0,0 +1,376 @@ +# UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user + + + +# **createUser** +> createUser(body) + +Create user + +This can only be done by the logged in user. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val body : User = // User | Created user object +try { + apiInstance.createUser(body) +} catch (e: ClientException) { + println("4xx response calling UserApi#createUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#createUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| Created user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(body) + +Creates list of users with given input array + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val body : kotlin.Array = // kotlin.Array | List of user object +try { + apiInstance.createUsersWithArrayInput(body) +} catch (e: ClientException) { + println("4xx response calling UserApi#createUsersWithArrayInput") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#createUsersWithArrayInput") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**kotlin.Array<User>**](User.md)| List of user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **createUsersWithListInput** +> createUsersWithListInput(body) + +Creates list of users with given input array + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val body : kotlin.Array = // kotlin.Array | List of user object +try { + apiInstance.createUsersWithListInput(body) +} catch (e: ClientException) { + println("4xx response calling UserApi#createUsersWithListInput") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#createUsersWithListInput") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**kotlin.Array<User>**](User.md)| List of user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | The name that needs to be deleted +try { + apiInstance.deleteUser(username) +} catch (e: ClientException) { + println("4xx response calling UserApi#deleteUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#deleteUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| The name that needs to be deleted | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | The name that needs to be fetched. Use user1 for testing. +try { + val result : User = apiInstance.getUserByName(username) + println(result) +} catch (e: ClientException) { + println("4xx response calling UserApi#getUserByName") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#getUserByName") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **loginUser** +> kotlin.String loginUser(username, password) + +Logs user into the system + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | The user name for login +val password : kotlin.String = password_example // kotlin.String | The password for login in clear text +try { + val result : kotlin.String = apiInstance.loginUser(username, password) + println(result) +} catch (e: ClientException) { + println("4xx response calling UserApi#loginUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#loginUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| The user name for login | + **password** | **kotlin.String**| The password for login in clear text | + +### Return type + +**kotlin.String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +try { + apiInstance.logoutUser() +} catch (e: ClientException) { + println("4xx response calling UserApi#logoutUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#logoutUser") + e.printStackTrace() +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **updateUser** +> updateUser(username, body) + +Updated user + +This can only be done by the logged in user. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | name that need to be deleted +val body : User = // User | Updated user object +try { + apiInstance.updateUser(username, body) +} catch (e: ClientException) { + println("4xx response calling UserApi#updateUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#updateUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| name that need to be deleted | + **body** | [**User**](User.md)| Updated user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + diff --git a/samples/client/petstore/kotlin-okhttp3/pom.xml b/samples/client/petstore/kotlin-okhttp3/pom.xml new file mode 100644 index 0000000000..37cf659dca --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + io.swagger + KotlinOkhttp3PetstoreClientTests + pom + 1.0-SNAPSHOT + Kotlin Okhttp3 Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + bundle-test + integration-test + + exec + + + gradle + + test + + + + + + + + diff --git a/samples/client/petstore/kotlin-okhttp3/settings.gradle b/samples/client/petstore/kotlin-okhttp3/settings.gradle new file mode 100644 index 0000000000..a18186278e --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/settings.gradle @@ -0,0 +1,2 @@ + +rootProject.name = 'kotlin-petstore-okhttp3' \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt new file mode 100644 index 0000000000..15f63f2a1b --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -0,0 +1,280 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.apis + +import org.openapitools.client.models.ApiResponse +import org.openapitools.client.models.Pet + +import org.openapitools.client.infrastructure.ApiClient +import org.openapitools.client.infrastructure.ClientException +import org.openapitools.client.infrastructure.ClientError +import org.openapitools.client.infrastructure.ServerException +import org.openapitools.client.infrastructure.ServerError +import org.openapitools.client.infrastructure.MultiValueMap +import org.openapitools.client.infrastructure.RequestConfig +import org.openapitools.client.infrastructure.RequestMethod +import org.openapitools.client.infrastructure.ResponseType +import org.openapitools.client.infrastructure.Success +import org.openapitools.client.infrastructure.toMultiValue + +class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiClient(basePath) { + + /** + * Add a new pet to the store + * + * @param body Pet object that needs to be added to the store + * @return void + */ + fun addPet(body: Pet) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/pet", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Deletes a pet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return void + */ + fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf("api_key" to apiKey.toString()) + val localVariableConfig = RequestConfig( + RequestMethod.DELETE, + "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + * @param status Status values that need to be considered for filter + * @return kotlin.Array + */ + @Suppress("UNCHECKED_CAST") + fun findPetsByStatus(status: kotlin.Array) : kotlin.Array { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf("status" to toMultiValue(status.toList(), "csv")) + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request>( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as kotlin.Array + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @param tags Tags to filter by + * @return kotlin.Array + */ + @Suppress("UNCHECKED_CAST") + fun findPetsByTags(tags: kotlin.Array) : kotlin.Array { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf("tags" to toMultiValue(tags.toList(), "csv")) + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request>( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as kotlin.Array + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Find pet by ID + * Returns a single pet + * @param petId ID of pet to return + * @return Pet + */ + @Suppress("UNCHECKED_CAST") + fun getPetById(petId: kotlin.Long) : Pet { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as Pet + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Update an existing pet + * + * @param body Pet object that needs to be added to the store + * @return void + */ + fun updatePet(body: Pet) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.PUT, + "/pet", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return void + */ + fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { + val localVariableBody: kotlin.Any? = mapOf("name" to "$name", "status" to "$status") + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * uploads an image + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return ApiResponse + */ + @Suppress("UNCHECKED_CAST") + fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to "$additionalMetadata", "file" to "$file") + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as ApiResponse + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + +} diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt new file mode 100644 index 0000000000..90d681f8f3 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -0,0 +1,152 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.apis + +import org.openapitools.client.models.Order + +import org.openapitools.client.infrastructure.ApiClient +import org.openapitools.client.infrastructure.ClientException +import org.openapitools.client.infrastructure.ClientError +import org.openapitools.client.infrastructure.ServerException +import org.openapitools.client.infrastructure.ServerError +import org.openapitools.client.infrastructure.MultiValueMap +import org.openapitools.client.infrastructure.RequestConfig +import org.openapitools.client.infrastructure.RequestMethod +import org.openapitools.client.infrastructure.ResponseType +import org.openapitools.client.infrastructure.Success +import org.openapitools.client.infrastructure.toMultiValue + +class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiClient(basePath) { + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @param orderId ID of the order that needs to be deleted + * @return void + */ + fun deleteOrder(orderId: kotlin.String) : Unit { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.DELETE, + "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * @return kotlin.collections.Map + */ + @Suppress("UNCHECKED_CAST") + fun getInventory() : kotlin.collections.Map { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request>( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as kotlin.collections.Map + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @param orderId ID of pet that needs to be fetched + * @return Order + */ + @Suppress("UNCHECKED_CAST") + fun getOrderById(orderId: kotlin.Long) : Order { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as Order + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Place an order for a pet + * + * @param body order placed for purchasing the pet + * @return Order + */ + @Suppress("UNCHECKED_CAST") + fun placeOrder(body: Order) : Order { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/store/order", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as Order + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + +} diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt new file mode 100644 index 0000000000..daaaeae315 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -0,0 +1,273 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.apis + +import org.openapitools.client.models.User + +import org.openapitools.client.infrastructure.ApiClient +import org.openapitools.client.infrastructure.ClientException +import org.openapitools.client.infrastructure.ClientError +import org.openapitools.client.infrastructure.ServerException +import org.openapitools.client.infrastructure.ServerError +import org.openapitools.client.infrastructure.MultiValueMap +import org.openapitools.client.infrastructure.RequestConfig +import org.openapitools.client.infrastructure.RequestMethod +import org.openapitools.client.infrastructure.ResponseType +import org.openapitools.client.infrastructure.Success +import org.openapitools.client.infrastructure.toMultiValue + +class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiClient(basePath) { + + /** + * Create user + * This can only be done by the logged in user. + * @param body Created user object + * @return void + */ + fun createUser(body: User) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/user", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Creates list of users with given input array + * + * @param body List of user object + * @return void + */ + fun createUsersWithArrayInput(body: kotlin.Array) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Creates list of users with given input array + * + * @param body List of user object + * @return void + */ + fun createUsersWithListInput(body: kotlin.Array) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Delete user + * This can only be done by the logged in user. + * @param username The name that needs to be deleted + * @return void + */ + fun deleteUser(username: kotlin.String) : Unit { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.DELETE, + "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return User + */ + @Suppress("UNCHECKED_CAST") + fun getUserByName(username: kotlin.String) : User { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as User + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Logs user into the system + * + * @param username The user name for login + * @param password The password for login in clear text + * @return kotlin.String + */ + @Suppress("UNCHECKED_CAST") + fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf("username" to listOf("$username"), "password" to listOf("$password")) + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/user/login", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as kotlin.String + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Logs out current logged in user session + * + * @return void + */ + fun logoutUser() : Unit { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + + /** + * Updated user + * This can only be done by the logged in user. + * @param username name that need to be deleted + * @param body Updated user object + * @return void + */ + fun updateUser(username: kotlin.String, body: User) : Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + val localVariableConfig = RequestConfig( + RequestMethod.PUT, + "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders + ) + val response = request( + localVariableConfig, + localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + +} diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt new file mode 100644 index 0000000000..f97cb88d23 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt @@ -0,0 +1,23 @@ +package org.openapitools.client.infrastructure + +typealias MultiValueMap = Map> + +fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { + "csv" -> "," + "tsv" -> "\t" + "pipes" -> "|" + "ssv" -> " " + else -> "" +} + +val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } + +fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) + = toMultiValue(items.asIterable(), collectionFormat, map) + +fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { + return when(collectionFormat) { + "multi" -> items.map(map) + else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt new file mode 100644 index 0000000000..3c5a60ccd3 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -0,0 +1,168 @@ +package org.openapitools.client.infrastructure + +import okhttp3.OkHttpClient +import okhttp3.RequestBody +import okhttp3.MediaType +import okhttp3.FormBody +import okhttp3.HttpUrl +import okhttp3.ResponseBody +import okhttp3.Request +import java.io.File + +open class ApiClient(val baseUrl: String) { + companion object { + protected const val ContentType = "Content-Type" + protected const val Accept = "Accept" + protected const val Authorization = "Authorization" + protected const val JsonMediaType = "application/json" + protected const val FormDataMediaType = "multipart/form-data" + protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" + protected const val XmlMediaType = "application/xml" + + val apiKey: MutableMap = mutableMapOf() + val apiKeyPrefix: MutableMap = mutableMapOf() + var username: String? = null + var password: String? = null + var accessToken: String? = null + + @JvmStatic + val client: OkHttpClient by lazy { + builder.build() + } + + @JvmStatic + val builder: OkHttpClient.Builder = OkHttpClient.Builder() + } + + protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + when { + content is File -> RequestBody.create( + MediaType.parse(mediaType), content + ) + mediaType == FormDataMediaType || mediaType == FormUrlEncMediaType -> { + FormBody.Builder().apply { + // content's type *must* be Map + @Suppress("UNCHECKED_CAST") + (content as Map).forEach { (key, value) -> + add(key, value) + } + }.build() + } + mediaType == JsonMediaType -> RequestBody.create( + MediaType.parse(mediaType), Serializer.moshi.adapter(T::class.java).toJson(content) + ) + mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") + // TODO: this should be extended with other serializers + else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") + } + + protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { + if(body == null) { + return null + } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } + return when(mediaType) { + JsonMediaType -> Serializer.moshi.adapter(T::class.java).fromJson(bodyContent) + else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") + } + } + + protected fun updateAuthParams(requestConfig: RequestConfig) { + if (requestConfig.headers["api_key"].isNullOrEmpty()) { + if (apiKey["api_key"] != null) { + if (apiKeyPrefix["api_key"] != null) { + requestConfig.headers["api_key"] = apiKeyPrefix["api_key"]!! + " " + apiKey["api_key"]!! + } else { + requestConfig.headers["api_key"] = apiKey["api_key"]!! + } + } + } + if (requestConfig.headers[Authorization].isNullOrEmpty()) { + requestConfig.headers[Authorization] = "Bearer " + accessToken + } + } + + protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + val httpUrl = HttpUrl.parse(baseUrl) ?: throw IllegalStateException("baseUrl is invalid.") + + // take authMethod from operation + updateAuthParams(requestConfig) + + val url = httpUrl.newBuilder() + .addPathSegments(requestConfig.path.trimStart('/')) + .apply { + requestConfig.query.forEach { query -> + query.value.forEach { queryValue -> + addQueryParameter(query.key, queryValue) + } + } + }.build() + + // take content-type/accept from spec or set to default (application/json) if not defined + if (requestConfig.headers[ContentType].isNullOrEmpty()) { + requestConfig.headers[ContentType] = JsonMediaType + } + if (requestConfig.headers[Accept].isNullOrEmpty()) { + requestConfig.headers[Accept] = JsonMediaType + } + val headers = requestConfig.headers + + if(headers[ContentType] ?: "" == "") { + throw kotlin.IllegalStateException("Missing Content-Type header. This is required.") + } + + if(headers[Accept] ?: "" == "") { + throw kotlin.IllegalStateException("Missing Accept header. This is required.") + } + + // TODO: support multiple contentType options here. + val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() + + val request = when (requestConfig.method) { + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.GET -> Request.Builder().url(url) + RequestMethod.HEAD -> Request.Builder().url(url).head() + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) + }.apply { + headers.forEach { header -> addHeader(header.key, header.value) } + }.build() + + val response = client.newCall(request).execute() + val accept = response.header(ContentType)?.substringBefore(";")?.toLowerCase() + + // TODO: handle specific mapping types. e.g. Map> + when { + response.isRedirect -> return Redirection( + response.code(), + response.headers().toMultimap() + ) + response.isInformational -> return Informational( + response.message(), + response.code(), + response.headers().toMultimap() + ) + response.isSuccessful -> return Success( + responseBody(response.body(), accept), + response.code(), + response.headers().toMultimap() + ) + response.isClientError -> return ClientError( + response.body()?.string(), + response.code(), + response.headers().toMultimap() + ) + else -> return ServerError( + null, + response.body()?.string(), + response.code(), + response.headers().toMultimap() + ) + } + } +} diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt new file mode 100644 index 0000000000..f1a8aecc91 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt @@ -0,0 +1,40 @@ +package org.openapitools.client.infrastructure + +enum class ResponseType { + Success, Informational, Redirection, ClientError, ServerError +} + +abstract class ApiInfrastructureResponse(val responseType: ResponseType) { + abstract val statusCode: Int + abstract val headers: Map> +} + +class Success( + val data: T, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +): ApiInfrastructureResponse(ResponseType.Success) + +class Informational( + val statusText: String, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiInfrastructureResponse(ResponseType.Informational) + +class Redirection( + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiInfrastructureResponse(ResponseType.Redirection) + +class ClientError( + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiInfrastructureResponse(ResponseType.ClientError) + +class ServerError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> +): ApiInfrastructureResponse(ResponseType.ServerError) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt new file mode 100644 index 0000000000..dd34bd48b2 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt @@ -0,0 +1,29 @@ +package org.openapitools.client.infrastructure + +import kotlin.properties.ReadWriteProperty +import kotlin.reflect.KProperty + +object ApplicationDelegates { + /** + * Provides a property delegate, allowing the property to be set once and only once. + * + * If unset (no default value), a get on the property will throw [IllegalStateException]. + */ + fun setOnce(defaultValue: T? = null) : ReadWriteProperty = SetOnce(defaultValue) + + private class SetOnce(defaultValue: T? = null) : ReadWriteProperty { + private var isSet = false + private var value: T? = defaultValue + + override fun getValue(thisRef: Any?, property: KProperty<*>): T { + return value ?: throw IllegalStateException("${property.name} not initialized") + } + + override fun setValue(thisRef: Any?, property: KProperty<*>, value: T) = synchronized(this) { + if (!isSet) { + this.value = value + isSet = true + } + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt new file mode 100644 index 0000000000..617ac3fe90 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt @@ -0,0 +1,12 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson + +class ByteArrayAdapter { + @ToJson + fun toJson(data: ByteArray): String = String(data) + + @FromJson + fun fromJson(data: String): ByteArray = data.toByteArray() +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt new file mode 100644 index 0000000000..2f3b0157ba --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt @@ -0,0 +1,42 @@ +@file:Suppress("unused") +package org.openapitools.client.infrastructure + +import java.lang.RuntimeException + +open class ClientException : RuntimeException { + + /** + * Constructs an [ClientException] with no detail message. + */ + constructor() : super() + + /** + * Constructs an [ClientException] with the specified detail message. + + * @param message the detail message. + */ + constructor(message: kotlin.String) : super(message) + + companion object { + private const val serialVersionUID: Long = 123L + } +} + +open class ServerException : RuntimeException { + + /** + * Constructs an [ServerException] with no detail message. + */ + constructor() : super() + + /** + * Constructs an [ServerException] with the specified detail message. + + * @param message the detail message. + */ + constructor(message: kotlin.String) : super(message) + + companion object { + private const val serialVersionUID: Long = 456L + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt new file mode 100644 index 0000000000..b2e1654479 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt @@ -0,0 +1,19 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class LocalDateAdapter { + @ToJson + fun toJson(value: LocalDate): String { + return DateTimeFormatter.ISO_LOCAL_DATE.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDate { + return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) + } + +} diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt new file mode 100644 index 0000000000..e082db9481 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter + +class LocalDateTimeAdapter { + @ToJson + fun toJson(value: LocalDateTime): String { + return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDateTime { + return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) + } + +} diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt new file mode 100644 index 0000000000..53e689237d --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -0,0 +1,16 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given request. + * NOTE: This object doesn't include 'body' because it + * allows for caching of the constructed object + * for many request definitions. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class RequestConfig( + val method: RequestMethod, + val path: String, + val headers: MutableMap = mutableMapOf(), + val query: Map> = mapOf() +) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt new file mode 100644 index 0000000000..931b12b8bd --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt @@ -0,0 +1,8 @@ +package org.openapitools.client.infrastructure + +/** + * Provides enumerated HTTP verbs + */ +enum class RequestMethod { + GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt new file mode 100644 index 0000000000..68209f9165 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt @@ -0,0 +1,23 @@ +package org.openapitools.client.infrastructure + +import okhttp3.Response + +/** + * Provides an extension to evaluation whether the response is a 1xx code + */ +val Response.isInformational : Boolean get() = this.code() in 100..199 + +/** + * Provides an extension to evaluation whether the response is a 3xx code + */ +val Response.isRedirect : Boolean get() = this.code() in 300..399 + +/** + * Provides an extension to evaluation whether the response is a 4xx code + */ +val Response.isClientError : Boolean get() = this.code() in 400..499 + +/** + * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code + */ +val Response.isServerError : Boolean get() = this.code() in 500..999 diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt new file mode 100644 index 0000000000..7c5a353e0f --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -0,0 +1,18 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.Moshi +import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter +import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory +import java.util.Date + +object Serializer { + @JvmStatic + val moshi: Moshi = Moshi.Builder() + .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) + .add(LocalDateTimeAdapter()) + .add(LocalDateAdapter()) + .add(UUIDAdapter()) + .add(ByteArrayAdapter()) + .add(KotlinJsonAdapterFactory()) + .build() +} diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt new file mode 100644 index 0000000000..a4a44cc18b --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt @@ -0,0 +1,13 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.util.UUID + +class UUIDAdapter { + @ToJson + fun toJson(uuid: UUID) = uuid.toString() + + @FromJson + fun fromJson(s: String) = UUID.fromString(s) +} diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt new file mode 100644 index 0000000000..47766821f1 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -0,0 +1,33 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + + +import com.squareup.moshi.Json +/** + * Describes the result of uploading an image resource + * @param code + * @param type + * @param message + */ + +data class ApiResponse ( + @Json(name = "code") + val code: kotlin.Int? = null, + @Json(name = "type") + val type: kotlin.String? = null, + @Json(name = "message") + val message: kotlin.String? = null +) + + + diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt new file mode 100644 index 0000000000..edb16cc127 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -0,0 +1,30 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + + +import com.squareup.moshi.Json +/** + * A category for a pet + * @param id + * @param name + */ + +data class Category ( + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "name") + val name: kotlin.String? = null +) + + + diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt new file mode 100644 index 0000000000..bcdb149159 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -0,0 +1,55 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + + +import com.squareup.moshi.Json +/** + * An order for a pets from the pet store + * @param id + * @param petId + * @param quantity + * @param shipDate + * @param status Order Status + * @param complete + */ + +data class Order ( + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "petId") + val petId: kotlin.Long? = null, + @Json(name = "quantity") + val quantity: kotlin.Int? = null, + @Json(name = "shipDate") + val shipDate: java.time.LocalDateTime? = null, + /* Order Status */ + @Json(name = "status") + val status: Order.Status? = null, + @Json(name = "complete") + val complete: kotlin.Boolean? = null +) + + +{ + /** + * Order Status + * Values: placed,approved,delivered + */ + + enum class Status(val value: kotlin.String){ + @Json(name = "placed") placed("placed"), + @Json(name = "approved") approved("approved"), + @Json(name = "delivered") delivered("delivered"); + } +} + diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt new file mode 100644 index 0000000000..f6f7371601 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -0,0 +1,57 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + +import org.openapitools.client.models.Category +import org.openapitools.client.models.Tag + +import com.squareup.moshi.Json +/** + * A pet for sale in the pet store + * @param id + * @param category + * @param name + * @param photoUrls + * @param tags + * @param status pet status in the store + */ + +data class Pet ( + @Json(name = "name") + val name: kotlin.String, + @Json(name = "photoUrls") + val photoUrls: kotlin.Array, + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "category") + val category: Category? = null, + @Json(name = "tags") + val tags: kotlin.Array? = null, + /* pet status in the store */ + @Json(name = "status") + val status: Pet.Status? = null +) + + +{ + /** + * pet status in the store + * Values: available,pending,sold + */ + + enum class Status(val value: kotlin.String){ + @Json(name = "available") available("available"), + @Json(name = "pending") pending("pending"), + @Json(name = "sold") sold("sold"); + } +} + diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt new file mode 100644 index 0000000000..05dc7c9afe --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -0,0 +1,30 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + + +import com.squareup.moshi.Json +/** + * A tag for a pet + * @param id + * @param name + */ + +data class Tag ( + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "name") + val name: kotlin.String? = null +) + + + diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt new file mode 100644 index 0000000000..537b01d3c2 --- /dev/null +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt @@ -0,0 +1,49 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.client.models + + +import com.squareup.moshi.Json +/** + * A User who is purchasing from the pet store + * @param id + * @param username + * @param firstName + * @param lastName + * @param email + * @param password + * @param phone + * @param userStatus User Status + */ + +data class User ( + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "username") + val username: kotlin.String? = null, + @Json(name = "firstName") + val firstName: kotlin.String? = null, + @Json(name = "lastName") + val lastName: kotlin.String? = null, + @Json(name = "email") + val email: kotlin.String? = null, + @Json(name = "password") + val password: kotlin.String? = null, + @Json(name = "phone") + val phone: kotlin.String? = null, + /* User Status */ + @Json(name = "userStatus") + val userStatus: kotlin.Int? = null +) + + + diff --git a/samples/client/petstore/kotlin-string/build.gradle b/samples/client/petstore/kotlin-string/build.gradle index c09f7912cf..98ac4f243e 100644 --- a/samples/client/petstore/kotlin-string/build.gradle +++ b/samples/client/petstore/kotlin-string/build.gradle @@ -32,6 +32,6 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.8.0" compile "com.squareup.moshi:moshi-adapters:1.8.0" - compile "com.squareup.okhttp3:okhttp:4.0.1" + compile "com.squareup.okhttp3:okhttp:4.2.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index def00253ae..3df0d806a9 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -124,7 +124,7 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete() + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt index 934962ec6b..69b562becb 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt @@ -20,4 +20,4 @@ val Response.isClientError : Boolean get() = this.code in 400..499 /** * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code */ -val Response.isServerError : Boolean get() = this.code in 500..999 \ No newline at end of file +val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 6d5c231ccc..8d5c8448f0 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -31,4 +31,9 @@ data class ApiResponse ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt index 1fe92af826..7895d7627a 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -28,4 +28,9 @@ data class Category ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt index 81cc2b0940..cb75cf72b8 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -42,22 +42,18 @@ data class Order ( : Serializable { - + companion object { + private const val serialVersionUID: Long = 123 + } /** * Order Status * Values: placed,approved,delivered */ enum class Status(val value: kotlin.String){ - @Json(name = "placed") placed("placed"), - @Json(name = "approved") approved("approved"), - @Json(name = "delivered") delivered("delivered"); - - } - } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt index 3b4dfc22ab..2f0e9aecfc 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -44,22 +44,18 @@ data class Pet ( : Serializable { - + companion object { + private const val serialVersionUID: Long = 123 + } /** * pet status in the store * Values: available,pending,sold */ enum class Status(val value: kotlin.String){ - @Json(name = "available") available("available"), - @Json(name = "pending") pending("pending"), - @Json(name = "sold") sold("sold"); - - } - } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt index 1d97954c46..7fb7435712 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -28,4 +28,9 @@ data class Tag ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt index df835a5d96..e66f3cf09f 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt @@ -47,4 +47,9 @@ data class User ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/client/petstore/kotlin-threetenbp/build.gradle b/samples/client/petstore/kotlin-threetenbp/build.gradle index b9094d81f3..9cd18f3a5f 100644 --- a/samples/client/petstore/kotlin-threetenbp/build.gradle +++ b/samples/client/petstore/kotlin-threetenbp/build.gradle @@ -32,7 +32,7 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.8.0" compile "com.squareup.moshi:moshi-adapters:1.8.0" - compile "com.squareup.okhttp3:okhttp:4.0.1" + compile "com.squareup.okhttp3:okhttp:4.2.0" compile "org.threeten:threetenbp:1.3.8" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index def00253ae..3df0d806a9 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -124,7 +124,7 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete() + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt index 934962ec6b..69b562becb 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt @@ -20,4 +20,4 @@ val Response.isClientError : Boolean get() = this.code in 400..499 /** * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code */ -val Response.isServerError : Boolean get() = this.code in 500..999 \ No newline at end of file +val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt index af6dcb4560..a1e3c6e200 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -41,22 +41,15 @@ data class Order ( { - /** * Order Status * Values: placed,approved,delivered */ enum class Status(val value: kotlin.String){ - @Json(name = "placed") placed("placed"), - @Json(name = "approved") approved("approved"), - @Json(name = "delivered") delivered("delivered"); - - } - } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt index 8015b6dab7..f6f7371601 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -43,22 +43,15 @@ data class Pet ( { - /** * pet status in the store * Values: available,pending,sold */ enum class Status(val value: kotlin.String){ - @Json(name = "available") available("available"), - @Json(name = "pending") pending("pending"), - @Json(name = "sold") sold("sold"); - - } - } diff --git a/samples/client/petstore/kotlin/build.gradle b/samples/client/petstore/kotlin/build.gradle index c09f7912cf..98ac4f243e 100644 --- a/samples/client/petstore/kotlin/build.gradle +++ b/samples/client/petstore/kotlin/build.gradle @@ -32,6 +32,6 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.8.0" compile "com.squareup.moshi:moshi-adapters:1.8.0" - compile "com.squareup.okhttp3:okhttp:4.0.1" + compile "com.squareup.okhttp3:okhttp:4.2.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index def00253ae..3df0d806a9 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -124,7 +124,7 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete() + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt index 934962ec6b..69b562becb 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt @@ -20,4 +20,4 @@ val Response.isClientError : Boolean get() = this.code in 400..499 /** * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code */ -val Response.isServerError : Boolean get() = this.code in 500..999 \ No newline at end of file +val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 6d5c231ccc..8d5c8448f0 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -31,4 +31,9 @@ data class ApiResponse ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt index 1fe92af826..7895d7627a 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -28,4 +28,9 @@ data class Category ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt index a5478a6162..47862cfb7b 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -42,22 +42,18 @@ data class Order ( : Serializable { - + companion object { + private const val serialVersionUID: Long = 123 + } /** * Order Status * Values: placed,approved,delivered */ enum class Status(val value: kotlin.String){ - @Json(name = "placed") placed("placed"), - @Json(name = "approved") approved("approved"), - @Json(name = "delivered") delivered("delivered"); - - } - } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt index 3b4dfc22ab..2f0e9aecfc 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -44,22 +44,18 @@ data class Pet ( : Serializable { - + companion object { + private const val serialVersionUID: Long = 123 + } /** * pet status in the store * Values: available,pending,sold */ enum class Status(val value: kotlin.String){ - @Json(name = "available") available("available"), - @Json(name = "pending") pending("pending"), - @Json(name = "sold") sold("sold"); - - } - } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt index 1d97954c46..7fb7435712 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -28,4 +28,9 @@ data class Tag ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt index df835a5d96..e66f3cf09f 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt @@ -47,4 +47,9 @@ data class User ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/client/petstore/perl/docs/HasOnlyReadOnly.md b/samples/client/petstore/perl/docs/HasOnlyReadOnly.md index 80f3295344..490edb7080 100644 --- a/samples/client/petstore/perl/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/perl/docs/HasOnlyReadOnly.md @@ -8,8 +8,8 @@ use WWW::OpenAPIClient::Object::HasOnlyReadOnly; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **string** | | [optional] -**foo** | **string** | | [optional] +**bar** | **string** | | [optional] [readonly] +**foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/docs/Name.md b/samples/client/petstore/perl/docs/Name.md index ed4f1aa569..d4b189263c 100644 --- a/samples/client/petstore/perl/docs/Name.md +++ b/samples/client/petstore/perl/docs/Name.md @@ -9,9 +9,9 @@ use WWW::OpenAPIClient::Object::Name; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **int** | | -**snake_case** | **int** | | [optional] +**snake_case** | **int** | | [optional] [readonly] **property** | **string** | | [optional] -**_123_number** | **int** | | [optional] +**_123_number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/perl/docs/ReadOnlyFirst.md b/samples/client/petstore/perl/docs/ReadOnlyFirst.md index 74a61f4878..aabe902d53 100644 --- a/samples/client/petstore/perl/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/perl/docs/ReadOnlyFirst.md @@ -8,7 +8,7 @@ use WWW::OpenAPIClient::Object::ReadOnlyFirst; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **string** | | [optional] +**bar** | **string** | | [optional] [readonly] **baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/HasOnlyReadOnly.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/HasOnlyReadOnly.md index 573e7cd2f1..3f4d729d56 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/HasOnlyReadOnly.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **string** | | [optional] -**foo** | **string** | | [optional] +**bar** | **string** | | [optional] [readonly] +**foo** | **string** | | [optional] [readonly] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/Name.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/Name.md index d6839ec136..a501f9bb0d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/Name.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **int** | | -**snake_case** | **int** | | [optional] +**snake_case** | **int** | | [optional] [readonly] **property** | **string** | | [optional] -**_123_number** | **int** | | [optional] +**_123_number** | **int** | | [optional] [readonly] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/ReadOnlyFirst.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/ReadOnlyFirst.md index d9bd8bdf90..40bf46c3ed 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/ReadOnlyFirst.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **string** | | [optional] +**bar** | **string** | | [optional] [readonly] **baz** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index afa6365606..c3a2c7076f 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/powershell/src/Org.OpenAPITools/Model/New-Pet.ps1 b/samples/client/petstore/powershell/src/Org.OpenAPITools/Model/New-Pet.ps1 index 733267b0ac..27f0f8a42d 100644 --- a/samples/client/petstore/powershell/src/Org.OpenAPITools/Model/New-Pet.ps1 +++ b/samples/client/petstore/powershell/src/Org.OpenAPITools/Model/New-Pet.ps1 @@ -5,7 +5,7 @@ function New-Pet { [System.Nullable[Int64]] ${id}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] - [System.Nullable[Org.OpenAPITools.Model.Category]] + [Org.OpenAPITools.Model.Category] ${category}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $true)] [String] @@ -14,7 +14,7 @@ function New-Pet { [String[]] ${photoUrls}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] - [System.Nullable[Org.OpenAPITools.Model.Tag[]]] + [Org.OpenAPITools.Model.Tag[]] ${tags}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] [String] diff --git a/samples/client/petstore/python-asyncio/docs/HasOnlyReadOnly.md b/samples/client/petstore/python-asyncio/docs/HasOnlyReadOnly.md index 44ad450b52..f731a42eab 100644 --- a/samples/client/petstore/python-asyncio/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/python-asyncio/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] -**foo** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] +**foo** | **str** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-asyncio/docs/Name.md b/samples/client/petstore/python-asyncio/docs/Name.md index 542da3f047..17dc7a38fe 100644 --- a/samples/client/petstore/python-asyncio/docs/Name.md +++ b/samples/client/petstore/python-asyncio/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **int** | | -**snake_case** | **int** | | [optional] +**snake_case** | **int** | | [optional] [readonly] **_property** | **str** | | [optional] -**_123_number** | **int** | | [optional] +**_123_number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-asyncio/docs/ReadOnlyFirst.md b/samples/client/petstore/python-asyncio/docs/ReadOnlyFirst.md index 93fed253d0..6bc1447c1d 100644 --- a/samples/client/petstore/python-asyncio/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/python-asyncio/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] **baz** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py index a47a8e3ea1..268310a3e2 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py @@ -103,8 +103,8 @@ class AnotherFakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501 collection_formats = {} 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 00333bfd2c..6907451d92 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 @@ -103,8 +103,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'xml_item' is set - if ('xml_item' not in local_var_params or - local_var_params['xml_item'] is None): + if self.api_client.client_side_validation and ('xml_item' not in local_var_params or # noqa: E501 + local_var_params['xml_item'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501 collection_formats = {} @@ -627,8 +627,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -735,12 +735,12 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in local_var_params or - local_var_params['query'] is None): + if self.api_client.client_side_validation and ('query' not in local_var_params or # noqa: E501 + local_var_params['query'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -748,7 +748,7 @@ class FakeApi(object): path_params = {} query_params = [] - if 'query' in local_var_params: + if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -849,8 +849,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -987,49 +987,49 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in local_var_params or - local_var_params['number'] is None): + if self.api_client.client_side_validation and ('number' not in local_var_params or # noqa: E501 + local_var_params['number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in local_var_params or - local_var_params['double'] is None): + if self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 + local_var_params['double'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in local_var_params or - local_var_params['pattern_without_delimiter'] is None): + if self.api_client.client_side_validation and ('pattern_without_delimiter' not in local_var_params or # noqa: E501 + local_var_params['pattern_without_delimiter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in local_var_params or - local_var_params['byte'] is None): + if self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 + local_var_params['byte'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ApiValueError("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(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if self.api_client.client_side_validation and 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ApiValueError("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(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if self.api_client.client_side_validation and 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ApiValueError("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): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) > 64): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) < 10): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) < 10): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -1180,14 +1180,14 @@ class FakeApi(object): path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params: + if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'csv' # noqa: E501 - if 'enum_query_string' in local_var_params: + if 'enum_query_string' in local_var_params and local_var_params['enum_query_string'] is not None: # noqa: E501 query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in local_var_params: + if 'enum_query_integer' in local_var_params and local_var_params['enum_query_integer'] is not None: # noqa: E501 query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in local_var_params: + if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} @@ -1306,16 +1306,16 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - if ('required_string_group' not in local_var_params or - local_var_params['required_string_group'] is None): + if self.api_client.client_side_validation and ('required_string_group' not in local_var_params or # noqa: E501 + local_var_params['required_string_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_string_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_boolean_group' is set - if ('required_boolean_group' not in local_var_params or - local_var_params['required_boolean_group'] is None): + if self.api_client.client_side_validation and ('required_boolean_group' not in local_var_params or # noqa: E501 + local_var_params['required_boolean_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_boolean_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_int64_group' is set - if ('required_int64_group' not in local_var_params or - local_var_params['required_int64_group'] is None): + if self.api_client.client_side_validation and ('required_int64_group' not in local_var_params or # noqa: E501 + local_var_params['required_int64_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501 collection_formats = {} @@ -1323,13 +1323,13 @@ class FakeApi(object): path_params = {} query_params = [] - if 'required_string_group' in local_var_params: + if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 query_params.append(('required_string_group', local_var_params['required_string_group'])) # noqa: E501 - if 'required_int64_group' in local_var_params: + if 'required_int64_group' in local_var_params and local_var_params['required_int64_group'] is not None: # noqa: E501 query_params.append(('required_int64_group', local_var_params['required_int64_group'])) # noqa: E501 - if 'string_group' in local_var_params: + if 'string_group' in local_var_params and local_var_params['string_group'] is not None: # noqa: E501 query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 - if 'int64_group' in local_var_params: + if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = {} @@ -1426,8 +1426,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1534,12 +1534,12 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in local_var_params or - local_var_params['param2'] is None): + if self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 + local_var_params['param2'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1656,24 +1656,24 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - if ('pipe' not in local_var_params or - local_var_params['pipe'] is None): + if self.api_client.client_side_validation and ('pipe' not in local_var_params or # noqa: E501 + local_var_params['pipe'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pipe` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'ioutil' is set - if ('ioutil' not in local_var_params or - local_var_params['ioutil'] is None): + if self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 + local_var_params['ioutil'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ioutil` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'http' is set - if ('http' not in local_var_params or - local_var_params['http'] is None): + if self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 + local_var_params['http'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `http` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'url' is set - if ('url' not in local_var_params or - local_var_params['url'] is None): + if self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 + local_var_params['url'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `url` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'context' is set - if ('context' not in local_var_params or - local_var_params['context'] is None): + if self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 + local_var_params['context'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} @@ -1681,19 +1681,19 @@ class FakeApi(object): path_params = {} query_params = [] - if 'pipe' in local_var_params: + if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 query_params.append(('pipe', local_var_params['pipe'])) # noqa: E501 collection_formats['pipe'] = 'csv' # noqa: E501 - if 'ioutil' in local_var_params: + if 'ioutil' in local_var_params and local_var_params['ioutil'] is not None: # noqa: E501 query_params.append(('ioutil', local_var_params['ioutil'])) # noqa: E501 collection_formats['ioutil'] = 'csv' # noqa: E501 - if 'http' in local_var_params: + if 'http' in local_var_params and local_var_params['http'] is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'space' # noqa: E501 - if 'url' in local_var_params: + if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 query_params.append(('url', local_var_params['url'])) # noqa: E501 collection_formats['url'] = 'csv' # noqa: E501 - if 'context' in local_var_params: + if 'context' in local_var_params and local_var_params['context'] is not None: # noqa: E501 query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py index 3e778e9226..90579feaae 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py @@ -103,8 +103,8 @@ class FakeClassnameTags123Api(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py index 1deb664c43..54abb9b95e 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py @@ -101,8 +101,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -209,8 +209,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -315,8 +315,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in local_var_params or - local_var_params['status'] is None): + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -324,7 +324,7 @@ class PetApi(object): path_params = {} query_params = [] - if 'status' in local_var_params: + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -424,8 +424,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in local_var_params or - local_var_params['tags'] is None): + if self.api_client.client_side_validation and ('tags' not in local_var_params or # noqa: E501 + local_var_params['tags'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -433,7 +433,7 @@ class PetApi(object): path_params = {} query_params = [] - if 'tags' in local_var_params: + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 @@ -533,8 +533,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -639,8 +639,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -749,8 +749,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -863,8 +863,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -981,12 +981,12 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'required_file' is set - if ('required_file' not in local_var_params or - local_var_params['required_file'] is None): + if self.api_client.client_side_validation and ('required_file' not in local_var_params or # noqa: E501 + local_var_params['required_file'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py index c3aa1c4a3d..b907b107b2 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py @@ -103,8 +103,8 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -307,13 +307,13 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} @@ -417,8 +417,8 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py index d3674f5ba5..268721dcb8 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py @@ -103,8 +103,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -205,8 +205,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -307,8 +307,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -411,8 +411,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -513,8 +513,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -621,12 +621,12 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in local_var_params or - local_var_params['password'] is None): + if self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 + local_var_params['password'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -634,9 +634,9 @@ class UserApi(object): path_params = {} query_params = [] - if 'username' in local_var_params: + if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params: + if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} @@ -831,12 +831,12 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_user`") # noqa: E501 collection_formats = {} 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 c6fc3a0609..0405206d98 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -77,6 +77,7 @@ class ApiClient(object): self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation def __del__(self): if self._pool: @@ -372,10 +373,8 @@ class ApiClient(object): return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, diff --git a/samples/client/petstore/python-asyncio/petstore_api/configuration.py b/samples/client/petstore/python-asyncio/petstore_api/configuration.py index 23b51a35e9..ae776ad8c4 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/configuration.py +++ b/samples/client/petstore/python-asyncio/petstore_api/configuration.py @@ -134,6 +134,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py index ed4f40068b..2954285de8 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesAnyType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesAnyType(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesAnyType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesAnyType(object): if not isinstance(other, AdditionalPropertiesAnyType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesAnyType): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py index 22b4133f36..c6369c22a1 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesArray(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesArray(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesArray - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesArray(object): if not isinstance(other, AdditionalPropertiesArray): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesArray): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py index 24e2fc178a..599b7c8b88 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesBoolean(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesBoolean(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesBoolean - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesBoolean(object): if not isinstance(other, AdditionalPropertiesBoolean): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesBoolean): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py index e9e9307d1b..be4455c683 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -58,8 +60,11 @@ class AdditionalPropertiesClass(object): 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_string = None self._map_number = None @@ -365,8 +370,11 @@ class AdditionalPropertiesClass(object): if not isinstance(other, AdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py index 43bcf425a7..ddbb85fdf3 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesInteger(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesInteger(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesInteger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesInteger(object): if not isinstance(other, AdditionalPropertiesInteger): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesInteger): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py index b3e034035a..8bbeda83ec 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesNumber(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesNumber(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesNumber - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesNumber(object): if not isinstance(other, AdditionalPropertiesNumber): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesNumber): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py index 9ab56a4e55..af87595b3e 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesObject(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesObject(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesObject(object): if not isinstance(other, AdditionalPropertiesObject): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py index 4667186bdc..6ab2c91fed 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesString(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesString(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesString - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesString(object): if not isinstance(other, AdditionalPropertiesString): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesString): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/animal.py b/samples/client/petstore/python-asyncio/petstore_api/models/animal.py index 552ef0e832..65cef1a608 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/animal.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/animal.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Animal(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class Animal(object): 'Cat': 'Cat' } - def __init__(self, class_name=None, color='red'): # noqa: E501 + def __init__(self, class_name=None, color='red', local_vars_configuration=None): # noqa: E501 """Animal - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._class_name = None self._color = None @@ -74,7 +79,7 @@ class Animal(object): :param class_name: The class_name of this Animal. # noqa: E501 :type: str """ - if class_name is None: + if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501 raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501 self._class_name = class_name @@ -143,8 +148,11 @@ class Animal(object): if not isinstance(other, Animal): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Animal): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py b/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py index 190c3df345..24e80d02ae 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ApiResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ApiResponse(object): 'message': 'message' } - def __init__(self, code=None, type=None, message=None): # noqa: E501 + def __init__(self, code=None, type=None, message=None, local_vars_configuration=None): # noqa: E501 """ApiResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._code = None self._type = None @@ -157,8 +162,11 @@ class ApiResponse(object): if not isinstance(other, ApiResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ApiResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py index ebf9642980..1f65445207 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayOfArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfArrayOfNumberOnly(object): 'array_array_number': 'ArrayArrayNumber' } - def __init__(self, array_array_number=None): # noqa: E501 + def __init__(self, array_array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_array_number = None self.discriminator = None @@ -105,8 +110,11 @@ class ArrayOfArrayOfNumberOnly(object): if not isinstance(other, ArrayOfArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py index 8e1837c46b..27ba1f58e3 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfNumberOnly(object): 'array_number': 'ArrayNumber' } - def __init__(self, array_number=None): # noqa: E501 + def __init__(self, array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_number = None self.discriminator = None @@ -105,8 +110,11 @@ class ArrayOfNumberOnly(object): if not isinstance(other, ArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py index f548fef3ee..f34a372f6f 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ArrayTest(object): 'array_array_of_model': 'array_array_of_model' } - def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501 + def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None, local_vars_configuration=None): # noqa: E501 """ArrayTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_of_string = None self._array_array_of_integer = None @@ -157,8 +162,11 @@ class ArrayTest(object): if not isinstance(other, ArrayTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py b/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py index 0da6b77e84..cef34c5f6d 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Capitalization(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Capitalization(object): 'att_name': 'ATT_NAME' } - def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501 + def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None, local_vars_configuration=None): # noqa: E501 """Capitalization - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._small_camel = None self._capital_camel = None @@ -237,8 +242,11 @@ class Capitalization(object): if not isinstance(other, Capitalization): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Capitalization): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/cat.py b/samples/client/petstore/python-asyncio/petstore_api/models/cat.py index 216e512353..e39c1c8250 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/cat.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/cat.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Cat(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Cat(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """Cat - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ class Cat(object): if not isinstance(other, Cat): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Cat): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py index 3c90df84ec..7e90fab934 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class CatAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class CatAllOf(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """CatAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ class CatAllOf(object): if not isinstance(other, CatAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CatAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/category.py b/samples/client/petstore/python-asyncio/petstore_api/models/category.py index 0e23c409e5..b47c148953 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/category.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/category.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Category(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Category(object): 'name': 'name' } - def __init__(self, id=None, name='default-name'): # noqa: E501 + def __init__(self, id=None, name='default-name', local_vars_configuration=None): # noqa: E501 """Category - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -90,7 +95,7 @@ class Category(object): :param name: The name of this Category. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -132,8 +137,11 @@ class Category(object): if not isinstance(other, Category): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Category): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py b/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py index 88562beff8..ef6060ffa7 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ClassModel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ClassModel(object): '_class': '_class' } - def __init__(self, _class=None): # noqa: E501 + def __init__(self, _class=None, local_vars_configuration=None): # noqa: E501 """ClassModel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__class = None self.discriminator = None @@ -105,8 +110,11 @@ class ClassModel(object): if not isinstance(other, ClassModel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassModel): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/client.py b/samples/client/petstore/python-asyncio/petstore_api/models/client.py index b7083fd9bd..ee5dbf1c43 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/client.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Client(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Client(object): 'client': 'client' } - def __init__(self, client=None): # noqa: E501 + def __init__(self, client=None, local_vars_configuration=None): # noqa: E501 """Client - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._client = None self.discriminator = None @@ -105,8 +110,11 @@ class Client(object): if not isinstance(other, Client): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Client): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/dog.py b/samples/client/petstore/python-asyncio/petstore_api/models/dog.py index c325cb252c..eacb63eedb 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/dog.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/dog.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Dog(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Dog(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """Dog - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ class Dog(object): if not isinstance(other, Dog): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Dog): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py index b6328b0558..48e0485570 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class DogAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class DogAllOf(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """DogAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ class DogAllOf(object): if not isinstance(other, DogAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, DogAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py index 00aa21d04d..819ff32215 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumArrays(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class EnumArrays(object): 'array_enum': 'array_enum' } - def __init__(self, just_symbol=None, array_enum=None): # noqa: E501 + def __init__(self, just_symbol=None, array_enum=None, local_vars_configuration=None): # noqa: E501 """EnumArrays - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_symbol = None self._array_enum = None @@ -71,7 +76,7 @@ class EnumArrays(object): :type: str """ allowed_values = [">=", "$"] # noqa: E501 - if just_symbol not in allowed_values: + if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501 .format(just_symbol, allowed_values) @@ -98,7 +103,8 @@ class EnumArrays(object): :type: list[str] """ allowed_values = ["fish", "crab"] # noqa: E501 - if not set(array_enum).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(array_enum).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 @@ -144,8 +150,11 @@ class EnumArrays(object): if not isinstance(other, EnumArrays): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumArrays): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py index 3c1aa27975..8bc6275786 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class EnumClass(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """EnumClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class EnumClass(object): if not isinstance(other, EnumClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py index 11e5020363..464281b3ec 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class EnumTest(object): 'outer_enum': 'outerEnum' } - def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 + def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, local_vars_configuration=None): # noqa: E501 """EnumTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._enum_string = None self._enum_string_required = None @@ -85,7 +90,7 @@ class EnumTest(object): :type: str """ allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501 .format(enum_string, allowed_values) @@ -111,10 +116,10 @@ class EnumTest(object): :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 :type: str """ - if enum_string_required is None: + if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501 raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string_required not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string_required not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501 .format(enum_string_required, allowed_values) @@ -141,7 +146,7 @@ class EnumTest(object): :type: int """ allowed_values = [1, -1] # noqa: E501 - if enum_integer not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501 .format(enum_integer, allowed_values) @@ -168,7 +173,7 @@ class EnumTest(object): :type: float """ allowed_values = [1.1, -1.2] # noqa: E501 - if enum_number not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501 .format(enum_number, allowed_values) @@ -234,8 +239,11 @@ class EnumTest(object): if not isinstance(other, EnumTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/file.py b/samples/client/petstore/python-asyncio/petstore_api/models/file.py index 475f86b799..282df2957e 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/file.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/file.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class File(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class File(object): 'source_uri': 'sourceURI' } - def __init__(self, source_uri=None): # noqa: E501 + def __init__(self, source_uri=None, local_vars_configuration=None): # noqa: E501 """File - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._source_uri = None self.discriminator = None @@ -107,8 +112,11 @@ class File(object): if not isinstance(other, File): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, File): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py index 9f3b5bdc17..de7f865b47 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class FileSchemaTestClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class FileSchemaTestClass(object): 'files': 'files' } - def __init__(self, file=None, files=None): # noqa: E501 + def __init__(self, file=None, files=None, local_vars_configuration=None): # noqa: E501 """FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._file = None self._files = None @@ -131,8 +136,11 @@ class FileSchemaTestClass(object): if not isinstance(other, FileSchemaTestClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FileSchemaTestClass): + return True + + return self.to_dict() != other.to_dict() 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 1451cdcd6a..6396c442f6 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 @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class FormatTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -64,8 +66,11 @@ class FormatTest(object): 'big_decimal': 'BigDecimal' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None, local_vars_configuration=None): # noqa: E501 """FormatTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer = None self._int32 = None @@ -126,9 +131,11 @@ class FormatTest(object): :param integer: The integer of this FormatTest. # noqa: E501 :type: int """ - if integer is not None and integer > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer > 100): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501 - if integer is not None and integer < 10: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer < 10): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501 self._integer = integer @@ -151,9 +158,11 @@ class FormatTest(object): :param int32: The int32 of this FormatTest. # noqa: E501 :type: int """ - if int32 is not None and int32 > 200: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 > 200): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501 - if int32 is not None and int32 < 20: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 < 20): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501 self._int32 = int32 @@ -197,11 +206,13 @@ class FormatTest(object): :param number: The number of this FormatTest. # noqa: E501 :type: float """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - if number is not None and number > 543.2: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number > 543.2): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501 - if number is not None and number < 32.1: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number < 32.1): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501 self._number = number @@ -224,9 +235,11 @@ class FormatTest(object): :param float: The float of this FormatTest. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float > 987.6): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 - if float is not None and float < 54.3: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float < 54.3): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501 self._float = float @@ -249,9 +262,11 @@ class FormatTest(object): :param double: The double of this FormatTest. # noqa: E501 :type: float """ - if double is not None and double > 123.4: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double > 123.4): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501 - if double is not None and double < 67.8: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double < 67.8): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501 self._double = double @@ -274,7 +289,8 @@ class FormatTest(object): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + 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 @@ -297,9 +313,10 @@ class FormatTest(object): :param byte: The byte of this FormatTest. # noqa: E501 :type: str """ - if byte is None: + if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501 raise ValueError("Invalid value for `byte`, must not be `None`") # 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 + if (self.local_vars_configuration.client_side_validation and + 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 @@ -343,7 +360,7 @@ class FormatTest(object): :param date: The date of this FormatTest. # noqa: E501 :type: date """ - if date is None: + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 self._date = date @@ -408,11 +425,13 @@ class FormatTest(object): :param password: The password of this FormatTest. # noqa: E501 :type: str """ - if password is None: + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - if password is not None and len(password) > 64: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 64): raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501 - if password is not None and len(password) < 10: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 10): raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501 self._password = password @@ -475,8 +494,11 @@ class FormatTest(object): if not isinstance(other, FormatTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FormatTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py index 7c8d921a2d..5fc2f8a9eb 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class HasOnlyReadOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class HasOnlyReadOnly(object): 'foo': 'foo' } - def __init__(self, bar=None, foo=None): # noqa: E501 + def __init__(self, bar=None, foo=None, local_vars_configuration=None): # noqa: E501 """HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._foo = None @@ -131,8 +136,11 @@ class HasOnlyReadOnly(object): if not isinstance(other, HasOnlyReadOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, HasOnlyReadOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/list.py b/samples/client/petstore/python-asyncio/petstore_api/models/list.py index 74fc3719aa..d58d13e90f 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/list.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/list.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class List(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class List(object): '_123_list': '123-list' } - def __init__(self, _123_list=None): # noqa: E501 + def __init__(self, _123_list=None, local_vars_configuration=None): # noqa: E501 """List - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__123_list = None self.discriminator = None @@ -105,8 +110,11 @@ class List(object): if not isinstance(other, List): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, List): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py index cdfb936529..f0cfba5073 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class MapTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class MapTest(object): 'indirect_map': 'indirect_map' } - def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501 + def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None, local_vars_configuration=None): # noqa: E501 """MapTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_map_of_string = None self._map_of_enum_string = None @@ -102,7 +107,8 @@ class MapTest(object): :type: dict(str, str) """ allowed_values = ["UPPER", "lower"] # noqa: E501 - if not set(map_of_enum_string.keys()).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 @@ -190,8 +196,11 @@ class MapTest(object): if not isinstance(other, MapTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MapTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py index 41a916eac1..5da34f8830 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class MixedPropertiesAndAdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): 'map': 'map' } - def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501 + def __init__(self, uuid=None, date_time=None, map=None, local_vars_configuration=None): # noqa: E501 """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._uuid = None self._date_time = None @@ -157,8 +162,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py b/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py index 563b82b593..841ce1f18f 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Model200Response(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Model200Response(object): '_class': 'class' } - def __init__(self, name=None, _class=None): # noqa: E501 + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 """Model200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.__class = None @@ -131,8 +136,11 @@ class Model200Response(object): if not isinstance(other, Model200Response): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Model200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py b/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py index 0980120159..fdd8d72314 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ModelReturn(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ModelReturn(object): '_return': 'return' } - def __init__(self, _return=None): # noqa: E501 + def __init__(self, _return=None, local_vars_configuration=None): # noqa: E501 """ModelReturn - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__return = None self.discriminator = None @@ -105,8 +110,11 @@ class ModelReturn(object): if not isinstance(other, ModelReturn): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ModelReturn): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/name.py b/samples/client/petstore/python-asyncio/petstore_api/models/name.py index 43014d0fb6..bb2c1fbd73 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/name.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/name.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Name(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class Name(object): '_123_number': '123Number' } - def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501 + def __init__(self, name=None, snake_case=None, _property=None, _123_number=None, local_vars_configuration=None): # noqa: E501 """Name - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._snake_case = None @@ -79,7 +84,7 @@ class Name(object): :param name: The name of this Name. # noqa: E501 :type: int """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -184,8 +189,11 @@ class Name(object): if not isinstance(other, Name): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Name): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py index b6f3d1c1b6..99b2424852 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class NumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class NumberOnly(object): 'just_number': 'JustNumber' } - def __init__(self, just_number=None): # noqa: E501 + def __init__(self, just_number=None, local_vars_configuration=None): # noqa: E501 """NumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_number = None self.discriminator = None @@ -105,8 +110,11 @@ class NumberOnly(object): if not isinstance(other, NumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/order.py b/samples/client/petstore/python-asyncio/petstore_api/models/order.py index 8b64e3a358..8c863cce8f 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/order.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/order.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Order(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Order(object): 'complete': 'complete' } - def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501 + def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False, local_vars_configuration=None): # noqa: E501 """Order - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._pet_id = None @@ -177,7 +182,7 @@ class Order(object): :type: str """ allowed_values = ["placed", "approved", "delivered"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -243,8 +248,11 @@ class Order(object): if not isinstance(other, Order): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Order): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py b/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py index dccd67055b..c11859114a 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterComposite(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class OuterComposite(object): 'my_boolean': 'my_boolean' } - def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501 + def __init__(self, my_number=None, my_string=None, my_boolean=None, local_vars_configuration=None): # noqa: E501 """OuterComposite - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._my_number = None self._my_string = None @@ -157,8 +162,11 @@ class OuterComposite(object): if not isinstance(other, OuterComposite): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterComposite): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py b/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py index a6697a0b15..8fbfeb7aae 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterEnum(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnum(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnum - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class OuterEnum(object): if not isinstance(other, OuterEnum): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnum): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/pet.py b/samples/client/petstore/python-asyncio/petstore_api/models/pet.py index 870608e17a..edbf73f531 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/pet.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/pet.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Pet(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Pet(object): 'status': 'status' } - def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501 + def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, local_vars_configuration=None): # noqa: E501 """Pet - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._category = None @@ -130,7 +135,7 @@ class Pet(object): :param name: The name of this Pet. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -153,7 +158,7 @@ class Pet(object): :param photo_urls: The photo_urls of this Pet. # noqa: E501 :type: list[str] """ - if photo_urls is None: + if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501 raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501 self._photo_urls = photo_urls @@ -200,7 +205,7 @@ class Pet(object): :type: str """ allowed_values = ["available", "pending", "sold"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -245,8 +250,11 @@ class Pet(object): if not isinstance(other, Pet): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Pet): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py b/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py index 3dfb7c7f62..a84679e98d 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ReadOnlyFirst(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class ReadOnlyFirst(object): 'baz': 'baz' } - def __init__(self, bar=None, baz=None): # noqa: E501 + def __init__(self, bar=None, baz=None, local_vars_configuration=None): # noqa: E501 """ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._baz = None @@ -131,8 +136,11 @@ class ReadOnlyFirst(object): if not isinstance(other, ReadOnlyFirst): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ReadOnlyFirst): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py b/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py index 2fd6378fcd..396e75bcee 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class SpecialModelName(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class SpecialModelName(object): 'special_property_name': '$special[property.name]' } - def __init__(self, special_property_name=None): # noqa: E501 + def __init__(self, special_property_name=None, local_vars_configuration=None): # noqa: E501 """SpecialModelName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._special_property_name = None self.discriminator = None @@ -105,8 +110,11 @@ class SpecialModelName(object): if not isinstance(other, SpecialModelName): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SpecialModelName): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/tag.py b/samples/client/petstore/python-asyncio/petstore_api/models/tag.py index cb9c22d9f5..d6137fdd47 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/tag.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/tag.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Tag(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Tag(object): 'name': 'name' } - def __init__(self, id=None, name=None): # noqa: E501 + def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501 """Tag - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -131,8 +136,11 @@ class Tag(object): if not isinstance(other, Tag): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Tag): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py index d7c207cb5f..8163ea77aa 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class TypeHolderDefault(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class TypeHolderDefault(object): 'array_item': 'array_item' } - def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None): # noqa: E501 + def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -80,7 +85,7 @@ class TypeHolderDefault(object): :param string_item: The string_item of this TypeHolderDefault. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -103,7 +108,7 @@ class TypeHolderDefault(object): :param number_item: The number_item of this TypeHolderDefault. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -126,7 +131,7 @@ class TypeHolderDefault(object): :param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -149,7 +154,7 @@ class TypeHolderDefault(object): :param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -172,7 +177,7 @@ class TypeHolderDefault(object): :param array_item: The array_item of this TypeHolderDefault. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -214,8 +219,11 @@ class TypeHolderDefault(object): if not isinstance(other, TypeHolderDefault): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderDefault): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py index 745fe95da2..34481fd21e 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class TypeHolderExample(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class TypeHolderExample(object): 'array_item': 'array_item' } - def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None): # noqa: E501 + def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderExample - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -84,7 +89,7 @@ class TypeHolderExample(object): :param string_item: The string_item of this TypeHolderExample. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -107,7 +112,7 @@ class TypeHolderExample(object): :param number_item: The number_item of this TypeHolderExample. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -130,7 +135,7 @@ class TypeHolderExample(object): :param float_item: The float_item of this TypeHolderExample. # noqa: E501 :type: float """ - if float_item is None: + if self.local_vars_configuration.client_side_validation and float_item is None: # noqa: E501 raise ValueError("Invalid value for `float_item`, must not be `None`") # noqa: E501 self._float_item = float_item @@ -153,7 +158,7 @@ class TypeHolderExample(object): :param integer_item: The integer_item of this TypeHolderExample. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -176,7 +181,7 @@ class TypeHolderExample(object): :param bool_item: The bool_item of this TypeHolderExample. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -199,7 +204,7 @@ class TypeHolderExample(object): :param array_item: The array_item of this TypeHolderExample. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -241,8 +246,11 @@ class TypeHolderExample(object): if not isinstance(other, TypeHolderExample): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderExample): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/user.py b/samples/client/petstore/python-asyncio/petstore_api/models/user.py index f46f5165df..de88bda4cd 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/user.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/user.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class User(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -52,8 +54,11 @@ class User(object): 'user_status': 'userStatus' } - def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501 + def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None, local_vars_configuration=None): # noqa: E501 """User - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._username = None @@ -289,8 +294,11 @@ class User(object): if not isinstance(other, User): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, User): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py b/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py index eaceeb5ef4..52ecc9aa52 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class XmlItem(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -94,8 +96,11 @@ class XmlItem(object): 'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array' } - def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None): # noqa: E501 + def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None, local_vars_configuration=None): # noqa: E501 """XmlItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._attribute_string = None self._attribute_number = None @@ -833,8 +838,11 @@ class XmlItem(object): if not isinstance(other, XmlItem): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, XmlItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-experimental/.openapi-generator/VERSION b/samples/client/petstore/python-experimental/.openapi-generator/VERSION index 0e97bd19ef..c3a2c7076f 100644 --- a/samples/client/petstore/python-experimental/.openapi-generator/VERSION +++ b/samples/client/petstore/python-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-experimental/docs/HasOnlyReadOnly.md b/samples/client/petstore/python-experimental/docs/HasOnlyReadOnly.md index 44ad450b52..f731a42eab 100644 --- a/samples/client/petstore/python-experimental/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/python-experimental/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] -**foo** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] +**foo** | **str** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Name.md b/samples/client/petstore/python-experimental/docs/Name.md index 542da3f047..17dc7a38fe 100644 --- a/samples/client/petstore/python-experimental/docs/Name.md +++ b/samples/client/petstore/python-experimental/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **int** | | -**snake_case** | **int** | | [optional] +**snake_case** | **int** | | [optional] [readonly] **_property** | **str** | | [optional] -**_123_number** | **int** | | [optional] +**_123_number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ReadOnlyFirst.md b/samples/client/petstore/python-experimental/docs/ReadOnlyFirst.md index 93fed253d0..6bc1447c1d 100644 --- a/samples/client/petstore/python-experimental/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/python-experimental/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] **baz** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/petstore_api/configuration.py b/samples/client/petstore/python-experimental/petstore_api/configuration.py index 459ff6a3ca..5e9d7b5d41 100644 --- a/samples/client/petstore/python-experimental/petstore_api/configuration.py +++ b/samples/client/petstore/python-experimental/petstore_api/configuration.py @@ -138,6 +138,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/samples/client/petstore/python-tornado/docs/HasOnlyReadOnly.md b/samples/client/petstore/python-tornado/docs/HasOnlyReadOnly.md index 44ad450b52..f731a42eab 100644 --- a/samples/client/petstore/python-tornado/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/python-tornado/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] -**foo** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] +**foo** | **str** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-tornado/docs/Name.md b/samples/client/petstore/python-tornado/docs/Name.md index 542da3f047..17dc7a38fe 100644 --- a/samples/client/petstore/python-tornado/docs/Name.md +++ b/samples/client/petstore/python-tornado/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **int** | | -**snake_case** | **int** | | [optional] +**snake_case** | **int** | | [optional] [readonly] **_property** | **str** | | [optional] -**_123_number** | **int** | | [optional] +**_123_number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-tornado/docs/ReadOnlyFirst.md b/samples/client/petstore/python-tornado/docs/ReadOnlyFirst.md index 93fed253d0..6bc1447c1d 100644 --- a/samples/client/petstore/python-tornado/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/python-tornado/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] **baz** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py index a47a8e3ea1..268310a3e2 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py @@ -103,8 +103,8 @@ class AnotherFakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501 collection_formats = {} 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 00333bfd2c..6907451d92 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 @@ -103,8 +103,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'xml_item' is set - if ('xml_item' not in local_var_params or - local_var_params['xml_item'] is None): + if self.api_client.client_side_validation and ('xml_item' not in local_var_params or # noqa: E501 + local_var_params['xml_item'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501 collection_formats = {} @@ -627,8 +627,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -735,12 +735,12 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in local_var_params or - local_var_params['query'] is None): + if self.api_client.client_side_validation and ('query' not in local_var_params or # noqa: E501 + local_var_params['query'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -748,7 +748,7 @@ class FakeApi(object): path_params = {} query_params = [] - if 'query' in local_var_params: + if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -849,8 +849,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -987,49 +987,49 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in local_var_params or - local_var_params['number'] is None): + if self.api_client.client_side_validation and ('number' not in local_var_params or # noqa: E501 + local_var_params['number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in local_var_params or - local_var_params['double'] is None): + if self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 + local_var_params['double'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in local_var_params or - local_var_params['pattern_without_delimiter'] is None): + if self.api_client.client_side_validation and ('pattern_without_delimiter' not in local_var_params or # noqa: E501 + local_var_params['pattern_without_delimiter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in local_var_params or - local_var_params['byte'] is None): + if self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 + local_var_params['byte'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ApiValueError("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(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if self.api_client.client_side_validation and 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ApiValueError("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(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if self.api_client.client_side_validation and 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ApiValueError("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): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) > 64): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) < 10): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) < 10): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -1180,14 +1180,14 @@ class FakeApi(object): path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params: + if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'csv' # noqa: E501 - if 'enum_query_string' in local_var_params: + if 'enum_query_string' in local_var_params and local_var_params['enum_query_string'] is not None: # noqa: E501 query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in local_var_params: + if 'enum_query_integer' in local_var_params and local_var_params['enum_query_integer'] is not None: # noqa: E501 query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in local_var_params: + if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} @@ -1306,16 +1306,16 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - if ('required_string_group' not in local_var_params or - local_var_params['required_string_group'] is None): + if self.api_client.client_side_validation and ('required_string_group' not in local_var_params or # noqa: E501 + local_var_params['required_string_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_string_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_boolean_group' is set - if ('required_boolean_group' not in local_var_params or - local_var_params['required_boolean_group'] is None): + if self.api_client.client_side_validation and ('required_boolean_group' not in local_var_params or # noqa: E501 + local_var_params['required_boolean_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_boolean_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_int64_group' is set - if ('required_int64_group' not in local_var_params or - local_var_params['required_int64_group'] is None): + if self.api_client.client_side_validation and ('required_int64_group' not in local_var_params or # noqa: E501 + local_var_params['required_int64_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501 collection_formats = {} @@ -1323,13 +1323,13 @@ class FakeApi(object): path_params = {} query_params = [] - if 'required_string_group' in local_var_params: + if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 query_params.append(('required_string_group', local_var_params['required_string_group'])) # noqa: E501 - if 'required_int64_group' in local_var_params: + if 'required_int64_group' in local_var_params and local_var_params['required_int64_group'] is not None: # noqa: E501 query_params.append(('required_int64_group', local_var_params['required_int64_group'])) # noqa: E501 - if 'string_group' in local_var_params: + if 'string_group' in local_var_params and local_var_params['string_group'] is not None: # noqa: E501 query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 - if 'int64_group' in local_var_params: + if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = {} @@ -1426,8 +1426,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1534,12 +1534,12 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in local_var_params or - local_var_params['param2'] is None): + if self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 + local_var_params['param2'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1656,24 +1656,24 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - if ('pipe' not in local_var_params or - local_var_params['pipe'] is None): + if self.api_client.client_side_validation and ('pipe' not in local_var_params or # noqa: E501 + local_var_params['pipe'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pipe` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'ioutil' is set - if ('ioutil' not in local_var_params or - local_var_params['ioutil'] is None): + if self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 + local_var_params['ioutil'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ioutil` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'http' is set - if ('http' not in local_var_params or - local_var_params['http'] is None): + if self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 + local_var_params['http'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `http` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'url' is set - if ('url' not in local_var_params or - local_var_params['url'] is None): + if self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 + local_var_params['url'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `url` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'context' is set - if ('context' not in local_var_params or - local_var_params['context'] is None): + if self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 + local_var_params['context'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} @@ -1681,19 +1681,19 @@ class FakeApi(object): path_params = {} query_params = [] - if 'pipe' in local_var_params: + if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 query_params.append(('pipe', local_var_params['pipe'])) # noqa: E501 collection_formats['pipe'] = 'csv' # noqa: E501 - if 'ioutil' in local_var_params: + if 'ioutil' in local_var_params and local_var_params['ioutil'] is not None: # noqa: E501 query_params.append(('ioutil', local_var_params['ioutil'])) # noqa: E501 collection_formats['ioutil'] = 'csv' # noqa: E501 - if 'http' in local_var_params: + if 'http' in local_var_params and local_var_params['http'] is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'space' # noqa: E501 - if 'url' in local_var_params: + if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 query_params.append(('url', local_var_params['url'])) # noqa: E501 collection_formats['url'] = 'csv' # noqa: E501 - if 'context' in local_var_params: + if 'context' in local_var_params and local_var_params['context'] is not None: # noqa: E501 query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py index 3e778e9226..90579feaae 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py @@ -103,8 +103,8 @@ class FakeClassnameTags123Api(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py index 1deb664c43..54abb9b95e 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py @@ -101,8 +101,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -209,8 +209,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -315,8 +315,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in local_var_params or - local_var_params['status'] is None): + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -324,7 +324,7 @@ class PetApi(object): path_params = {} query_params = [] - if 'status' in local_var_params: + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -424,8 +424,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in local_var_params or - local_var_params['tags'] is None): + if self.api_client.client_side_validation and ('tags' not in local_var_params or # noqa: E501 + local_var_params['tags'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -433,7 +433,7 @@ class PetApi(object): path_params = {} query_params = [] - if 'tags' in local_var_params: + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 @@ -533,8 +533,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -639,8 +639,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -749,8 +749,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -863,8 +863,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -981,12 +981,12 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'required_file' is set - if ('required_file' not in local_var_params or - local_var_params['required_file'] is None): + if self.api_client.client_side_validation and ('required_file' not in local_var_params or # noqa: E501 + local_var_params['required_file'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py index c3aa1c4a3d..b907b107b2 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py @@ -103,8 +103,8 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -307,13 +307,13 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} @@ -417,8 +417,8 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py index d3674f5ba5..268721dcb8 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py @@ -103,8 +103,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -205,8 +205,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -307,8 +307,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -411,8 +411,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -513,8 +513,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -621,12 +621,12 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in local_var_params or - local_var_params['password'] is None): + if self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 + local_var_params['password'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -634,9 +634,9 @@ class UserApi(object): path_params = {} query_params = [] - if 'username' in local_var_params: + if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params: + if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} @@ -831,12 +831,12 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_user`") # noqa: E501 collection_formats = {} 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 59c17a32f2..6824bec06e 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -78,6 +78,7 @@ class ApiClient(object): self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation def __del__(self): if self._pool: @@ -374,10 +375,8 @@ class ApiClient(object): return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, diff --git a/samples/client/petstore/python-tornado/petstore_api/configuration.py b/samples/client/petstore/python-tornado/petstore_api/configuration.py index 459ff6a3ca..5e9d7b5d41 100644 --- a/samples/client/petstore/python-tornado/petstore_api/configuration.py +++ b/samples/client/petstore/python-tornado/petstore_api/configuration.py @@ -138,6 +138,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py index ed4f40068b..2954285de8 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesAnyType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesAnyType(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesAnyType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesAnyType(object): if not isinstance(other, AdditionalPropertiesAnyType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesAnyType): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py index 22b4133f36..c6369c22a1 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesArray(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesArray(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesArray - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesArray(object): if not isinstance(other, AdditionalPropertiesArray): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesArray): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py index 24e2fc178a..599b7c8b88 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesBoolean(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesBoolean(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesBoolean - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesBoolean(object): if not isinstance(other, AdditionalPropertiesBoolean): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesBoolean): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py index e9e9307d1b..be4455c683 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -58,8 +60,11 @@ class AdditionalPropertiesClass(object): 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_string = None self._map_number = None @@ -365,8 +370,11 @@ class AdditionalPropertiesClass(object): if not isinstance(other, AdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py index 43bcf425a7..ddbb85fdf3 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesInteger(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesInteger(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesInteger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesInteger(object): if not isinstance(other, AdditionalPropertiesInteger): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesInteger): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py index b3e034035a..8bbeda83ec 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesNumber(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesNumber(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesNumber - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesNumber(object): if not isinstance(other, AdditionalPropertiesNumber): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesNumber): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py index 9ab56a4e55..af87595b3e 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesObject(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesObject(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesObject(object): if not isinstance(other, AdditionalPropertiesObject): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py index 4667186bdc..6ab2c91fed 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesString(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesString(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesString - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesString(object): if not isinstance(other, AdditionalPropertiesString): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesString): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/animal.py b/samples/client/petstore/python-tornado/petstore_api/models/animal.py index 552ef0e832..65cef1a608 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/animal.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/animal.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Animal(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class Animal(object): 'Cat': 'Cat' } - def __init__(self, class_name=None, color='red'): # noqa: E501 + def __init__(self, class_name=None, color='red', local_vars_configuration=None): # noqa: E501 """Animal - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._class_name = None self._color = None @@ -74,7 +79,7 @@ class Animal(object): :param class_name: The class_name of this Animal. # noqa: E501 :type: str """ - if class_name is None: + if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501 raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501 self._class_name = class_name @@ -143,8 +148,11 @@ class Animal(object): if not isinstance(other, Animal): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Animal): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/api_response.py b/samples/client/petstore/python-tornado/petstore_api/models/api_response.py index 190c3df345..24e80d02ae 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/api_response.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/api_response.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ApiResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ApiResponse(object): 'message': 'message' } - def __init__(self, code=None, type=None, message=None): # noqa: E501 + def __init__(self, code=None, type=None, message=None, local_vars_configuration=None): # noqa: E501 """ApiResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._code = None self._type = None @@ -157,8 +162,11 @@ class ApiResponse(object): if not isinstance(other, ApiResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ApiResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py index ebf9642980..1f65445207 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayOfArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfArrayOfNumberOnly(object): 'array_array_number': 'ArrayArrayNumber' } - def __init__(self, array_array_number=None): # noqa: E501 + def __init__(self, array_array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_array_number = None self.discriminator = None @@ -105,8 +110,11 @@ class ArrayOfArrayOfNumberOnly(object): if not isinstance(other, ArrayOfArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py index 8e1837c46b..27ba1f58e3 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfNumberOnly(object): 'array_number': 'ArrayNumber' } - def __init__(self, array_number=None): # noqa: E501 + def __init__(self, array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_number = None self.discriminator = None @@ -105,8 +110,11 @@ class ArrayOfNumberOnly(object): if not isinstance(other, ArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/array_test.py b/samples/client/petstore/python-tornado/petstore_api/models/array_test.py index f548fef3ee..f34a372f6f 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/array_test.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/array_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ArrayTest(object): 'array_array_of_model': 'array_array_of_model' } - def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501 + def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None, local_vars_configuration=None): # noqa: E501 """ArrayTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_of_string = None self._array_array_of_integer = None @@ -157,8 +162,11 @@ class ArrayTest(object): if not isinstance(other, ArrayTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py b/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py index 0da6b77e84..cef34c5f6d 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Capitalization(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Capitalization(object): 'att_name': 'ATT_NAME' } - def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501 + def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None, local_vars_configuration=None): # noqa: E501 """Capitalization - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._small_camel = None self._capital_camel = None @@ -237,8 +242,11 @@ class Capitalization(object): if not isinstance(other, Capitalization): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Capitalization): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/cat.py b/samples/client/petstore/python-tornado/petstore_api/models/cat.py index 216e512353..e39c1c8250 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/cat.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/cat.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Cat(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Cat(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """Cat - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ class Cat(object): if not isinstance(other, Cat): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Cat): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py index 3c90df84ec..7e90fab934 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class CatAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class CatAllOf(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """CatAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ class CatAllOf(object): if not isinstance(other, CatAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CatAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/category.py b/samples/client/petstore/python-tornado/petstore_api/models/category.py index 0e23c409e5..b47c148953 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/category.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/category.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Category(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Category(object): 'name': 'name' } - def __init__(self, id=None, name='default-name'): # noqa: E501 + def __init__(self, id=None, name='default-name', local_vars_configuration=None): # noqa: E501 """Category - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -90,7 +95,7 @@ class Category(object): :param name: The name of this Category. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -132,8 +137,11 @@ class Category(object): if not isinstance(other, Category): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Category): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/class_model.py b/samples/client/petstore/python-tornado/petstore_api/models/class_model.py index 88562beff8..ef6060ffa7 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/class_model.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/class_model.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ClassModel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ClassModel(object): '_class': '_class' } - def __init__(self, _class=None): # noqa: E501 + def __init__(self, _class=None, local_vars_configuration=None): # noqa: E501 """ClassModel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__class = None self.discriminator = None @@ -105,8 +110,11 @@ class ClassModel(object): if not isinstance(other, ClassModel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassModel): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/client.py b/samples/client/petstore/python-tornado/petstore_api/models/client.py index b7083fd9bd..ee5dbf1c43 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/client.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/client.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Client(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Client(object): 'client': 'client' } - def __init__(self, client=None): # noqa: E501 + def __init__(self, client=None, local_vars_configuration=None): # noqa: E501 """Client - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._client = None self.discriminator = None @@ -105,8 +110,11 @@ class Client(object): if not isinstance(other, Client): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Client): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/dog.py b/samples/client/petstore/python-tornado/petstore_api/models/dog.py index c325cb252c..eacb63eedb 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/dog.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/dog.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Dog(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Dog(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """Dog - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ class Dog(object): if not isinstance(other, Dog): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Dog): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py index b6328b0558..48e0485570 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class DogAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class DogAllOf(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """DogAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ class DogAllOf(object): if not isinstance(other, DogAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, DogAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py index 00aa21d04d..819ff32215 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumArrays(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class EnumArrays(object): 'array_enum': 'array_enum' } - def __init__(self, just_symbol=None, array_enum=None): # noqa: E501 + def __init__(self, just_symbol=None, array_enum=None, local_vars_configuration=None): # noqa: E501 """EnumArrays - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_symbol = None self._array_enum = None @@ -71,7 +76,7 @@ class EnumArrays(object): :type: str """ allowed_values = [">=", "$"] # noqa: E501 - if just_symbol not in allowed_values: + if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501 .format(just_symbol, allowed_values) @@ -98,7 +103,8 @@ class EnumArrays(object): :type: list[str] """ allowed_values = ["fish", "crab"] # noqa: E501 - if not set(array_enum).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(array_enum).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 @@ -144,8 +150,11 @@ class EnumArrays(object): if not isinstance(other, EnumArrays): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumArrays): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py index 3c1aa27975..8bc6275786 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class EnumClass(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """EnumClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class EnumClass(object): if not isinstance(other, EnumClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py index 11e5020363..464281b3ec 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class EnumTest(object): 'outer_enum': 'outerEnum' } - def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 + def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, local_vars_configuration=None): # noqa: E501 """EnumTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._enum_string = None self._enum_string_required = None @@ -85,7 +90,7 @@ class EnumTest(object): :type: str """ allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501 .format(enum_string, allowed_values) @@ -111,10 +116,10 @@ class EnumTest(object): :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 :type: str """ - if enum_string_required is None: + if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501 raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string_required not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string_required not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501 .format(enum_string_required, allowed_values) @@ -141,7 +146,7 @@ class EnumTest(object): :type: int """ allowed_values = [1, -1] # noqa: E501 - if enum_integer not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501 .format(enum_integer, allowed_values) @@ -168,7 +173,7 @@ class EnumTest(object): :type: float """ allowed_values = [1.1, -1.2] # noqa: E501 - if enum_number not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501 .format(enum_number, allowed_values) @@ -234,8 +239,11 @@ class EnumTest(object): if not isinstance(other, EnumTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/file.py b/samples/client/petstore/python-tornado/petstore_api/models/file.py index 475f86b799..282df2957e 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/file.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/file.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class File(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class File(object): 'source_uri': 'sourceURI' } - def __init__(self, source_uri=None): # noqa: E501 + def __init__(self, source_uri=None, local_vars_configuration=None): # noqa: E501 """File - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._source_uri = None self.discriminator = None @@ -107,8 +112,11 @@ class File(object): if not isinstance(other, File): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, File): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py index 9f3b5bdc17..de7f865b47 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class FileSchemaTestClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class FileSchemaTestClass(object): 'files': 'files' } - def __init__(self, file=None, files=None): # noqa: E501 + def __init__(self, file=None, files=None, local_vars_configuration=None): # noqa: E501 """FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._file = None self._files = None @@ -131,8 +136,11 @@ class FileSchemaTestClass(object): if not isinstance(other, FileSchemaTestClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FileSchemaTestClass): + return True + + return self.to_dict() != other.to_dict() 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 1451cdcd6a..6396c442f6 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 @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class FormatTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -64,8 +66,11 @@ class FormatTest(object): 'big_decimal': 'BigDecimal' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None, local_vars_configuration=None): # noqa: E501 """FormatTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer = None self._int32 = None @@ -126,9 +131,11 @@ class FormatTest(object): :param integer: The integer of this FormatTest. # noqa: E501 :type: int """ - if integer is not None and integer > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer > 100): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501 - if integer is not None and integer < 10: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer < 10): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501 self._integer = integer @@ -151,9 +158,11 @@ class FormatTest(object): :param int32: The int32 of this FormatTest. # noqa: E501 :type: int """ - if int32 is not None and int32 > 200: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 > 200): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501 - if int32 is not None and int32 < 20: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 < 20): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501 self._int32 = int32 @@ -197,11 +206,13 @@ class FormatTest(object): :param number: The number of this FormatTest. # noqa: E501 :type: float """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - if number is not None and number > 543.2: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number > 543.2): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501 - if number is not None and number < 32.1: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number < 32.1): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501 self._number = number @@ -224,9 +235,11 @@ class FormatTest(object): :param float: The float of this FormatTest. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float > 987.6): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 - if float is not None and float < 54.3: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float < 54.3): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501 self._float = float @@ -249,9 +262,11 @@ class FormatTest(object): :param double: The double of this FormatTest. # noqa: E501 :type: float """ - if double is not None and double > 123.4: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double > 123.4): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501 - if double is not None and double < 67.8: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double < 67.8): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501 self._double = double @@ -274,7 +289,8 @@ class FormatTest(object): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + 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 @@ -297,9 +313,10 @@ class FormatTest(object): :param byte: The byte of this FormatTest. # noqa: E501 :type: str """ - if byte is None: + if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501 raise ValueError("Invalid value for `byte`, must not be `None`") # 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 + if (self.local_vars_configuration.client_side_validation and + 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 @@ -343,7 +360,7 @@ class FormatTest(object): :param date: The date of this FormatTest. # noqa: E501 :type: date """ - if date is None: + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 self._date = date @@ -408,11 +425,13 @@ class FormatTest(object): :param password: The password of this FormatTest. # noqa: E501 :type: str """ - if password is None: + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - if password is not None and len(password) > 64: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 64): raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501 - if password is not None and len(password) < 10: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 10): raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501 self._password = password @@ -475,8 +494,11 @@ class FormatTest(object): if not isinstance(other, FormatTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FormatTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py index 7c8d921a2d..5fc2f8a9eb 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class HasOnlyReadOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class HasOnlyReadOnly(object): 'foo': 'foo' } - def __init__(self, bar=None, foo=None): # noqa: E501 + def __init__(self, bar=None, foo=None, local_vars_configuration=None): # noqa: E501 """HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._foo = None @@ -131,8 +136,11 @@ class HasOnlyReadOnly(object): if not isinstance(other, HasOnlyReadOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, HasOnlyReadOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/list.py b/samples/client/petstore/python-tornado/petstore_api/models/list.py index 74fc3719aa..d58d13e90f 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/list.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/list.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class List(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class List(object): '_123_list': '123-list' } - def __init__(self, _123_list=None): # noqa: E501 + def __init__(self, _123_list=None, local_vars_configuration=None): # noqa: E501 """List - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__123_list = None self.discriminator = None @@ -105,8 +110,11 @@ class List(object): if not isinstance(other, List): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, List): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/map_test.py b/samples/client/petstore/python-tornado/petstore_api/models/map_test.py index cdfb936529..f0cfba5073 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/map_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class MapTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class MapTest(object): 'indirect_map': 'indirect_map' } - def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501 + def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None, local_vars_configuration=None): # noqa: E501 """MapTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_map_of_string = None self._map_of_enum_string = None @@ -102,7 +107,8 @@ class MapTest(object): :type: dict(str, str) """ allowed_values = ["UPPER", "lower"] # noqa: E501 - if not set(map_of_enum_string.keys()).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 @@ -190,8 +196,11 @@ class MapTest(object): if not isinstance(other, MapTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MapTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py index 41a916eac1..5da34f8830 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class MixedPropertiesAndAdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): 'map': 'map' } - def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501 + def __init__(self, uuid=None, date_time=None, map=None, local_vars_configuration=None): # noqa: E501 """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._uuid = None self._date_time = None @@ -157,8 +162,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py b/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py index 563b82b593..841ce1f18f 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Model200Response(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Model200Response(object): '_class': 'class' } - def __init__(self, name=None, _class=None): # noqa: E501 + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 """Model200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.__class = None @@ -131,8 +136,11 @@ class Model200Response(object): if not isinstance(other, Model200Response): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Model200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/model_return.py b/samples/client/petstore/python-tornado/petstore_api/models/model_return.py index 0980120159..fdd8d72314 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/model_return.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/model_return.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ModelReturn(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ModelReturn(object): '_return': 'return' } - def __init__(self, _return=None): # noqa: E501 + def __init__(self, _return=None, local_vars_configuration=None): # noqa: E501 """ModelReturn - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__return = None self.discriminator = None @@ -105,8 +110,11 @@ class ModelReturn(object): if not isinstance(other, ModelReturn): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ModelReturn): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/name.py b/samples/client/petstore/python-tornado/petstore_api/models/name.py index 43014d0fb6..bb2c1fbd73 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/name.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/name.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Name(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class Name(object): '_123_number': '123Number' } - def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501 + def __init__(self, name=None, snake_case=None, _property=None, _123_number=None, local_vars_configuration=None): # noqa: E501 """Name - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._snake_case = None @@ -79,7 +84,7 @@ class Name(object): :param name: The name of this Name. # noqa: E501 :type: int """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -184,8 +189,11 @@ class Name(object): if not isinstance(other, Name): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Name): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/number_only.py b/samples/client/petstore/python-tornado/petstore_api/models/number_only.py index b6f3d1c1b6..99b2424852 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/number_only.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class NumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class NumberOnly(object): 'just_number': 'JustNumber' } - def __init__(self, just_number=None): # noqa: E501 + def __init__(self, just_number=None, local_vars_configuration=None): # noqa: E501 """NumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_number = None self.discriminator = None @@ -105,8 +110,11 @@ class NumberOnly(object): if not isinstance(other, NumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/order.py b/samples/client/petstore/python-tornado/petstore_api/models/order.py index 8b64e3a358..8c863cce8f 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/order.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/order.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Order(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Order(object): 'complete': 'complete' } - def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501 + def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False, local_vars_configuration=None): # noqa: E501 """Order - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._pet_id = None @@ -177,7 +182,7 @@ class Order(object): :type: str """ allowed_values = ["placed", "approved", "delivered"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -243,8 +248,11 @@ class Order(object): if not isinstance(other, Order): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Order): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py b/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py index dccd67055b..c11859114a 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterComposite(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class OuterComposite(object): 'my_boolean': 'my_boolean' } - def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501 + def __init__(self, my_number=None, my_string=None, my_boolean=None, local_vars_configuration=None): # noqa: E501 """OuterComposite - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._my_number = None self._my_string = None @@ -157,8 +162,11 @@ class OuterComposite(object): if not isinstance(other, OuterComposite): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterComposite): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py b/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py index a6697a0b15..8fbfeb7aae 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterEnum(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnum(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnum - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class OuterEnum(object): if not isinstance(other, OuterEnum): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnum): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/pet.py b/samples/client/petstore/python-tornado/petstore_api/models/pet.py index 870608e17a..edbf73f531 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/pet.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/pet.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Pet(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Pet(object): 'status': 'status' } - def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501 + def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, local_vars_configuration=None): # noqa: E501 """Pet - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._category = None @@ -130,7 +135,7 @@ class Pet(object): :param name: The name of this Pet. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -153,7 +158,7 @@ class Pet(object): :param photo_urls: The photo_urls of this Pet. # noqa: E501 :type: list[str] """ - if photo_urls is None: + if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501 raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501 self._photo_urls = photo_urls @@ -200,7 +205,7 @@ class Pet(object): :type: str """ allowed_values = ["available", "pending", "sold"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -245,8 +250,11 @@ class Pet(object): if not isinstance(other, Pet): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Pet): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py b/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py index 3dfb7c7f62..a84679e98d 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ReadOnlyFirst(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class ReadOnlyFirst(object): 'baz': 'baz' } - def __init__(self, bar=None, baz=None): # noqa: E501 + def __init__(self, bar=None, baz=None, local_vars_configuration=None): # noqa: E501 """ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._baz = None @@ -131,8 +136,11 @@ class ReadOnlyFirst(object): if not isinstance(other, ReadOnlyFirst): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ReadOnlyFirst): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py b/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py index 2fd6378fcd..396e75bcee 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class SpecialModelName(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class SpecialModelName(object): 'special_property_name': '$special[property.name]' } - def __init__(self, special_property_name=None): # noqa: E501 + def __init__(self, special_property_name=None, local_vars_configuration=None): # noqa: E501 """SpecialModelName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._special_property_name = None self.discriminator = None @@ -105,8 +110,11 @@ class SpecialModelName(object): if not isinstance(other, SpecialModelName): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SpecialModelName): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/tag.py b/samples/client/petstore/python-tornado/petstore_api/models/tag.py index cb9c22d9f5..d6137fdd47 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/tag.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/tag.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Tag(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Tag(object): 'name': 'name' } - def __init__(self, id=None, name=None): # noqa: E501 + def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501 """Tag - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -131,8 +136,11 @@ class Tag(object): if not isinstance(other, Tag): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Tag): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py index d7c207cb5f..8163ea77aa 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class TypeHolderDefault(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class TypeHolderDefault(object): 'array_item': 'array_item' } - def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None): # noqa: E501 + def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -80,7 +85,7 @@ class TypeHolderDefault(object): :param string_item: The string_item of this TypeHolderDefault. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -103,7 +108,7 @@ class TypeHolderDefault(object): :param number_item: The number_item of this TypeHolderDefault. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -126,7 +131,7 @@ class TypeHolderDefault(object): :param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -149,7 +154,7 @@ class TypeHolderDefault(object): :param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -172,7 +177,7 @@ class TypeHolderDefault(object): :param array_item: The array_item of this TypeHolderDefault. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -214,8 +219,11 @@ class TypeHolderDefault(object): if not isinstance(other, TypeHolderDefault): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderDefault): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py index 745fe95da2..34481fd21e 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class TypeHolderExample(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class TypeHolderExample(object): 'array_item': 'array_item' } - def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None): # noqa: E501 + def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderExample - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -84,7 +89,7 @@ class TypeHolderExample(object): :param string_item: The string_item of this TypeHolderExample. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -107,7 +112,7 @@ class TypeHolderExample(object): :param number_item: The number_item of this TypeHolderExample. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -130,7 +135,7 @@ class TypeHolderExample(object): :param float_item: The float_item of this TypeHolderExample. # noqa: E501 :type: float """ - if float_item is None: + if self.local_vars_configuration.client_side_validation and float_item is None: # noqa: E501 raise ValueError("Invalid value for `float_item`, must not be `None`") # noqa: E501 self._float_item = float_item @@ -153,7 +158,7 @@ class TypeHolderExample(object): :param integer_item: The integer_item of this TypeHolderExample. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -176,7 +181,7 @@ class TypeHolderExample(object): :param bool_item: The bool_item of this TypeHolderExample. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -199,7 +204,7 @@ class TypeHolderExample(object): :param array_item: The array_item of this TypeHolderExample. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -241,8 +246,11 @@ class TypeHolderExample(object): if not isinstance(other, TypeHolderExample): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderExample): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/user.py b/samples/client/petstore/python-tornado/petstore_api/models/user.py index f46f5165df..de88bda4cd 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/user.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/user.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class User(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -52,8 +54,11 @@ class User(object): 'user_status': 'userStatus' } - def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501 + def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None, local_vars_configuration=None): # noqa: E501 """User - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._username = None @@ -289,8 +294,11 @@ class User(object): if not isinstance(other, User): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, User): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py b/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py index eaceeb5ef4..52ecc9aa52 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class XmlItem(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -94,8 +96,11 @@ class XmlItem(object): 'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array' } - def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None): # noqa: E501 + def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None, local_vars_configuration=None): # noqa: E501 """XmlItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._attribute_string = None self._attribute_number = None @@ -833,8 +838,11 @@ class XmlItem(object): if not isinstance(other, XmlItem): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, XmlItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/docs/HasOnlyReadOnly.md b/samples/client/petstore/python/docs/HasOnlyReadOnly.md index 44ad450b52..f731a42eab 100644 --- a/samples/client/petstore/python/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/python/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] -**foo** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] +**foo** | **str** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python/docs/Name.md b/samples/client/petstore/python/docs/Name.md index 542da3f047..17dc7a38fe 100644 --- a/samples/client/petstore/python/docs/Name.md +++ b/samples/client/petstore/python/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **int** | | -**snake_case** | **int** | | [optional] +**snake_case** | **int** | | [optional] [readonly] **_property** | **str** | | [optional] -**_123_number** | **int** | | [optional] +**_123_number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python/docs/ReadOnlyFirst.md b/samples/client/petstore/python/docs/ReadOnlyFirst.md index 93fed253d0..6bc1447c1d 100644 --- a/samples/client/petstore/python/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/python/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] **baz** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/client/petstore/python/petstore_api/api/another_fake_api.py index a47a8e3ea1..268310a3e2 100644 --- a/samples/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/another_fake_api.py @@ -103,8 +103,8 @@ class AnotherFakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501 collection_formats = {} 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 00333bfd2c..6907451d92 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -103,8 +103,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'xml_item' is set - if ('xml_item' not in local_var_params or - local_var_params['xml_item'] is None): + if self.api_client.client_side_validation and ('xml_item' not in local_var_params or # noqa: E501 + local_var_params['xml_item'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501 collection_formats = {} @@ -627,8 +627,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -735,12 +735,12 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in local_var_params or - local_var_params['query'] is None): + if self.api_client.client_side_validation and ('query' not in local_var_params or # noqa: E501 + local_var_params['query'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -748,7 +748,7 @@ class FakeApi(object): path_params = {} query_params = [] - if 'query' in local_var_params: + if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -849,8 +849,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -987,49 +987,49 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in local_var_params or - local_var_params['number'] is None): + if self.api_client.client_side_validation and ('number' not in local_var_params or # noqa: E501 + local_var_params['number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in local_var_params or - local_var_params['double'] is None): + if self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 + local_var_params['double'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in local_var_params or - local_var_params['pattern_without_delimiter'] is None): + if self.api_client.client_side_validation and ('pattern_without_delimiter' not in local_var_params or # noqa: E501 + local_var_params['pattern_without_delimiter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in local_var_params or - local_var_params['byte'] is None): + if self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 + local_var_params['byte'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ApiValueError("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(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if self.api_client.client_side_validation and 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ApiValueError("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(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if self.api_client.client_side_validation and 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ApiValueError("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): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) > 64): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) < 10): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) < 10): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -1180,14 +1180,14 @@ class FakeApi(object): path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params: + if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'csv' # noqa: E501 - if 'enum_query_string' in local_var_params: + if 'enum_query_string' in local_var_params and local_var_params['enum_query_string'] is not None: # noqa: E501 query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in local_var_params: + if 'enum_query_integer' in local_var_params and local_var_params['enum_query_integer'] is not None: # noqa: E501 query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in local_var_params: + if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} @@ -1306,16 +1306,16 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - if ('required_string_group' not in local_var_params or - local_var_params['required_string_group'] is None): + if self.api_client.client_side_validation and ('required_string_group' not in local_var_params or # noqa: E501 + local_var_params['required_string_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_string_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_boolean_group' is set - if ('required_boolean_group' not in local_var_params or - local_var_params['required_boolean_group'] is None): + if self.api_client.client_side_validation and ('required_boolean_group' not in local_var_params or # noqa: E501 + local_var_params['required_boolean_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_boolean_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_int64_group' is set - if ('required_int64_group' not in local_var_params or - local_var_params['required_int64_group'] is None): + if self.api_client.client_side_validation and ('required_int64_group' not in local_var_params or # noqa: E501 + local_var_params['required_int64_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501 collection_formats = {} @@ -1323,13 +1323,13 @@ class FakeApi(object): path_params = {} query_params = [] - if 'required_string_group' in local_var_params: + if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 query_params.append(('required_string_group', local_var_params['required_string_group'])) # noqa: E501 - if 'required_int64_group' in local_var_params: + if 'required_int64_group' in local_var_params and local_var_params['required_int64_group'] is not None: # noqa: E501 query_params.append(('required_int64_group', local_var_params['required_int64_group'])) # noqa: E501 - if 'string_group' in local_var_params: + if 'string_group' in local_var_params and local_var_params['string_group'] is not None: # noqa: E501 query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 - if 'int64_group' in local_var_params: + if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = {} @@ -1426,8 +1426,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1534,12 +1534,12 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in local_var_params or - local_var_params['param2'] is None): + if self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 + local_var_params['param2'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1656,24 +1656,24 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - if ('pipe' not in local_var_params or - local_var_params['pipe'] is None): + if self.api_client.client_side_validation and ('pipe' not in local_var_params or # noqa: E501 + local_var_params['pipe'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pipe` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'ioutil' is set - if ('ioutil' not in local_var_params or - local_var_params['ioutil'] is None): + if self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 + local_var_params['ioutil'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ioutil` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'http' is set - if ('http' not in local_var_params or - local_var_params['http'] is None): + if self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 + local_var_params['http'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `http` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'url' is set - if ('url' not in local_var_params or - local_var_params['url'] is None): + if self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 + local_var_params['url'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `url` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'context' is set - if ('context' not in local_var_params or - local_var_params['context'] is None): + if self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 + local_var_params['context'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} @@ -1681,19 +1681,19 @@ class FakeApi(object): path_params = {} query_params = [] - if 'pipe' in local_var_params: + if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 query_params.append(('pipe', local_var_params['pipe'])) # noqa: E501 collection_formats['pipe'] = 'csv' # noqa: E501 - if 'ioutil' in local_var_params: + if 'ioutil' in local_var_params and local_var_params['ioutil'] is not None: # noqa: E501 query_params.append(('ioutil', local_var_params['ioutil'])) # noqa: E501 collection_formats['ioutil'] = 'csv' # noqa: E501 - if 'http' in local_var_params: + if 'http' in local_var_params and local_var_params['http'] is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'space' # noqa: E501 - if 'url' in local_var_params: + if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 query_params.append(('url', local_var_params['url'])) # noqa: E501 collection_formats['url'] = 'csv' # noqa: E501 - if 'context' in local_var_params: + if 'context' in local_var_params and local_var_params['context'] is not None: # noqa: E501 query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py index 3e778e9226..90579feaae 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py @@ -103,8 +103,8 @@ class FakeClassnameTags123Api(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py index 1deb664c43..54abb9b95e 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -101,8 +101,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -209,8 +209,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -315,8 +315,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in local_var_params or - local_var_params['status'] is None): + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -324,7 +324,7 @@ class PetApi(object): path_params = {} query_params = [] - if 'status' in local_var_params: + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -424,8 +424,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in local_var_params or - local_var_params['tags'] is None): + if self.api_client.client_side_validation and ('tags' not in local_var_params or # noqa: E501 + local_var_params['tags'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -433,7 +433,7 @@ class PetApi(object): path_params = {} query_params = [] - if 'tags' in local_var_params: + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 @@ -533,8 +533,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -639,8 +639,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -749,8 +749,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -863,8 +863,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -981,12 +981,12 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'required_file' is set - if ('required_file' not in local_var_params or - local_var_params['required_file'] is None): + if self.api_client.client_side_validation and ('required_file' not in local_var_params or # noqa: E501 + local_var_params['required_file'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python/petstore_api/api/store_api.py b/samples/client/petstore/python/petstore_api/api/store_api.py index c3aa1c4a3d..b907b107b2 100644 --- a/samples/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/client/petstore/python/petstore_api/api/store_api.py @@ -103,8 +103,8 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -307,13 +307,13 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} @@ -417,8 +417,8 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python/petstore_api/api/user_api.py b/samples/client/petstore/python/petstore_api/api/user_api.py index d3674f5ba5..268721dcb8 100644 --- a/samples/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/client/petstore/python/petstore_api/api/user_api.py @@ -103,8 +103,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -205,8 +205,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -307,8 +307,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -411,8 +411,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -513,8 +513,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -621,12 +621,12 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in local_var_params or - local_var_params['password'] is None): + if self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 + local_var_params['password'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -634,9 +634,9 @@ class UserApi(object): path_params = {} query_params = [] - if 'username' in local_var_params: + if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params: + if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} @@ -831,12 +831,12 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_user`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index df3a9815aa..f9c494a76c 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -77,6 +77,7 @@ class ApiClient(object): self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation def __del__(self): if self._pool: @@ -372,10 +373,8 @@ class ApiClient(object): return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, diff --git a/samples/client/petstore/python/petstore_api/configuration.py b/samples/client/petstore/python/petstore_api/configuration.py index 459ff6a3ca..5e9d7b5d41 100644 --- a/samples/client/petstore/python/petstore_api/configuration.py +++ b/samples/client/petstore/python/petstore_api/configuration.py @@ -138,6 +138,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py index ed4f40068b..2954285de8 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesAnyType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesAnyType(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesAnyType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesAnyType(object): if not isinstance(other, AdditionalPropertiesAnyType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesAnyType): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python/petstore_api/models/additional_properties_array.py index 22b4133f36..c6369c22a1 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_array.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesArray(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesArray(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesArray - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesArray(object): if not isinstance(other, AdditionalPropertiesArray): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesArray): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py index 24e2fc178a..599b7c8b88 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesBoolean(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesBoolean(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesBoolean - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesBoolean(object): if not isinstance(other, AdditionalPropertiesBoolean): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesBoolean): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python/petstore_api/models/additional_properties_class.py index e9e9307d1b..be4455c683 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -58,8 +60,11 @@ class AdditionalPropertiesClass(object): 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_string = None self._map_number = None @@ -365,8 +370,11 @@ class AdditionalPropertiesClass(object): if not isinstance(other, AdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py index 43bcf425a7..ddbb85fdf3 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesInteger(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesInteger(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesInteger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesInteger(object): if not isinstance(other, AdditionalPropertiesInteger): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesInteger): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python/petstore_api/models/additional_properties_number.py index b3e034035a..8bbeda83ec 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_number.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesNumber(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesNumber(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesNumber - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesNumber(object): if not isinstance(other, AdditionalPropertiesNumber): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesNumber): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python/petstore_api/models/additional_properties_object.py index 9ab56a4e55..af87595b3e 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_object.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesObject(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesObject(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesObject(object): if not isinstance(other, AdditionalPropertiesObject): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python/petstore_api/models/additional_properties_string.py index 4667186bdc..6ab2c91fed 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_string.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesString(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesString(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesString - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ class AdditionalPropertiesString(object): if not isinstance(other, AdditionalPropertiesString): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesString): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/animal.py b/samples/client/petstore/python/petstore_api/models/animal.py index 552ef0e832..65cef1a608 100644 --- a/samples/client/petstore/python/petstore_api/models/animal.py +++ b/samples/client/petstore/python/petstore_api/models/animal.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Animal(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class Animal(object): 'Cat': 'Cat' } - def __init__(self, class_name=None, color='red'): # noqa: E501 + def __init__(self, class_name=None, color='red', local_vars_configuration=None): # noqa: E501 """Animal - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._class_name = None self._color = None @@ -74,7 +79,7 @@ class Animal(object): :param class_name: The class_name of this Animal. # noqa: E501 :type: str """ - if class_name is None: + if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501 raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501 self._class_name = class_name @@ -143,8 +148,11 @@ class Animal(object): if not isinstance(other, Animal): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Animal): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/api_response.py b/samples/client/petstore/python/petstore_api/models/api_response.py index 190c3df345..24e80d02ae 100644 --- a/samples/client/petstore/python/petstore_api/models/api_response.py +++ b/samples/client/petstore/python/petstore_api/models/api_response.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ApiResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ApiResponse(object): 'message': 'message' } - def __init__(self, code=None, type=None, message=None): # noqa: E501 + def __init__(self, code=None, type=None, message=None, local_vars_configuration=None): # noqa: E501 """ApiResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._code = None self._type = None @@ -157,8 +162,11 @@ class ApiResponse(object): if not isinstance(other, ApiResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ApiResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py index ebf9642980..1f65445207 100644 --- a/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayOfArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfArrayOfNumberOnly(object): 'array_array_number': 'ArrayArrayNumber' } - def __init__(self, array_array_number=None): # noqa: E501 + def __init__(self, array_array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_array_number = None self.discriminator = None @@ -105,8 +110,11 @@ class ArrayOfArrayOfNumberOnly(object): if not isinstance(other, ArrayOfArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python/petstore_api/models/array_of_number_only.py index 8e1837c46b..27ba1f58e3 100644 --- a/samples/client/petstore/python/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python/petstore_api/models/array_of_number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfNumberOnly(object): 'array_number': 'ArrayNumber' } - def __init__(self, array_number=None): # noqa: E501 + def __init__(self, array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_number = None self.discriminator = None @@ -105,8 +110,11 @@ class ArrayOfNumberOnly(object): if not isinstance(other, ArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/array_test.py b/samples/client/petstore/python/petstore_api/models/array_test.py index f548fef3ee..f34a372f6f 100644 --- a/samples/client/petstore/python/petstore_api/models/array_test.py +++ b/samples/client/petstore/python/petstore_api/models/array_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ArrayTest(object): 'array_array_of_model': 'array_array_of_model' } - def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501 + def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None, local_vars_configuration=None): # noqa: E501 """ArrayTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_of_string = None self._array_array_of_integer = None @@ -157,8 +162,11 @@ class ArrayTest(object): if not isinstance(other, ArrayTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/capitalization.py b/samples/client/petstore/python/petstore_api/models/capitalization.py index 0da6b77e84..cef34c5f6d 100644 --- a/samples/client/petstore/python/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python/petstore_api/models/capitalization.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Capitalization(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Capitalization(object): 'att_name': 'ATT_NAME' } - def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501 + def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None, local_vars_configuration=None): # noqa: E501 """Capitalization - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._small_camel = None self._capital_camel = None @@ -237,8 +242,11 @@ class Capitalization(object): if not isinstance(other, Capitalization): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Capitalization): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/cat.py b/samples/client/petstore/python/petstore_api/models/cat.py index 216e512353..e39c1c8250 100644 --- a/samples/client/petstore/python/petstore_api/models/cat.py +++ b/samples/client/petstore/python/petstore_api/models/cat.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Cat(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Cat(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """Cat - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ class Cat(object): if not isinstance(other, Cat): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Cat): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/cat_all_of.py b/samples/client/petstore/python/petstore_api/models/cat_all_of.py index 3c90df84ec..7e90fab934 100644 --- a/samples/client/petstore/python/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python/petstore_api/models/cat_all_of.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class CatAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class CatAllOf(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """CatAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ class CatAllOf(object): if not isinstance(other, CatAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CatAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/category.py b/samples/client/petstore/python/petstore_api/models/category.py index 0e23c409e5..b47c148953 100644 --- a/samples/client/petstore/python/petstore_api/models/category.py +++ b/samples/client/petstore/python/petstore_api/models/category.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Category(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Category(object): 'name': 'name' } - def __init__(self, id=None, name='default-name'): # noqa: E501 + def __init__(self, id=None, name='default-name', local_vars_configuration=None): # noqa: E501 """Category - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -90,7 +95,7 @@ class Category(object): :param name: The name of this Category. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -132,8 +137,11 @@ class Category(object): if not isinstance(other, Category): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Category): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/class_model.py b/samples/client/petstore/python/petstore_api/models/class_model.py index 88562beff8..ef6060ffa7 100644 --- a/samples/client/petstore/python/petstore_api/models/class_model.py +++ b/samples/client/petstore/python/petstore_api/models/class_model.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ClassModel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ClassModel(object): '_class': '_class' } - def __init__(self, _class=None): # noqa: E501 + def __init__(self, _class=None, local_vars_configuration=None): # noqa: E501 """ClassModel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__class = None self.discriminator = None @@ -105,8 +110,11 @@ class ClassModel(object): if not isinstance(other, ClassModel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassModel): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/client.py b/samples/client/petstore/python/petstore_api/models/client.py index b7083fd9bd..ee5dbf1c43 100644 --- a/samples/client/petstore/python/petstore_api/models/client.py +++ b/samples/client/petstore/python/petstore_api/models/client.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Client(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Client(object): 'client': 'client' } - def __init__(self, client=None): # noqa: E501 + def __init__(self, client=None, local_vars_configuration=None): # noqa: E501 """Client - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._client = None self.discriminator = None @@ -105,8 +110,11 @@ class Client(object): if not isinstance(other, Client): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Client): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/dog.py b/samples/client/petstore/python/petstore_api/models/dog.py index c325cb252c..eacb63eedb 100644 --- a/samples/client/petstore/python/petstore_api/models/dog.py +++ b/samples/client/petstore/python/petstore_api/models/dog.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Dog(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Dog(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """Dog - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ class Dog(object): if not isinstance(other, Dog): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Dog): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/dog_all_of.py b/samples/client/petstore/python/petstore_api/models/dog_all_of.py index b6328b0558..48e0485570 100644 --- a/samples/client/petstore/python/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python/petstore_api/models/dog_all_of.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class DogAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class DogAllOf(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """DogAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ class DogAllOf(object): if not isinstance(other, DogAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, DogAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/enum_arrays.py b/samples/client/petstore/python/petstore_api/models/enum_arrays.py index 00aa21d04d..819ff32215 100644 --- a/samples/client/petstore/python/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python/petstore_api/models/enum_arrays.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumArrays(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class EnumArrays(object): 'array_enum': 'array_enum' } - def __init__(self, just_symbol=None, array_enum=None): # noqa: E501 + def __init__(self, just_symbol=None, array_enum=None, local_vars_configuration=None): # noqa: E501 """EnumArrays - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_symbol = None self._array_enum = None @@ -71,7 +76,7 @@ class EnumArrays(object): :type: str """ allowed_values = [">=", "$"] # noqa: E501 - if just_symbol not in allowed_values: + if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501 .format(just_symbol, allowed_values) @@ -98,7 +103,8 @@ class EnumArrays(object): :type: list[str] """ allowed_values = ["fish", "crab"] # noqa: E501 - if not set(array_enum).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(array_enum).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 @@ -144,8 +150,11 @@ class EnumArrays(object): if not isinstance(other, EnumArrays): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumArrays): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/enum_class.py b/samples/client/petstore/python/petstore_api/models/enum_class.py index 3c1aa27975..8bc6275786 100644 --- a/samples/client/petstore/python/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python/petstore_api/models/enum_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class EnumClass(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """EnumClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class EnumClass(object): if not isinstance(other, EnumClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/enum_test.py b/samples/client/petstore/python/petstore_api/models/enum_test.py index 11e5020363..464281b3ec 100644 --- a/samples/client/petstore/python/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python/petstore_api/models/enum_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class EnumTest(object): 'outer_enum': 'outerEnum' } - def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 + def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, local_vars_configuration=None): # noqa: E501 """EnumTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._enum_string = None self._enum_string_required = None @@ -85,7 +90,7 @@ class EnumTest(object): :type: str """ allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501 .format(enum_string, allowed_values) @@ -111,10 +116,10 @@ class EnumTest(object): :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 :type: str """ - if enum_string_required is None: + if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501 raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string_required not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string_required not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501 .format(enum_string_required, allowed_values) @@ -141,7 +146,7 @@ class EnumTest(object): :type: int """ allowed_values = [1, -1] # noqa: E501 - if enum_integer not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501 .format(enum_integer, allowed_values) @@ -168,7 +173,7 @@ class EnumTest(object): :type: float """ allowed_values = [1.1, -1.2] # noqa: E501 - if enum_number not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501 .format(enum_number, allowed_values) @@ -234,8 +239,11 @@ class EnumTest(object): if not isinstance(other, EnumTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/file.py b/samples/client/petstore/python/petstore_api/models/file.py index 475f86b799..282df2957e 100644 --- a/samples/client/petstore/python/petstore_api/models/file.py +++ b/samples/client/petstore/python/petstore_api/models/file.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class File(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class File(object): 'source_uri': 'sourceURI' } - def __init__(self, source_uri=None): # noqa: E501 + def __init__(self, source_uri=None, local_vars_configuration=None): # noqa: E501 """File - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._source_uri = None self.discriminator = None @@ -107,8 +112,11 @@ class File(object): if not isinstance(other, File): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, File): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py index 9f3b5bdc17..de7f865b47 100644 --- a/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class FileSchemaTestClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class FileSchemaTestClass(object): 'files': 'files' } - def __init__(self, file=None, files=None): # noqa: E501 + def __init__(self, file=None, files=None, local_vars_configuration=None): # noqa: E501 """FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._file = None self._files = None @@ -131,8 +136,11 @@ class FileSchemaTestClass(object): if not isinstance(other, FileSchemaTestClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FileSchemaTestClass): + return True + + return self.to_dict() != other.to_dict() 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 1451cdcd6a..6396c442f6 100644 --- a/samples/client/petstore/python/petstore_api/models/format_test.py +++ b/samples/client/petstore/python/petstore_api/models/format_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class FormatTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -64,8 +66,11 @@ class FormatTest(object): 'big_decimal': 'BigDecimal' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None, local_vars_configuration=None): # noqa: E501 """FormatTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer = None self._int32 = None @@ -126,9 +131,11 @@ class FormatTest(object): :param integer: The integer of this FormatTest. # noqa: E501 :type: int """ - if integer is not None and integer > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer > 100): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501 - if integer is not None and integer < 10: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer < 10): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501 self._integer = integer @@ -151,9 +158,11 @@ class FormatTest(object): :param int32: The int32 of this FormatTest. # noqa: E501 :type: int """ - if int32 is not None and int32 > 200: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 > 200): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501 - if int32 is not None and int32 < 20: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 < 20): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501 self._int32 = int32 @@ -197,11 +206,13 @@ class FormatTest(object): :param number: The number of this FormatTest. # noqa: E501 :type: float """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - if number is not None and number > 543.2: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number > 543.2): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501 - if number is not None and number < 32.1: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number < 32.1): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501 self._number = number @@ -224,9 +235,11 @@ class FormatTest(object): :param float: The float of this FormatTest. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float > 987.6): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 - if float is not None and float < 54.3: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float < 54.3): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501 self._float = float @@ -249,9 +262,11 @@ class FormatTest(object): :param double: The double of this FormatTest. # noqa: E501 :type: float """ - if double is not None and double > 123.4: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double > 123.4): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501 - if double is not None and double < 67.8: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double < 67.8): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501 self._double = double @@ -274,7 +289,8 @@ class FormatTest(object): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + 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 @@ -297,9 +313,10 @@ class FormatTest(object): :param byte: The byte of this FormatTest. # noqa: E501 :type: str """ - if byte is None: + if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501 raise ValueError("Invalid value for `byte`, must not be `None`") # 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 + if (self.local_vars_configuration.client_side_validation and + 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 @@ -343,7 +360,7 @@ class FormatTest(object): :param date: The date of this FormatTest. # noqa: E501 :type: date """ - if date is None: + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 self._date = date @@ -408,11 +425,13 @@ class FormatTest(object): :param password: The password of this FormatTest. # noqa: E501 :type: str """ - if password is None: + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - if password is not None and len(password) > 64: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 64): raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501 - if password is not None and len(password) < 10: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 10): raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501 self._password = password @@ -475,8 +494,11 @@ class FormatTest(object): if not isinstance(other, FormatTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FormatTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python/petstore_api/models/has_only_read_only.py index 7c8d921a2d..5fc2f8a9eb 100644 --- a/samples/client/petstore/python/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python/petstore_api/models/has_only_read_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class HasOnlyReadOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class HasOnlyReadOnly(object): 'foo': 'foo' } - def __init__(self, bar=None, foo=None): # noqa: E501 + def __init__(self, bar=None, foo=None, local_vars_configuration=None): # noqa: E501 """HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._foo = None @@ -131,8 +136,11 @@ class HasOnlyReadOnly(object): if not isinstance(other, HasOnlyReadOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, HasOnlyReadOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/list.py b/samples/client/petstore/python/petstore_api/models/list.py index 74fc3719aa..d58d13e90f 100644 --- a/samples/client/petstore/python/petstore_api/models/list.py +++ b/samples/client/petstore/python/petstore_api/models/list.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class List(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class List(object): '_123_list': '123-list' } - def __init__(self, _123_list=None): # noqa: E501 + def __init__(self, _123_list=None, local_vars_configuration=None): # noqa: E501 """List - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__123_list = None self.discriminator = None @@ -105,8 +110,11 @@ class List(object): if not isinstance(other, List): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, List): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/map_test.py b/samples/client/petstore/python/petstore_api/models/map_test.py index cdfb936529..f0cfba5073 100644 --- a/samples/client/petstore/python/petstore_api/models/map_test.py +++ b/samples/client/petstore/python/petstore_api/models/map_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class MapTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class MapTest(object): 'indirect_map': 'indirect_map' } - def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501 + def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None, local_vars_configuration=None): # noqa: E501 """MapTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_map_of_string = None self._map_of_enum_string = None @@ -102,7 +107,8 @@ class MapTest(object): :type: dict(str, str) """ allowed_values = ["UPPER", "lower"] # noqa: E501 - if not set(map_of_enum_string.keys()).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 @@ -190,8 +196,11 @@ class MapTest(object): if not isinstance(other, MapTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MapTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py index 41a916eac1..5da34f8830 100644 --- a/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class MixedPropertiesAndAdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): 'map': 'map' } - def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501 + def __init__(self, uuid=None, date_time=None, map=None, local_vars_configuration=None): # noqa: E501 """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._uuid = None self._date_time = None @@ -157,8 +162,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/model200_response.py b/samples/client/petstore/python/petstore_api/models/model200_response.py index 563b82b593..841ce1f18f 100644 --- a/samples/client/petstore/python/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python/petstore_api/models/model200_response.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Model200Response(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Model200Response(object): '_class': 'class' } - def __init__(self, name=None, _class=None): # noqa: E501 + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 """Model200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.__class = None @@ -131,8 +136,11 @@ class Model200Response(object): if not isinstance(other, Model200Response): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Model200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/model_return.py b/samples/client/petstore/python/petstore_api/models/model_return.py index 0980120159..fdd8d72314 100644 --- a/samples/client/petstore/python/petstore_api/models/model_return.py +++ b/samples/client/petstore/python/petstore_api/models/model_return.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ModelReturn(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ModelReturn(object): '_return': 'return' } - def __init__(self, _return=None): # noqa: E501 + def __init__(self, _return=None, local_vars_configuration=None): # noqa: E501 """ModelReturn - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__return = None self.discriminator = None @@ -105,8 +110,11 @@ class ModelReturn(object): if not isinstance(other, ModelReturn): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ModelReturn): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/name.py b/samples/client/petstore/python/petstore_api/models/name.py index 43014d0fb6..bb2c1fbd73 100644 --- a/samples/client/petstore/python/petstore_api/models/name.py +++ b/samples/client/petstore/python/petstore_api/models/name.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Name(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class Name(object): '_123_number': '123Number' } - def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501 + def __init__(self, name=None, snake_case=None, _property=None, _123_number=None, local_vars_configuration=None): # noqa: E501 """Name - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._snake_case = None @@ -79,7 +84,7 @@ class Name(object): :param name: The name of this Name. # noqa: E501 :type: int """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -184,8 +189,11 @@ class Name(object): if not isinstance(other, Name): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Name): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/number_only.py b/samples/client/petstore/python/petstore_api/models/number_only.py index b6f3d1c1b6..99b2424852 100644 --- a/samples/client/petstore/python/petstore_api/models/number_only.py +++ b/samples/client/petstore/python/petstore_api/models/number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class NumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class NumberOnly(object): 'just_number': 'JustNumber' } - def __init__(self, just_number=None): # noqa: E501 + def __init__(self, just_number=None, local_vars_configuration=None): # noqa: E501 """NumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_number = None self.discriminator = None @@ -105,8 +110,11 @@ class NumberOnly(object): if not isinstance(other, NumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/order.py b/samples/client/petstore/python/petstore_api/models/order.py index 8b64e3a358..8c863cce8f 100644 --- a/samples/client/petstore/python/petstore_api/models/order.py +++ b/samples/client/petstore/python/petstore_api/models/order.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Order(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Order(object): 'complete': 'complete' } - def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501 + def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False, local_vars_configuration=None): # noqa: E501 """Order - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._pet_id = None @@ -177,7 +182,7 @@ class Order(object): :type: str """ allowed_values = ["placed", "approved", "delivered"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -243,8 +248,11 @@ class Order(object): if not isinstance(other, Order): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Order): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/outer_composite.py b/samples/client/petstore/python/petstore_api/models/outer_composite.py index dccd67055b..c11859114a 100644 --- a/samples/client/petstore/python/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python/petstore_api/models/outer_composite.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterComposite(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class OuterComposite(object): 'my_boolean': 'my_boolean' } - def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501 + def __init__(self, my_number=None, my_string=None, my_boolean=None, local_vars_configuration=None): # noqa: E501 """OuterComposite - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._my_number = None self._my_string = None @@ -157,8 +162,11 @@ class OuterComposite(object): if not isinstance(other, OuterComposite): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterComposite): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/outer_enum.py b/samples/client/petstore/python/petstore_api/models/outer_enum.py index a6697a0b15..8fbfeb7aae 100644 --- a/samples/client/petstore/python/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python/petstore_api/models/outer_enum.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterEnum(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnum(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnum - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class OuterEnum(object): if not isinstance(other, OuterEnum): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnum): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/pet.py b/samples/client/petstore/python/petstore_api/models/pet.py index 870608e17a..edbf73f531 100644 --- a/samples/client/petstore/python/petstore_api/models/pet.py +++ b/samples/client/petstore/python/petstore_api/models/pet.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Pet(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Pet(object): 'status': 'status' } - def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501 + def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, local_vars_configuration=None): # noqa: E501 """Pet - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._category = None @@ -130,7 +135,7 @@ class Pet(object): :param name: The name of this Pet. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -153,7 +158,7 @@ class Pet(object): :param photo_urls: The photo_urls of this Pet. # noqa: E501 :type: list[str] """ - if photo_urls is None: + if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501 raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501 self._photo_urls = photo_urls @@ -200,7 +205,7 @@ class Pet(object): :type: str """ allowed_values = ["available", "pending", "sold"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -245,8 +250,11 @@ class Pet(object): if not isinstance(other, Pet): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Pet): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/read_only_first.py b/samples/client/petstore/python/petstore_api/models/read_only_first.py index 3dfb7c7f62..a84679e98d 100644 --- a/samples/client/petstore/python/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python/petstore_api/models/read_only_first.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ReadOnlyFirst(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class ReadOnlyFirst(object): 'baz': 'baz' } - def __init__(self, bar=None, baz=None): # noqa: E501 + def __init__(self, bar=None, baz=None, local_vars_configuration=None): # noqa: E501 """ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._baz = None @@ -131,8 +136,11 @@ class ReadOnlyFirst(object): if not isinstance(other, ReadOnlyFirst): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ReadOnlyFirst): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/special_model_name.py b/samples/client/petstore/python/petstore_api/models/special_model_name.py index 2fd6378fcd..396e75bcee 100644 --- a/samples/client/petstore/python/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python/petstore_api/models/special_model_name.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class SpecialModelName(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class SpecialModelName(object): 'special_property_name': '$special[property.name]' } - def __init__(self, special_property_name=None): # noqa: E501 + def __init__(self, special_property_name=None, local_vars_configuration=None): # noqa: E501 """SpecialModelName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._special_property_name = None self.discriminator = None @@ -105,8 +110,11 @@ class SpecialModelName(object): if not isinstance(other, SpecialModelName): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SpecialModelName): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/tag.py b/samples/client/petstore/python/petstore_api/models/tag.py index cb9c22d9f5..d6137fdd47 100644 --- a/samples/client/petstore/python/petstore_api/models/tag.py +++ b/samples/client/petstore/python/petstore_api/models/tag.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Tag(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Tag(object): 'name': 'name' } - def __init__(self, id=None, name=None): # noqa: E501 + def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501 """Tag - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -131,8 +136,11 @@ class Tag(object): if not isinstance(other, Tag): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Tag): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/type_holder_default.py b/samples/client/petstore/python/petstore_api/models/type_holder_default.py index d7c207cb5f..8163ea77aa 100644 --- a/samples/client/petstore/python/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python/petstore_api/models/type_holder_default.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class TypeHolderDefault(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class TypeHolderDefault(object): 'array_item': 'array_item' } - def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None): # noqa: E501 + def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -80,7 +85,7 @@ class TypeHolderDefault(object): :param string_item: The string_item of this TypeHolderDefault. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -103,7 +108,7 @@ class TypeHolderDefault(object): :param number_item: The number_item of this TypeHolderDefault. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -126,7 +131,7 @@ class TypeHolderDefault(object): :param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -149,7 +154,7 @@ class TypeHolderDefault(object): :param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -172,7 +177,7 @@ class TypeHolderDefault(object): :param array_item: The array_item of this TypeHolderDefault. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -214,8 +219,11 @@ class TypeHolderDefault(object): if not isinstance(other, TypeHolderDefault): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderDefault): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/type_holder_example.py b/samples/client/petstore/python/petstore_api/models/type_holder_example.py index 745fe95da2..34481fd21e 100644 --- a/samples/client/petstore/python/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python/petstore_api/models/type_holder_example.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class TypeHolderExample(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class TypeHolderExample(object): 'array_item': 'array_item' } - def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None): # noqa: E501 + def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderExample - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -84,7 +89,7 @@ class TypeHolderExample(object): :param string_item: The string_item of this TypeHolderExample. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -107,7 +112,7 @@ class TypeHolderExample(object): :param number_item: The number_item of this TypeHolderExample. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -130,7 +135,7 @@ class TypeHolderExample(object): :param float_item: The float_item of this TypeHolderExample. # noqa: E501 :type: float """ - if float_item is None: + if self.local_vars_configuration.client_side_validation and float_item is None: # noqa: E501 raise ValueError("Invalid value for `float_item`, must not be `None`") # noqa: E501 self._float_item = float_item @@ -153,7 +158,7 @@ class TypeHolderExample(object): :param integer_item: The integer_item of this TypeHolderExample. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -176,7 +181,7 @@ class TypeHolderExample(object): :param bool_item: The bool_item of this TypeHolderExample. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -199,7 +204,7 @@ class TypeHolderExample(object): :param array_item: The array_item of this TypeHolderExample. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -241,8 +246,11 @@ class TypeHolderExample(object): if not isinstance(other, TypeHolderExample): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderExample): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/user.py b/samples/client/petstore/python/petstore_api/models/user.py index f46f5165df..de88bda4cd 100644 --- a/samples/client/petstore/python/petstore_api/models/user.py +++ b/samples/client/petstore/python/petstore_api/models/user.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class User(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -52,8 +54,11 @@ class User(object): 'user_status': 'userStatus' } - def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501 + def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None, local_vars_configuration=None): # noqa: E501 """User - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._username = None @@ -289,8 +294,11 @@ class User(object): if not isinstance(other, User): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, User): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/xml_item.py b/samples/client/petstore/python/petstore_api/models/xml_item.py index eaceeb5ef4..52ecc9aa52 100644 --- a/samples/client/petstore/python/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python/petstore_api/models/xml_item.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class XmlItem(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -94,8 +96,11 @@ class XmlItem(object): 'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array' } - def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None): # noqa: E501 + def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None, local_vars_configuration=None): # noqa: E501 """XmlItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._attribute_string = None self._attribute_number = None @@ -833,8 +838,11 @@ class XmlItem(object): if not isinstance(other, XmlItem): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, XmlItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/tests/test_api_client.py b/samples/client/petstore/python/tests/test_api_client.py index a41dbaba9c..c9b9edd86c 100644 --- a/samples/client/petstore/python/tests/test_api_client.py +++ b/samples/client/petstore/python/tests/test_api_client.py @@ -27,7 +27,6 @@ class ApiClientTests(unittest.TestCase): def test_configuration(self): config = petstore_api.Configuration() - config.host = 'http://localhost/' config.api_key['api_key'] = '123456' config.api_key_prefix['api_key'] = 'PREFIX' diff --git a/samples/client/petstore/python/tests/test_pet_api.py b/samples/client/petstore/python/tests/test_pet_api.py index 4f38fbd6e1..80d34f6b5f 100644 --- a/samples/client/petstore/python/tests/test_pet_api.py +++ b/samples/client/petstore/python/tests/test_pet_api.py @@ -24,7 +24,7 @@ import json import urllib3 -HOST = 'http://localhost/v2' +HOST = 'http://petstore.swagger.io/v2' class TimeoutWithEqual(urllib3.Timeout): @@ -104,13 +104,13 @@ class PetApiTests(unittest.TestCase): mock_pool = MockPoolManager(self) self.api_client.rest_client.pool_manager = mock_pool - mock_pool.expect_request('POST', 'http://localhost/v2/pet', + mock_pool.expect_request('POST', HOST + '/pet', body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)), headers={'Content-Type': 'application/json', 'Authorization': 'Bearer ', 'User-Agent': 'OpenAPI-Generator/1.0.0/python'}, preload_content=True, timeout=TimeoutWithEqual(total=5)) - mock_pool.expect_request('POST', 'http://localhost/v2/pet', + mock_pool.expect_request('POST', HOST + '/pet', body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)), headers={'Content-Type': 'application/json', 'Authorization': 'Bearer ', diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION index 2f81801b79..c3a2c7076f 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.1-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/bin/console b/samples/client/petstore/ruby-faraday/bin/console deleted file mode 100755 index 07c7bbe195..0000000000 --- a/samples/client/petstore/ruby-faraday/bin/console +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env ruby - -require "bundler/setup" -require "petstore" - -# You can add fixtures and/or initialization code here to make experimenting -# with your gem easier. You can also use a different console, if you like. -api = Petstore::PetApi.new -api.api_client.config.debugging = true -pet = api.get_pet_by_id(545646631) -new_pet = pet.dup -new_pet.id = nil - -res = api.add_pet(new_pet) - -require "pry" -Pry.start diff --git a/samples/client/petstore/ruby-faraday/docs/FormatTest.md b/samples/client/petstore/ruby-faraday/docs/FormatTest.md index 46f739ae78..6c1ba0be63 100644 --- a/samples/client/petstore/ruby-faraday/docs/FormatTest.md +++ b/samples/client/petstore/ruby-faraday/docs/FormatTest.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **date_time** | **DateTime** | | [optional] **uuid** | **String** | | [optional] **password** | **String** | | +**big_decimal** | [**BigDecimal**](BigDecimal.md) | | [optional] ## Code Sample @@ -35,7 +36,8 @@ instance = Petstore::FormatTest.new(integer: null, date: null, date_time: null, uuid: 72f98069-206d-4f12-9f12-3d1e525a8e84, - password: null) + password: null, + big_decimal: null) ``` diff --git a/samples/client/petstore/ruby-faraday/docs/HasOnlyReadOnly.md b/samples/client/petstore/ruby-faraday/docs/HasOnlyReadOnly.md index eb82d6b113..a15219a9c7 100644 --- a/samples/client/petstore/ruby-faraday/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/ruby-faraday/docs/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] ## Code Sample diff --git a/samples/client/petstore/ruby-faraday/docs/Name.md b/samples/client/petstore/ruby-faraday/docs/Name.md index bf4f381fe8..17cdbbd356 100644 --- a/samples/client/petstore/ruby-faraday/docs/Name.md +++ b/samples/client/petstore/ruby-faraday/docs/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snake_case** | **Integer** | | [optional] +**snake_case** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123_number** | **Integer** | | [optional] +**_123_number** | **Integer** | | [optional] [readonly] ## Code Sample diff --git a/samples/client/petstore/ruby-faraday/docs/ReadOnlyFirst.md b/samples/client/petstore/ruby-faraday/docs/ReadOnlyFirst.md index af6644b78a..f8f76a463a 100644 --- a/samples/client/petstore/ruby-faraday/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/ruby-faraday/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] ## Code Sample diff --git a/samples/client/petstore/ruby-faraday/docs/TypeHolderExample.md b/samples/client/petstore/ruby-faraday/docs/TypeHolderExample.md index 92dfed0300..2cab99f9bb 100644 --- a/samples/client/petstore/ruby-faraday/docs/TypeHolderExample.md +++ b/samples/client/petstore/ruby-faraday/docs/TypeHolderExample.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **string_item** | **String** | | **number_item** | **Float** | | +**float_item** | **Float** | | **integer_item** | **Integer** | | **bool_item** | **Boolean** | | **array_item** | **Array<Integer>** | | @@ -17,6 +18,7 @@ require 'Petstore' instance = Petstore::TypeHolderExample.new(string_item: what, number_item: 1.234, + float_item: 1.234, integer_item: -2, bool_item: true, array_item: [0, 1, 2, 3]) diff --git a/samples/client/petstore/ruby-faraday/git_push.sh b/samples/client/petstore/ruby-faraday/git_push.sh index b9fd6af8e0..ced3be2b0c 100644 --- a/samples/client/petstore/ruby-faraday/git_push.sh +++ b/samples/client/petstore/ruby-faraday/git_push.sh @@ -1,14 +1,17 @@ #!/bin/sh -# -# Generated by: https://openapi-generator.tech -# # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -40,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -50,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index 8069935b81..311f048a0b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb index bd412b5375..ea7ff62a64 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index b6a04048e7..94b67854dc 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb index 8b025d270a..ca991033c3 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb index dfe49165fe..a651d42994 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb index 730420b654..cd0592f0de 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb index 8ed6369f5c..2343edc90c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb index 7fa2f67e2f..921bfb9f53 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb index 06edcc78dc..61a202d3a4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index ae43bd936d..eddc7e51b9 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_any_type.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_any_type.rb index ceed16a9a1..aa52b0b673 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_any_type.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_any_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_array.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_array.rb index 59a3fc670c..f127c04cb8 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_array.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_array.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_boolean.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_boolean.rb index f4922760ae..4f0b9be966 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_boolean.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_boolean.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb index 4655656e14..07d6e155ac 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_integer.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_integer.rb index aa371aac26..08e1a4dc3b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_integer.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_number.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_number.rb index 72bf988f7f..1c6508302f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_number.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_number.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_object.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_object.rb index d7db986a21..a15b6fc529 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_object.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_string.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_string.rb index 948fe37e8e..a39086f685 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_string.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_string.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb index 4bb43b9b3f..0f306bf2f9 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal_farm.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal_farm.rb deleted file mode 100644 index c9db67d4a9..0000000000 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal_farm.rb +++ /dev/null @@ -1,174 +0,0 @@ -=begin -#OpenAPI Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT - -=end - -require 'date' - -module Petstore - class AnimalFarm - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = Petstore.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb index b97381b8f3..05f0916ae0 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb index 6524faab1b..b0604460fd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb index 2cb6117756..cd849d8187 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb index 6e8b6c9c41..994e285787 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb index 9e0b353acb..24378d9572 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb index 0e371fdab3..9ce0176633 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb index 220f108d8c..3bb617301e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb index 8089f254d4..2534502ee4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb index 8aa5d5272f..dc391cf09d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb index e70206c160..789892fc37 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb index 19203ab642..e504df5c3d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb index e96ac01580..fec9b9517a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb index 5b56559713..51d904e922 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb index e105ff447a..32c3cb9755 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb index e9ce263976..c6d8e23117 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb index 6bce09460d..e9b38a54d1 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb index 7bb95e34fd..a7b89286cb 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb index 001e61e518..2b8a7666c8 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end @@ -40,6 +40,8 @@ module Petstore attr_accessor :password + attr_accessor :big_decimal + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -55,7 +57,8 @@ module Petstore :'date' => :'date', :'date_time' => :'dateTime', :'uuid' => :'uuid', - :'password' => :'password' + :'password' => :'password', + :'big_decimal' => :'BigDecimal' } end @@ -74,7 +77,8 @@ module Petstore :'date' => :'Date', :'date_time' => :'DateTime', :'uuid' => :'String', - :'password' => :'String' + :'password' => :'String', + :'big_decimal' => :'BigDecimal' } end @@ -144,6 +148,10 @@ module Petstore if attributes.key?(:'password') self.password = attributes[:'password'] end + + if attributes.key?(:'big_decimal') + self.big_decimal = attributes[:'big_decimal'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -386,7 +394,8 @@ module Petstore date == o.date && date_time == o.date_time && uuid == o.uuid && - password == o.password + password == o.password && + big_decimal == o.big_decimal end # @see the `==` method @@ -398,7 +407,7 @@ module Petstore # Calculates hash code according to all attributes. # @return [Integer] 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, big_decimal].hash end # Builds the object from hash diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb index e916d10b16..c80fda59e2 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb index db861f23f7..18a9c412a0 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb index c8465b1823..f9880f3acd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 7e5ed17881..812b0ed159 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb index 552de582c6..235f67b7eb 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb index 3aaa464c8e..ee572c4f79 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb index 3025064418..e5de782f58 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb index 553ca99beb..85001f95f7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb index c790d70270..5beeeb5c30 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb index dd05f8ade3..8a049ccf9d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb index d24a7b353f..9abfa58346 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb index 59cbcadc5a..4244d562ee 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb index beccaccac4..8db7c75279 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb index f16178a214..44424fa712 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/string_boolean_map.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/string_boolean_map.rb deleted file mode 100644 index bf4b4c4b64..0000000000 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/string_boolean_map.rb +++ /dev/null @@ -1,174 +0,0 @@ -=begin -#OpenAPI Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT - -=end - -require 'date' - -module Petstore - class StringBooleanMap - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = Petstore.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb index 700c27baf1..4938dd170b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_default.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_default.rb index 4bf05bbf54..7389f3eb55 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_default.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_example.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_example.rb index 2e541c9761..93d678f920 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_example.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_example.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end @@ -18,6 +18,8 @@ module Petstore attr_accessor :number_item + attr_accessor :float_item + attr_accessor :integer_item attr_accessor :bool_item @@ -29,6 +31,7 @@ module Petstore { :'string_item' => :'string_item', :'number_item' => :'number_item', + :'float_item' => :'float_item', :'integer_item' => :'integer_item', :'bool_item' => :'bool_item', :'array_item' => :'array_item' @@ -40,6 +43,7 @@ module Petstore { :'string_item' => :'String', :'number_item' => :'Float', + :'float_item' => :'Float', :'integer_item' => :'Integer', :'bool_item' => :'Boolean', :'array_item' => :'Array' @@ -69,6 +73,10 @@ module Petstore self.number_item = attributes[:'number_item'] end + if attributes.key?(:'float_item') + self.float_item = attributes[:'float_item'] + end + if attributes.key?(:'integer_item') self.integer_item = attributes[:'integer_item'] end @@ -96,6 +104,10 @@ module Petstore invalid_properties.push('invalid value for "number_item", number_item cannot be nil.') end + if @float_item.nil? + invalid_properties.push('invalid value for "float_item", float_item cannot be nil.') + end + if @integer_item.nil? invalid_properties.push('invalid value for "integer_item", integer_item cannot be nil.') end @@ -116,6 +128,7 @@ module Petstore def valid? return false if @string_item.nil? return false if @number_item.nil? + return false if @float_item.nil? return false if @integer_item.nil? return false if @bool_item.nil? return false if @array_item.nil? @@ -129,6 +142,7 @@ module Petstore self.class == o.class && string_item == o.string_item && number_item == o.number_item && + float_item == o.float_item && integer_item == o.integer_item && bool_item == o.bool_item && array_item == o.array_item @@ -143,7 +157,7 @@ module Petstore # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [string_item, number_item, integer_item, bool_item, array_item].hash + [string_item, number_item, float_item, integer_item, bool_item, array_item].hash end # Builds the object from hash diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb index be6a8e9350..4309ea6a63 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/xml_item.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/xml_item.rb index 2894babc25..14e09f72f0 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/xml_item.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/xml_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb index 37b31e0899..eaaa4a9ba3 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec index 348b1213f4..4a11c0dad8 100644 --- a/samples/client/petstore/ruby-faraday/petstore.gemspec +++ b/samples/client/petstore/ruby-faraday/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.1-SNAPSHOT +OpenAPI Generator version: 4.2.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb b/samples/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb index 5fbf346bd1..010f6a9d29 100644 --- a/samples/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -19,7 +19,7 @@ require 'json' describe 'AnotherFakeApi' do before do # run before each test - @instance = Petstore::AnotherFakeApi.new + @api_instance = Petstore::AnotherFakeApi.new end after do @@ -28,14 +28,14 @@ describe 'AnotherFakeApi' do describe 'test an instance of AnotherFakeApi' do it 'should create an instance of AnotherFakeApi' do - expect(@instance).to be_instance_of(Petstore::AnotherFakeApi) + expect(@api_instance).to be_instance_of(Petstore::AnotherFakeApi) end end # unit tests for call_123_test_special_tags # To test special tags # To test special tags and operation ID starting with number - # @param client client model + # @param body client model # @param [Hash] opts the optional parameters # @return [Client] describe 'call_123_test_special_tags test' do diff --git a/samples/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb b/samples/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb index 010716fac6..7274fbf163 100644 --- a/samples/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -19,7 +19,7 @@ require 'json' describe 'FakeApi' do before do # run before each test - @instance = Petstore::FakeApi.new + @api_instance = Petstore::FakeApi.new end after do @@ -28,15 +28,27 @@ describe 'FakeApi' do describe 'test an instance of FakeApi' do it 'should create an instance of FakeApi' do - expect(@instance).to be_instance_of(Petstore::FakeApi) + expect(@api_instance).to be_instance_of(Petstore::FakeApi) + end + end + + # unit tests for create_xml_item + # creates an XmlItem + # this route creates an XmlItem + # @param xml_item XmlItem Body + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'create_xml_item test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for fake_outer_boolean_serialize # Test serialization of outer boolean types # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :body Input boolean as post body - # @return [BOOLEAN] + # @option opts [Boolean] :body Input boolean as post body + # @return [Boolean] describe 'fake_outer_boolean_serialize test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -46,7 +58,7 @@ describe 'FakeApi' do # unit tests for fake_outer_composite_serialize # Test serialization of object with outer number type # @param [Hash] opts the optional parameters - # @option opts [OuterComposite] :outer_composite Input composite as post body + # @option opts [OuterComposite] :body Input composite as post body # @return [OuterComposite] describe 'fake_outer_composite_serialize test' do it 'should work' do @@ -78,7 +90,7 @@ describe 'FakeApi' do # unit tests for test_body_with_file_schema # For this test, the body for this request much reference a schema named `File`. - # @param file_schema_test_class + # @param body # @param [Hash] opts the optional parameters # @return [nil] describe 'test_body_with_file_schema test' do @@ -89,7 +101,7 @@ describe 'FakeApi' do # unit tests for test_body_with_query_params # @param query - # @param user + # @param body # @param [Hash] opts the optional parameters # @return [nil] describe 'test_body_with_query_params test' do @@ -101,7 +113,7 @@ describe 'FakeApi' do # unit tests for test_client_model # To test \"client\" model # To test \"client\" model - # @param client client model + # @param body client model # @param [Hash] opts the optional parameters # @return [Client] describe 'test_client_model test' do @@ -162,7 +174,7 @@ describe 'FakeApi' do # @param required_int64_group Required Integer in group parameters # @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 [Boolean] :boolean_group Boolean in group parameters # @option opts [Integer] :int64_group Integer in group parameters # @return [nil] describe 'test_group_parameters test' do @@ -173,7 +185,7 @@ describe 'FakeApi' do # unit tests for test_inline_additional_properties # test inline additionalProperties - # @param request_body request body + # @param param request body # @param [Hash] opts the optional parameters # @return [nil] describe 'test_inline_additional_properties test' do @@ -194,4 +206,19 @@ describe 'FakeApi' do end end + # unit tests for test_query_parameter_collection_format + # To test the collection format in query parameters + # @param pipe + # @param ioutil + # @param http + # @param url + # @param context + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'test_query_parameter_collection_format test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/samples/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb b/samples/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb index bc7b1b9f01..4ec82d7d8a 100644 --- a/samples/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -19,7 +19,7 @@ require 'json' describe 'FakeClassnameTags123Api' do before do # run before each test - @instance = Petstore::FakeClassnameTags123Api.new + @api_instance = Petstore::FakeClassnameTags123Api.new end after do @@ -28,14 +28,14 @@ describe 'FakeClassnameTags123Api' do describe 'test an instance of FakeClassnameTags123Api' do it 'should create an instance of FakeClassnameTags123Api' do - expect(@instance).to be_instance_of(Petstore::FakeClassnameTags123Api) + expect(@api_instance).to be_instance_of(Petstore::FakeClassnameTags123Api) end end # unit tests for test_classname # To test class name in snake case # To test class name in snake case - # @param client client model + # @param body client model # @param [Hash] opts the optional parameters # @return [Client] describe 'test_classname test' do diff --git a/samples/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb b/samples/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb index 46d04d0382..fa122fb777 100644 --- a/samples/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -19,7 +19,7 @@ require 'json' describe 'PetApi' do before do # run before each test - @instance = Petstore::PetApi.new + @api_instance = Petstore::PetApi.new end after do @@ -28,13 +28,13 @@ describe 'PetApi' do describe 'test an instance of PetApi' do it 'should create an instance of PetApi' do - expect(@instance).to be_instance_of(Petstore::PetApi) + expect(@api_instance).to be_instance_of(Petstore::PetApi) end end # unit tests for add_pet # Add a new pet to the store - # @param pet Pet object that needs to be added to the store + # @param body Pet object that needs to be added to the store # @param [Hash] opts the optional parameters # @return [nil] describe 'add_pet test' do @@ -93,7 +93,7 @@ describe 'PetApi' do # unit tests for update_pet # Update an existing pet - # @param pet Pet object that needs to be added to the store + # @param body Pet object that needs to be added to the store # @param [Hash] opts the optional parameters # @return [nil] describe 'update_pet test' do diff --git a/samples/client/petstore/ruby-faraday/spec/api/store_api_spec.rb b/samples/client/petstore/ruby-faraday/spec/api/store_api_spec.rb index a8e5f98f26..cc7ff08491 100644 --- a/samples/client/petstore/ruby-faraday/spec/api/store_api_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api/store_api_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -19,7 +19,7 @@ require 'json' describe 'StoreApi' do before do # run before each test - @instance = Petstore::StoreApi.new + @api_instance = Petstore::StoreApi.new end after do @@ -28,7 +28,7 @@ describe 'StoreApi' do describe 'test an instance of StoreApi' do it 'should create an instance of StoreApi' do - expect(@instance).to be_instance_of(Petstore::StoreApi) + expect(@api_instance).to be_instance_of(Petstore::StoreApi) end end @@ -69,7 +69,7 @@ describe 'StoreApi' do # unit tests for place_order # Place an order for a pet - # @param order order placed for purchasing the pet + # @param body order placed for purchasing the pet # @param [Hash] opts the optional parameters # @return [Order] describe 'place_order test' do diff --git a/samples/client/petstore/ruby-faraday/spec/api/user_api_spec.rb b/samples/client/petstore/ruby-faraday/spec/api/user_api_spec.rb index ad03485ad5..5000c28560 100644 --- a/samples/client/petstore/ruby-faraday/spec/api/user_api_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api/user_api_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -19,7 +19,7 @@ require 'json' describe 'UserApi' do before do # run before each test - @instance = Petstore::UserApi.new + @api_instance = Petstore::UserApi.new end after do @@ -28,14 +28,14 @@ describe 'UserApi' do describe 'test an instance of UserApi' do it 'should create an instance of UserApi' do - expect(@instance).to be_instance_of(Petstore::UserApi) + expect(@api_instance).to be_instance_of(Petstore::UserApi) end end # unit tests for create_user # Create user # This can only be done by the logged in user. - # @param user Created user object + # @param body Created user object # @param [Hash] opts the optional parameters # @return [nil] describe 'create_user test' do @@ -46,7 +46,7 @@ describe 'UserApi' do # unit tests for create_users_with_array_input # Creates list of users with given input array - # @param user List of user object + # @param body List of user object # @param [Hash] opts the optional parameters # @return [nil] describe 'create_users_with_array_input test' do @@ -57,7 +57,7 @@ describe 'UserApi' do # unit tests for create_users_with_list_input # Creates list of users with given input array - # @param user List of user object + # @param body List of user object # @param [Hash] opts the optional parameters # @return [nil] describe 'create_users_with_list_input test' do @@ -115,7 +115,7 @@ describe 'UserApi' do # Updated user # This can only be done by the logged in user. # @param username name that need to be deleted - # @param user Updated user object + # @param body Updated user object # @param [Hash] opts the optional parameters # @return [nil] describe 'update_user test' do diff --git a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb index 126277d9c4..4a65cbd55a 100644 --- a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -51,44 +51,6 @@ describe Petstore::ApiClient do end end - describe 'params_encoding in #build_request' do - let(:config) { Petstore::Configuration.new } - let(:api_client) { Petstore::ApiClient.new(config) } - - it 'defaults to nil' do - expect(Petstore::Configuration.default.params_encoding).to eq(nil) - expect(config.params_encoding).to eq(nil) - - request = api_client.build_request(:get, '/test') - expect(request.options[:params_encoding]).to eq(nil) - end - - it 'can be customized' do - config.params_encoding = :multi - request = api_client.build_request(:get, '/test') - expect(request.options[:params_encoding]).to eq(:multi) - end - end - - describe 'timeout in #build_request' do - let(:config) { Petstore::Configuration.new } - let(:api_client) { Petstore::ApiClient.new(config) } - - it 'defaults to 0' do - expect(Petstore::Configuration.default.timeout).to eq(0) - expect(config.timeout).to eq(0) - - request = api_client.build_request(:get, '/test') - expect(request.options[:timeout]).to eq(0) - end - - it 'can be customized' do - config.timeout = 100 - request = api_client.build_request(:get, '/test') - expect(request.options[:timeout]).to eq(100) - end - end - describe '#deserialize' do it "handles Array" do api_client = Petstore::ApiClient.new diff --git a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb index dc10a08725..f26dd5d9ea 100644 --- a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_any_type_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_any_type_spec.rb index 846f3dec88..08020d33f8 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_any_type_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_any_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_array_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_array_spec.rb index ef280e7316..dc6fd5efd1 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_array_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_array_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_boolean_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_boolean_spec.rb index c56d64e418..0fc72b039e 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_boolean_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_boolean_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb index 74cdfd7266..9f02de5e83 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -32,13 +32,67 @@ describe 'AdditionalPropertiesClass' do expect(@instance).to be_instance_of(Petstore::AdditionalPropertiesClass) end end - describe 'test attribute "map_property"' do + describe 'test attribute "map_string"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "map_of_map_property"' do + describe 'test attribute "map_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "map_integer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "map_boolean"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "map_array_integer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "map_array_anytype"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "map_map_string"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "map_map_anytype"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "anytype_1"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "anytype_2"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "anytype_3"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_integer_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_integer_spec.rb index 78868109a6..7b41f50034 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_integer_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_integer_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_number_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_number_spec.rb index 9a33ded47a..a1ed8d033e 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_number_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_number_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_object_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_object_spec.rb index c9182ce664..047b92b9d8 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_object_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_object_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_string_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_string_spec.rb index b2c5288ec4..3150465952 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/additional_properties_string_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/additional_properties_string_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/animal_farm_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/animal_farm_spec.rb deleted file mode 100644 index ed49a705c1..0000000000 --- a/samples/client/petstore/ruby-faraday/spec/models/animal_farm_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -=begin -#OpenAPI Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::AnimalFarm -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'AnimalFarm' do - before do - # run before each test - @instance = Petstore::AnimalFarm.new - end - - after do - # run after each test - end - - describe 'test an instance of AnimalFarm' do - it 'should create an instance of AnimalFarm' do - expect(@instance).to be_instance_of(Petstore::AnimalFarm) - end - end -end diff --git a/samples/client/petstore/ruby-faraday/spec/models/animal_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/animal_spec.rb index 919d44a6de..6689296c03 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/animal_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/animal_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/api_response_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/api_response_spec.rb index eee1616215..7788def038 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/api_response_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/api_response_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb index af1b73b32f..e0af347043 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb index 0961426474..8c3c137d67 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/array_test_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/array_test_spec.rb index 0a73951d05..046dfd0b6f 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/array_test_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/array_test_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb index 3ff0cc6d46..79bdc3700e 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb index 49859a0524..55be1ba89d 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/cat_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/cat_spec.rb index 0a7f6f73d4..3a549f61b0 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/cat_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/cat_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -32,18 +32,6 @@ describe 'Cat' do expect(@instance).to be_instance_of(Petstore::Cat) end end - describe 'test attribute "class_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "color"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - describe 'test attribute "declawed"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/samples/client/petstore/ruby-faraday/spec/models/category_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/category_spec.rb index 9c01794aa1..92815daf87 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/category_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/category_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/class_model_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/class_model_spec.rb index 5db801ec21..1348f4108d 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/class_model_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/class_model_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/client_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/client_spec.rb index 799a0ab76a..d9f698219f 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/client_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/client_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb index 6cba24ecd9..797e3ac419 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/dog_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/dog_spec.rb index 0534bd2d1c..b5974e6bc2 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/dog_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/dog_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -32,18 +32,6 @@ describe 'Dog' do expect(@instance).to be_instance_of(Petstore::Dog) end end - describe 'test attribute "class_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "color"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - describe 'test attribute "breed"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/samples/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb index b41dbf4c3a..d8b99761ca 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb index 372b077794..ac9f99d1d8 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb index 4c2323476f..eab1cf34db 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -55,7 +55,7 @@ describe 'EnumTest' do describe 'test attribute "enum_integer"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('Integer', ["1", "-1"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Integer', [1, -1]) # validator.allowable_values.each do |value| # expect { @instance.enum_integer = value }.not_to raise_error # end @@ -65,7 +65,7 @@ describe 'EnumTest' do describe 'test attribute "enum_number"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('Float', ["1.1", "-1.2"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Float', [1.1, -1.2]) # validator.allowable_values.each do |value| # expect { @instance.enum_number = value }.not_to raise_error # end diff --git a/samples/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb index 0fe4facbb3..ce16c64d96 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/file_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/file_spec.rb index b13b57fa11..9ea07d9891 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/file_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/file_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/format_test_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/format_test_spec.rb index a23e6648d1..d2bdad7a4e 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/format_test_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/format_test_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -110,4 +110,10 @@ describe 'FormatTest' do end end + describe 'test attribute "big_decimal"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/samples/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb index e03a10b9d1..f74766f783 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/list_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/list_spec.rb index 17d747979b..85af1ebc1b 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/list_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/list_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/map_test_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/map_test_spec.rb index a715bf7e68..db8bcc93c7 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/map_test_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/map_test_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb index cfd0b0b7ba..f85e4fc0ab 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb index fb4647bd65..48514051ce 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/model_return_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/model_return_spec.rb index f48aa159a4..4686c6e58c 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/model_return_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/model_return_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/name_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/name_spec.rb index c579b1d6fc..acb40b4376 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/name_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/name_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/number_only_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/number_only_spec.rb index 875e0f4b16..622474911e 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/number_only_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/number_only_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/order_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/order_spec.rb index f7a9396004..b9207c7f82 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/order_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/order_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb index c096a07bb9..5e2770aa81 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb index e8d8c501b6..76b297bb92 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/pet_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/pet_spec.rb index 28ab016061..05d6639841 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/pet_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/pet_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb index 5688f5a5f6..8c9dc8faa6 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb index 154524f685..c37ebaff67 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/string_boolean_map_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/string_boolean_map_spec.rb deleted file mode 100644 index 49296ac3ce..0000000000 --- a/samples/client/petstore/ruby-faraday/spec/models/string_boolean_map_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -=begin -#OpenAPI Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::StringBooleanMap -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'StringBooleanMap' do - before do - # run before each test - @instance = Petstore::StringBooleanMap.new - end - - after do - # run after each test - end - - describe 'test an instance of StringBooleanMap' do - it 'should create an instance of StringBooleanMap' do - expect(@instance).to be_instance_of(Petstore::StringBooleanMap) - end - end -end diff --git a/samples/client/petstore/ruby-faraday/spec/models/tag_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/tag_spec.rb index 2fabaecb84..8cd9c57394 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/tag_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/tag_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/type_holder_default_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/type_holder_default_spec.rb index 3cee11d7ba..ff21256902 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/type_holder_default_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/type_holder_default_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/type_holder_example_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/type_holder_example_spec.rb index 0edc334dd6..9cd3cbe37e 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/type_holder_example_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/type_holder_example_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end @@ -44,6 +44,12 @@ describe 'TypeHolderExample' do end end + describe 'test attribute "float_item"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "integer_item"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/samples/client/petstore/ruby-faraday/spec/models/user_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/user_spec.rb index 220343859b..685280b7ad 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/user_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/user_spec.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/xml_item_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/xml_item_spec.rb index c7d06a3580..34d7837b2f 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/xml_item_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/xml_item_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.1.0-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb index bdda3fb7d0..9d2f01c329 100644 --- a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb +++ b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb @@ -3,10 +3,10 @@ #This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.3-SNAPSHOT +OpenAPI Generator version: 4.1.3-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/docs/HasOnlyReadOnly.md b/samples/client/petstore/ruby/docs/HasOnlyReadOnly.md index eb82d6b113..a15219a9c7 100644 --- a/samples/client/petstore/ruby/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/ruby/docs/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] ## Code Sample diff --git a/samples/client/petstore/ruby/docs/Name.md b/samples/client/petstore/ruby/docs/Name.md index bf4f381fe8..17cdbbd356 100644 --- a/samples/client/petstore/ruby/docs/Name.md +++ b/samples/client/petstore/ruby/docs/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snake_case** | **Integer** | | [optional] +**snake_case** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123_number** | **Integer** | | [optional] +**_123_number** | **Integer** | | [optional] [readonly] ## Code Sample diff --git a/samples/client/petstore/ruby/docs/ReadOnlyFirst.md b/samples/client/petstore/ruby/docs/ReadOnlyFirst.md index af6644b78a..f8f76a463a 100644 --- a/samples/client/petstore/ruby/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/ruby/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] ## Code Sample diff --git a/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION b/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION new file mode 100644 index 0000000000..479c313e87 --- /dev/null +++ b/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/.openapi-generator/VERSION b/samples/client/petstore/rust/.openapi-generator/VERSION new file mode 100644 index 0000000000..479c313e87 --- /dev/null +++ b/samples/client/petstore/rust/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/VERSION index 83a328a922..c3a2c7076f 100644 --- a/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/hyper/fileResponseTest/git_push.sh b/samples/client/petstore/rust/hyper/fileResponseTest/git_push.sh index 8442b80bb4..ced3be2b0c 100644 --- a/samples/client/petstore/rust/hyper/fileResponseTest/git_push.sh +++ b/samples/client/petstore/rust/hyper/fileResponseTest/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -28,7 +34,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/client.rs b/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/client.rs index 6105ed87f9..4976ba81c6 100644 --- a/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/client.rs +++ b/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/client.rs @@ -4,7 +4,7 @@ use hyper; use super::configuration::Configuration; pub struct APIClient { - default_api: Box, + default_api: Box, } impl APIClient { @@ -16,7 +16,7 @@ impl APIClient { } } - pub fn default_api(&self) -> &crate::apis::DefaultApi{ + pub fn default_api(&self) -> &dyn crate::apis::DefaultApi{ self.default_api.as_ref() } diff --git a/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/default_api.rs b/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/default_api.rs index d5440cb4df..fb52b3cc52 100644 --- a/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/default_api.rs +++ b/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/default_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -25,20 +27,21 @@ pub struct DefaultApiClient { impl DefaultApiClient { pub fn new(configuration: Rc>) -> DefaultApiClient { DefaultApiClient { - configuration: configuration, + configuration, } } } pub trait DefaultApi { - fn fileresponsetest(&self, ) -> Box>>; + fn fileresponsetest(&self, ) -> Box>>; } - implDefaultApi for DefaultApiClient { - fn fileresponsetest(&self, ) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/tests/fileResponse".to_string()) - .execute(self.configuration.borrow()) + fn fileresponsetest(&self, ) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Get, "/tests/fileResponse".to_string()) + ; + + req.execute(self.configuration.borrow()) } } diff --git a/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/request.rs b/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/request.rs index 2d5c7eb5a6..f97b527719 100644 --- a/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/request.rs +++ b/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/request.rs @@ -98,7 +98,7 @@ impl Request { pub fn execute<'a, C, U>( self, conf: &configuration::Configuration, - ) -> Box> + 'a> + ) -> Box> + 'a> where C: hyper::client::Connect, U: Sized + 'a, diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION index 83a328a922..c3a2c7076f 100644 --- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/hyper/petstore/docs/ApiResponse.md b/samples/client/petstore/rust/hyper/petstore/docs/ApiResponse.md index fe896d1a86..97128a87d9 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/ApiResponse.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/ApiResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **i32** | | [optional] -**_type** | **String** | | [optional] -**message** | **String** | | [optional] +**code** | Option<**i32**> | | [optional] +**_type** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/hyper/petstore/docs/Category.md b/samples/client/petstore/rust/hyper/petstore/docs/Category.md index 5890848827..1cf67347c0 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/Category.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/Category.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**name** | **String** | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/hyper/petstore/docs/Order.md b/samples/client/petstore/rust/hyper/petstore/docs/Order.md index 6d27453a76..d9a09c3974 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/Order.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/Order.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**pet_id** | **i64** | | [optional] -**quantity** | **i32** | | [optional] -**ship_date** | **String** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **bool** | | [optional] [default to false] +**id** | Option<**i64**> | | [optional] +**pet_id** | Option<**i64**> | | [optional] +**quantity** | Option<**i32**> | | [optional] +**ship_date** | Option<**String**> | | [optional] +**status** | Option<**String**> | Order Status | [optional] +**complete** | Option<**bool**> | | [optional][default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/hyper/petstore/docs/Pet.md b/samples/client/petstore/rust/hyper/petstore/docs/Pet.md index 2c8ea36dd9..27886889d1 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/Pet.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/Pet.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**category** | [***crate::models::Category**](Category.md) | | [optional] +**id** | Option<**i64**> | | [optional] +**category** | Option<[**crate::models::Category**](Category.md)> | | [optional] **name** | **String** | | **photo_urls** | **Vec** | | -**tags** | [**Vec**](Tag.md) | | [optional] -**status** | **String** | pet status in the store | [optional] +**tags** | Option<[**Vec**](Tag.md)> | | [optional] +**status** | Option<**String**> | pet status in the store | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md b/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md index f6f1929b42..6ac82abc9d 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md @@ -25,7 +25,7 @@ Add a new pet to the store Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | Required | +**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | ### Return type @@ -53,8 +53,8 @@ Deletes a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | Pet id to delete | Required | -**api_key** | **String** | | | +**pet_id** | **i64** | Pet id to delete | [required] | +**api_key** | Option<**String**> | | | ### Return type @@ -84,7 +84,7 @@ Multiple status values can be provided with comma separated strings Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**status** | [**Vec**](String.md) | Status values that need to be considered for filter | Required | +**status** | [**Vec**](String.md) | Status values that need to be considered for filter | [required] | ### Return type @@ -114,7 +114,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**tags** | [**Vec**](String.md) | Tags to filter by | Required | +**tags** | [**Vec**](String.md) | Tags to filter by | [required] | ### Return type @@ -144,7 +144,7 @@ Returns a single pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to return | Required | +**pet_id** | **i64** | ID of pet to return | [required] | ### Return type @@ -172,7 +172,7 @@ Update an existing pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | Required | +**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | ### Return type @@ -200,9 +200,9 @@ Updates a pet in the store with form data Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet that needs to be updated | Required | -**name** | **String** | Updated name of the pet | | -**status** | **String** | Updated status of the pet | | +**pet_id** | **i64** | ID of pet that needs to be updated | [required] | +**name** | Option<**String**> | Updated name of the pet | | +**status** | Option<**String**> | Updated status of the pet | | ### Return type @@ -230,9 +230,9 @@ uploads an image Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to update | Required | -**additional_metadata** | **String** | Additional data to pass to server | | -**file** | **std::path::PathBuf** | file to upload | | +**pet_id** | **i64** | ID of pet to update | [required] | +**additional_metadata** | Option<**String**> | Additional data to pass to server | | +**file** | Option<**std::path::PathBuf**> | file to upload | | ### Return type diff --git a/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md b/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md index 44aa5e83a3..7a7b9498d1 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md @@ -23,7 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **String** | ID of the order that needs to be deleted | Required | +**order_id** | **String** | ID of the order that needs to be deleted | [required] | ### Return type @@ -80,7 +80,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **i64** | ID of pet that needs to be fetched | Required | +**order_id** | **i64** | ID of pet that needs to be fetched | [required] | ### Return type @@ -108,7 +108,7 @@ Place an order for a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Order**](Order.md) | order placed for purchasing the pet | Required | +**body** | [**Order**](Order.md) | order placed for purchasing the pet | [required] | ### Return type diff --git a/samples/client/petstore/rust/hyper/petstore/docs/Tag.md b/samples/client/petstore/rust/hyper/petstore/docs/Tag.md index cc377c0ef4..7bf71ab0e9 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/Tag.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/Tag.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**name** | **String** | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/hyper/petstore/docs/User.md b/samples/client/petstore/rust/hyper/petstore/docs/User.md index 8f0a63847c..2e6abda42b 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/User.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/User.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**username** | **String** | | [optional] -**first_name** | **String** | | [optional] -**last_name** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**user_status** | **i32** | User Status | [optional] +**id** | Option<**i64**> | | [optional] +**username** | Option<**String**> | | [optional] +**first_name** | Option<**String**> | | [optional] +**last_name** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**password** | Option<**String**> | | [optional] +**phone** | Option<**String**> | | [optional] +**user_status** | Option<**i32**> | User Status | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/hyper/petstore/docs/UserApi.md b/samples/client/petstore/rust/hyper/petstore/docs/UserApi.md index 051a6a15ff..f3fce53b66 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/UserApi.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/UserApi.md @@ -27,7 +27,7 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**User**](User.md) | Created user object | Required | +**body** | [**User**](User.md) | Created user object | [required] | ### Return type @@ -55,7 +55,7 @@ Creates list of users with given input array Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Vec**](User.md) | List of user object | Required | +**body** | [**Vec**](User.md) | List of user object | [required] | ### Return type @@ -83,7 +83,7 @@ Creates list of users with given input array Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Vec**](User.md) | List of user object | Required | +**body** | [**Vec**](User.md) | List of user object | [required] | ### Return type @@ -113,7 +113,7 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The name that needs to be deleted | Required | +**username** | **String** | The name that needs to be deleted | [required] | ### Return type @@ -141,7 +141,7 @@ Get user by user name Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The name that needs to be fetched. Use user1 for testing. | Required | +**username** | **String** | The name that needs to be fetched. Use user1 for testing. | [required] | ### Return type @@ -169,8 +169,8 @@ Logs user into the system Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The user name for login | Required | -**password** | **String** | The password for login in clear text | Required | +**username** | **String** | The user name for login | [required] | +**password** | **String** | The password for login in clear text | [required] | ### Return type @@ -225,8 +225,8 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | name that need to be deleted | Required | -**body** | [**User**](User.md) | Updated user object | Required | +**username** | **String** | name that need to be deleted | [required] | +**body** | [**User**](User.md) | Updated user object | [required] | ### Return type diff --git a/samples/client/petstore/rust/hyper/petstore/git_push.sh b/samples/client/petstore/rust/hyper/petstore/git_push.sh index 8442b80bb4..ced3be2b0c 100644 --- a/samples/client/petstore/rust/hyper/petstore/git_push.sh +++ b/samples/client/petstore/rust/hyper/petstore/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -28,7 +34,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/client.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/client.rs index 39175e119e..34953d4a06 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/client.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/client.rs @@ -4,9 +4,9 @@ use hyper; use super::configuration::Configuration; pub struct APIClient { - pet_api: Box, - store_api: Box, - user_api: Box, + pet_api: Box, + store_api: Box, + user_api: Box, } impl APIClient { @@ -20,15 +20,15 @@ impl APIClient { } } - pub fn pet_api(&self) -> &crate::apis::PetApi{ + pub fn pet_api(&self) -> &dyn crate::apis::PetApi{ self.pet_api.as_ref() } - pub fn store_api(&self) -> &crate::apis::StoreApi{ + pub fn store_api(&self) -> &dyn crate::apis::StoreApi{ self.store_api.as_ref() } - pub fn user_api(&self) -> &crate::apis::UserApi{ + pub fn user_api(&self) -> &dyn crate::apis::UserApi{ self.user_api.as_ref() } diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs index e3fe372fc9..6ecaee9103 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -25,91 +27,116 @@ pub struct PetApiClient { impl PetApiClient { pub fn new(configuration: Rc>) -> PetApiClient { PetApiClient { - configuration: configuration, + configuration, } } } pub trait PetApi { - fn add_pet(&self, body: crate::models::Pet) -> Box>>; - fn delete_pet(&self, pet_id: i64, api_key: &str) -> Box>>; - fn find_pets_by_status(&self, status: Vec) -> Box, Error = Error>>; - fn find_pets_by_tags(&self, tags: Vec) -> Box, Error = Error>>; - fn get_pet_by_id(&self, pet_id: i64) -> Box>>; - fn update_pet(&self, body: crate::models::Pet) -> Box>>; - fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Box>>; - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Box>>; + fn add_pet(&self, body: crate::models::Pet) -> Box>>; + fn delete_pet(&self, pet_id: i64, api_key: Option<&str>) -> Box>>; + fn find_pets_by_status(&self, status: Vec) -> Box, Error = Error>>; + fn find_pets_by_tags(&self, tags: Vec) -> Box, Error = Error>>; + fn get_pet_by_id(&self, pet_id: i64) -> Box>>; + fn update_pet(&self, body: crate::models::Pet) -> Box>>; + fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Box>>; + fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Box>>; } - implPetApi for PetApiClient { - fn add_pet(&self, body: crate::models::Pet) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/pet".to_string()) + fn add_pet(&self, body: crate::models::Pet) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Post, "/pet".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + ; + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn delete_pet(&self, pet_id: i64, api_key: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Delete, "/pet/{petId}".to_string()) + fn delete_pet(&self, pet_id: i64, api_key: Option<&str>) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Delete, "/pet/{petId}".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_path_param("petId".to_string(), pet_id.to_string()) - .with_header_param("api_key".to_string(), api_key.to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + ; + req = req.with_path_param("petId".to_string(), pet_id.to_string()); + if let Some(param_value) = api_key { + req = req.with_header_param("api_key".to_string(), param_value.to_string()); + } + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn find_pets_by_status(&self, status: Vec) -> Box, Error = Error>> { - __internal_request::Request::new(hyper::Method::Get, "/pet/findByStatus".to_string()) + fn find_pets_by_status(&self, status: Vec) -> Box, Error = Error>> { + let mut req = __internal_request::Request::new(hyper::Method::Get, "/pet/findByStatus".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_query_param("status".to_string(), status.join(",").to_string()) - .execute(self.configuration.borrow()) + ; + req = req.with_query_param("status".to_string(), status.join(",").to_string()); + + req.execute(self.configuration.borrow()) } - fn find_pets_by_tags(&self, tags: Vec) -> Box, Error = Error>> { - __internal_request::Request::new(hyper::Method::Get, "/pet/findByTags".to_string()) + fn find_pets_by_tags(&self, tags: Vec) -> Box, Error = Error>> { + let mut req = __internal_request::Request::new(hyper::Method::Get, "/pet/findByTags".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_query_param("tags".to_string(), tags.join(",").to_string()) - .execute(self.configuration.borrow()) + ; + req = req.with_query_param("tags".to_string(), tags.join(",").to_string()); + + req.execute(self.configuration.borrow()) } - fn get_pet_by_id(&self, pet_id: i64) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/pet/{petId}".to_string()) + fn get_pet_by_id(&self, pet_id: i64) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Get, "/pet/{petId}".to_string()) .with_auth(__internal_request::Auth::ApiKey(__internal_request::ApiKey{ in_header: true, in_query: false, param_name: "api_key".to_owned(), })) - .with_path_param("petId".to_string(), pet_id.to_string()) - .execute(self.configuration.borrow()) + ; + req = req.with_path_param("petId".to_string(), pet_id.to_string()); + + req.execute(self.configuration.borrow()) } - fn update_pet(&self, body: crate::models::Pet) -> Box>> { - __internal_request::Request::new(hyper::Method::Put, "/pet".to_string()) + fn update_pet(&self, body: crate::models::Pet) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Put, "/pet".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + ; + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/pet/{petId}".to_string()) + fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Post, "/pet/{petId}".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_path_param("petId".to_string(), pet_id.to_string()) - .with_form_param("name".to_string(), name.to_string()) - .with_form_param("status".to_string(), status.to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + ; + req = req.with_path_param("petId".to_string(), pet_id.to_string()); + if let Some(param_value) = name { + req = req.with_form_param("name".to_string(), param_value.to_string()); + } + if let Some(param_value) = status { + req = req.with_form_param("status".to_string(), param_value.to_string()); + } + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/pet/{petId}/uploadImage".to_string()) + fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Post, "/pet/{petId}/uploadImage".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_path_param("petId".to_string(), pet_id.to_string()) - .with_form_param("additionalMetadata".to_string(), additional_metadata.to_string()) - .with_form_param("file".to_string(), unimplemented!()) - .execute(self.configuration.borrow()) + ; + req = req.with_path_param("petId".to_string(), pet_id.to_string()); + if let Some(param_value) = additional_metadata { + req = req.with_form_param("additionalMetadata".to_string(), param_value.to_string()); + } + if let Some(param_value) = file { + req = req.with_form_param("file".to_string(), unimplemented!()); + } + + req.execute(self.configuration.borrow()) } } diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/request.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/request.rs index 2d5c7eb5a6..f97b527719 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/request.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/request.rs @@ -98,7 +98,7 @@ impl Request { pub fn execute<'a, C, U>( self, conf: &configuration::Configuration, - ) -> Box> + 'a> + ) -> Box> + 'a> where C: hyper::client::Connect, U: Sized + 'a, diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs index 2c827cce04..a72554307e 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -25,47 +27,54 @@ pub struct StoreApiClient { impl StoreApiClient { pub fn new(configuration: Rc>) -> StoreApiClient { StoreApiClient { - configuration: configuration, + configuration, } } } pub trait StoreApi { - fn delete_order(&self, order_id: &str) -> Box>>; - fn get_inventory(&self, ) -> Box, Error = Error>>; - fn get_order_by_id(&self, order_id: i64) -> Box>>; - fn place_order(&self, body: crate::models::Order) -> Box>>; + fn delete_order(&self, order_id: &str) -> Box>>; + fn get_inventory(&self, ) -> Box, Error = Error>>; + fn get_order_by_id(&self, order_id: i64) -> Box>>; + fn place_order(&self, body: crate::models::Order) -> Box>>; } - implStoreApi for StoreApiClient { - fn delete_order(&self, order_id: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Delete, "/store/order/{orderId}".to_string()) - .with_path_param("orderId".to_string(), order_id.to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + fn delete_order(&self, order_id: &str) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Delete, "/store/order/{orderId}".to_string()) + ; + req = req.with_path_param("orderId".to_string(), order_id.to_string()); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn get_inventory(&self, ) -> Box, Error = Error>> { - __internal_request::Request::new(hyper::Method::Get, "/store/inventory".to_string()) + fn get_inventory(&self, ) -> Box, Error = Error>> { + let mut req = __internal_request::Request::new(hyper::Method::Get, "/store/inventory".to_string()) .with_auth(__internal_request::Auth::ApiKey(__internal_request::ApiKey{ in_header: true, in_query: false, param_name: "api_key".to_owned(), })) - .execute(self.configuration.borrow()) + ; + + req.execute(self.configuration.borrow()) } - fn get_order_by_id(&self, order_id: i64) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/store/order/{orderId}".to_string()) - .with_path_param("orderId".to_string(), order_id.to_string()) - .execute(self.configuration.borrow()) + fn get_order_by_id(&self, order_id: i64) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Get, "/store/order/{orderId}".to_string()) + ; + req = req.with_path_param("orderId".to_string(), order_id.to_string()); + + req.execute(self.configuration.borrow()) } - fn place_order(&self, body: crate::models::Order) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/store/order".to_string()) - .with_body_param(body) - .execute(self.configuration.borrow()) + fn place_order(&self, body: crate::models::Order) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Post, "/store/order".to_string()) + ; + req = req.with_body_param(body); + + req.execute(self.configuration.borrow()) } } diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs index 1ea00f7536..70f2ab5ae3 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -25,77 +27,92 @@ pub struct UserApiClient { impl UserApiClient { pub fn new(configuration: Rc>) -> UserApiClient { UserApiClient { - configuration: configuration, + configuration, } } } pub trait UserApi { - fn create_user(&self, body: crate::models::User) -> Box>>; - fn create_users_with_array_input(&self, body: Vec) -> Box>>; - fn create_users_with_list_input(&self, body: Vec) -> Box>>; - fn delete_user(&self, username: &str) -> Box>>; - fn get_user_by_name(&self, username: &str) -> Box>>; - fn login_user(&self, username: &str, password: &str) -> Box>>; - fn logout_user(&self, ) -> Box>>; - fn update_user(&self, username: &str, body: crate::models::User) -> Box>>; + fn create_user(&self, body: crate::models::User) -> Box>>; + fn create_users_with_array_input(&self, body: Vec) -> Box>>; + fn create_users_with_list_input(&self, body: Vec) -> Box>>; + fn delete_user(&self, username: &str) -> Box>>; + fn get_user_by_name(&self, username: &str) -> Box>>; + fn login_user(&self, username: &str, password: &str) -> Box>>; + fn logout_user(&self, ) -> Box>>; + fn update_user(&self, username: &str, body: crate::models::User) -> Box>>; } - implUserApi for UserApiClient { - fn create_user(&self, body: crate::models::User) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/user".to_string()) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + fn create_user(&self, body: crate::models::User) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Post, "/user".to_string()) + ; + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn create_users_with_array_input(&self, body: Vec) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/user/createWithArray".to_string()) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + fn create_users_with_array_input(&self, body: Vec) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Post, "/user/createWithArray".to_string()) + ; + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn create_users_with_list_input(&self, body: Vec) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/user/createWithList".to_string()) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + fn create_users_with_list_input(&self, body: Vec) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Post, "/user/createWithList".to_string()) + ; + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn delete_user(&self, username: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Delete, "/user/{username}".to_string()) - .with_path_param("username".to_string(), username.to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + fn delete_user(&self, username: &str) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Delete, "/user/{username}".to_string()) + ; + req = req.with_path_param("username".to_string(), username.to_string()); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn get_user_by_name(&self, username: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/user/{username}".to_string()) - .with_path_param("username".to_string(), username.to_string()) - .execute(self.configuration.borrow()) + fn get_user_by_name(&self, username: &str) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Get, "/user/{username}".to_string()) + ; + req = req.with_path_param("username".to_string(), username.to_string()); + + req.execute(self.configuration.borrow()) } - fn login_user(&self, username: &str, password: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/user/login".to_string()) - .with_query_param("username".to_string(), username.to_string()) - .with_query_param("password".to_string(), password.to_string()) - .execute(self.configuration.borrow()) + fn login_user(&self, username: &str, password: &str) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Get, "/user/login".to_string()) + ; + req = req.with_query_param("username".to_string(), username.to_string()); + req = req.with_query_param("password".to_string(), password.to_string()); + + req.execute(self.configuration.borrow()) } - fn logout_user(&self, ) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/user/logout".to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + fn logout_user(&self, ) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Get, "/user/logout".to_string()) + ; + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn update_user(&self, username: &str, body: crate::models::User) -> Box>> { - __internal_request::Request::new(hyper::Method::Put, "/user/{username}".to_string()) - .with_path_param("username".to_string(), username.to_string()) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + fn update_user(&self, username: &str, body: crate::models::User) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Put, "/user/{username}".to_string()) + ; + req = req.with_path_param("username".to_string(), username.to_string()); + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } } diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/api_response.rs b/samples/client/petstore/rust/hyper/petstore/src/models/api_response.rs index 45395215a3..f1286a5d1c 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/api_response.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/api_response.rs @@ -11,6 +11,7 @@ /// ApiResponse : Describes the result of uploading an image resource + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ApiResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/category.rs b/samples/client/petstore/rust/hyper/petstore/src/models/category.rs index 1c8763902b..dcd2dc3863 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/category.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/category.rs @@ -11,6 +11,7 @@ /// Category : A category for a pet + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Category { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/mod.rs b/samples/client/petstore/rust/hyper/petstore/src/models/mod.rs index b4495b6a5f..1baf2f7528 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/mod.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/mod.rs @@ -1,12 +1,12 @@ -mod api_response; +pub mod api_response; pub use self::api_response::ApiResponse; -mod category; +pub mod category; pub use self::category::Category; -mod order; +pub mod order; pub use self::order::Order; -mod pet; +pub mod pet; pub use self::pet::Pet; -mod tag; +pub mod tag; pub use self::tag::Tag; -mod user; +pub mod user; pub use self::user::User; diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/order.rs b/samples/client/petstore/rust/hyper/petstore/src/models/order.rs index 685e080e31..89cab91e62 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/order.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/order.rs @@ -11,6 +11,7 @@ /// Order : An order for a pets from the pet store + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Order { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs b/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs index 2da297169e..ff8a32fee3 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs @@ -11,6 +11,7 @@ /// Pet : A pet for sale in the pet store + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Pet { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] @@ -34,8 +35,8 @@ impl Pet { Pet { id: None, category: None, - name: name, - photo_urls: photo_urls, + name, + photo_urls, tags: None, status: None, } diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/tag.rs b/samples/client/petstore/rust/hyper/petstore/src/models/tag.rs index 364143932c..f6bcb5c78d 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/tag.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/tag.rs @@ -11,6 +11,7 @@ /// Tag : A tag for a pet + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Tag { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/user.rs b/samples/client/petstore/rust/hyper/petstore/src/models/user.rs index b6b9fc78fb..cf863af7b5 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/user.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/user.rs @@ -11,6 +11,7 @@ /// User : A User who is purchasing from the pet store + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct User { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/VERSION index 83a328a922..c3a2c7076f 100644 --- a/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/hyper/rust-test/docs/TypeTesting.md b/samples/client/petstore/rust/hyper/rust-test/docs/TypeTesting.md index e84136389e..7b05cee280 100644 --- a/samples/client/petstore/rust/hyper/rust-test/docs/TypeTesting.md +++ b/samples/client/petstore/rust/hyper/rust-test/docs/TypeTesting.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**integer** | **i32** | | [optional] -**long** | **i64** | | [optional] -**number** | **f32** | | [optional] -**float** | **f32** | | [optional] -**double** | **f64** | | [optional] -**uuid** | **String** | | [optional] +**integer** | Option<**i32**> | | [optional] +**long** | Option<**i64**> | | [optional] +**number** | Option<**f32**> | | [optional] +**float** | Option<**f32**> | | [optional] +**double** | Option<**f64**> | | [optional] +**uuid** | Option<**String**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/hyper/rust-test/git_push.sh b/samples/client/petstore/rust/hyper/rust-test/git_push.sh index 8442b80bb4..ced3be2b0c 100644 --- a/samples/client/petstore/rust/hyper/rust-test/git_push.sh +++ b/samples/client/petstore/rust/hyper/rust-test/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -28,7 +34,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/rust/hyper/rust-test/src/apis/client.rs b/samples/client/petstore/rust/hyper/rust-test/src/apis/client.rs index 6105ed87f9..4976ba81c6 100644 --- a/samples/client/petstore/rust/hyper/rust-test/src/apis/client.rs +++ b/samples/client/petstore/rust/hyper/rust-test/src/apis/client.rs @@ -4,7 +4,7 @@ use hyper; use super::configuration::Configuration; pub struct APIClient { - default_api: Box, + default_api: Box, } impl APIClient { @@ -16,7 +16,7 @@ impl APIClient { } } - pub fn default_api(&self) -> &crate::apis::DefaultApi{ + pub fn default_api(&self) -> &dyn crate::apis::DefaultApi{ self.default_api.as_ref() } diff --git a/samples/client/petstore/rust/hyper/rust-test/src/apis/default_api.rs b/samples/client/petstore/rust/hyper/rust-test/src/apis/default_api.rs index b1894d69ef..5ebb6a09dd 100644 --- a/samples/client/petstore/rust/hyper/rust-test/src/apis/default_api.rs +++ b/samples/client/petstore/rust/hyper/rust-test/src/apis/default_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -25,21 +27,22 @@ pub struct DefaultApiClient { impl DefaultApiClient { pub fn new(configuration: Rc>) -> DefaultApiClient { DefaultApiClient { - configuration: configuration, + configuration, } } } pub trait DefaultApi { - fn dummy_get(&self, ) -> Box>>; + fn dummy_get(&self, ) -> Box>>; } - implDefaultApi for DefaultApiClient { - fn dummy_get(&self, ) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/dummy".to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + fn dummy_get(&self, ) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Get, "/dummy".to_string()) + ; + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } } diff --git a/samples/client/petstore/rust/hyper/rust-test/src/apis/request.rs b/samples/client/petstore/rust/hyper/rust-test/src/apis/request.rs index 2d5c7eb5a6..f97b527719 100644 --- a/samples/client/petstore/rust/hyper/rust-test/src/apis/request.rs +++ b/samples/client/petstore/rust/hyper/rust-test/src/apis/request.rs @@ -98,7 +98,7 @@ impl Request { pub fn execute<'a, C, U>( self, conf: &configuration::Configuration, - ) -> Box> + 'a> + ) -> Box> + 'a> where C: hyper::client::Connect, U: Sized + 'a, diff --git a/samples/client/petstore/rust/hyper/rust-test/src/models/mod.rs b/samples/client/petstore/rust/hyper/rust-test/src/models/mod.rs index 8762207b5b..97887b5798 100644 --- a/samples/client/petstore/rust/hyper/rust-test/src/models/mod.rs +++ b/samples/client/petstore/rust/hyper/rust-test/src/models/mod.rs @@ -1,2 +1,2 @@ -mod type_testing; +pub mod type_testing; pub use self::type_testing::TypeTesting; diff --git a/samples/client/petstore/rust/hyper/rust-test/src/models/type_testing.rs b/samples/client/petstore/rust/hyper/rust-test/src/models/type_testing.rs index abd6582cc6..57188e8ee7 100644 --- a/samples/client/petstore/rust/hyper/rust-test/src/models/type_testing.rs +++ b/samples/client/petstore/rust/hyper/rust-test/src/models/type_testing.rs @@ -11,6 +11,7 @@ /// TypeTesting : Test handling of differing types (see \\#3463) + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TypeTesting { #[serde(rename = "integer", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/VERSION index 83a328a922..c3a2c7076f 100644 --- a/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/fileResponseTest/git_push.sh b/samples/client/petstore/rust/reqwest/fileResponseTest/git_push.sh index 8442b80bb4..ced3be2b0c 100644 --- a/samples/client/petstore/rust/reqwest/fileResponseTest/git_push.sh +++ b/samples/client/petstore/rust/reqwest/fileResponseTest/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -28,7 +34,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/client.rs b/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/client.rs index 2f76997d31..7566e9e847 100644 --- a/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/client.rs +++ b/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/client.rs @@ -3,7 +3,7 @@ use std::rc::Rc; use super::configuration::Configuration; pub struct APIClient { - default_api: Box, + default_api: Box, } impl APIClient { @@ -15,7 +15,7 @@ impl APIClient { } } - pub fn default_api(&self) -> &crate::apis::DefaultApi{ + pub fn default_api(&self) -> &dyn crate::apis::DefaultApi{ self.default_api.as_ref() } diff --git a/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs b/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs index 487e5d3af6..b12bf1e498 100644 --- a/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs +++ b/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,7 +24,7 @@ pub struct DefaultApiClient { impl DefaultApiClient { pub fn new(configuration: Rc) -> DefaultApiClient { DefaultApiClient { - configuration: configuration, + configuration, } } } diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION index 2f81801b79..c3a2c7076f 100644 --- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.1-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/ApiResponse.md b/samples/client/petstore/rust/reqwest/petstore/docs/ApiResponse.md index fe896d1a86..97128a87d9 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/ApiResponse.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/ApiResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **i32** | | [optional] -**_type** | **String** | | [optional] -**message** | **String** | | [optional] +**code** | Option<**i32**> | | [optional] +**_type** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/Category.md b/samples/client/petstore/rust/reqwest/petstore/docs/Category.md index 5890848827..1cf67347c0 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/Category.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/Category.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**name** | **String** | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/Order.md b/samples/client/petstore/rust/reqwest/petstore/docs/Order.md index 6d27453a76..d9a09c3974 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/Order.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/Order.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**pet_id** | **i64** | | [optional] -**quantity** | **i32** | | [optional] -**ship_date** | **String** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **bool** | | [optional] [default to false] +**id** | Option<**i64**> | | [optional] +**pet_id** | Option<**i64**> | | [optional] +**quantity** | Option<**i32**> | | [optional] +**ship_date** | Option<**String**> | | [optional] +**status** | Option<**String**> | Order Status | [optional] +**complete** | Option<**bool**> | | [optional][default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/Pet.md b/samples/client/petstore/rust/reqwest/petstore/docs/Pet.md index 2c8ea36dd9..27886889d1 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/Pet.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/Pet.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**category** | [***crate::models::Category**](Category.md) | | [optional] +**id** | Option<**i64**> | | [optional] +**category** | Option<[**crate::models::Category**](Category.md)> | | [optional] **name** | **String** | | **photo_urls** | **Vec** | | -**tags** | [**Vec**](Tag.md) | | [optional] -**status** | **String** | pet status in the store | [optional] +**tags** | Option<[**Vec**](Tag.md)> | | [optional] +**status** | Option<**String**> | pet status in the store | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md b/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md index b97fb9e156..4716e752b6 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md @@ -25,7 +25,7 @@ Add a new pet to the store Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | Required | +**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | ### Return type @@ -53,8 +53,8 @@ Deletes a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | Pet id to delete | Required | -**api_key** | **String** | | | +**pet_id** | **i64** | Pet id to delete | [required] | +**api_key** | Option<**String**> | | | ### Return type @@ -84,7 +84,7 @@ Multiple status values can be provided with comma separated strings Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**status** | [**Vec**](String.md) | Status values that need to be considered for filter | Required | +**status** | [**Vec**](String.md) | Status values that need to be considered for filter | [required] | ### Return type @@ -114,7 +114,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**tags** | [**Vec**](String.md) | Tags to filter by | Required | +**tags** | [**Vec**](String.md) | Tags to filter by | [required] | ### Return type @@ -144,7 +144,7 @@ Returns a single pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to return | Required | +**pet_id** | **i64** | ID of pet to return | [required] | ### Return type @@ -172,7 +172,7 @@ Update an existing pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | Required | +**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | ### Return type @@ -200,9 +200,9 @@ Updates a pet in the store with form data Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet that needs to be updated | Required | -**name** | **String** | Updated name of the pet | | -**status** | **String** | Updated status of the pet | | +**pet_id** | **i64** | ID of pet that needs to be updated | [required] | +**name** | Option<**String**> | Updated name of the pet | | +**status** | Option<**String**> | Updated status of the pet | | ### Return type @@ -230,9 +230,9 @@ uploads an image Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to update | Required | -**additional_metadata** | **String** | Additional data to pass to server | | -**file** | **std::path::PathBuf** | file to upload | | +**pet_id** | **i64** | ID of pet to update | [required] | +**additional_metadata** | Option<**String**> | Additional data to pass to server | | +**file** | Option<**std::path::PathBuf**> | file to upload | | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md b/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md index 02b0edbdfd..a310b53831 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md @@ -23,7 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **String** | ID of the order that needs to be deleted | Required | +**order_id** | **String** | ID of the order that needs to be deleted | [required] | ### Return type @@ -80,7 +80,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **i64** | ID of pet that needs to be fetched | Required | +**order_id** | **i64** | ID of pet that needs to be fetched | [required] | ### Return type @@ -108,7 +108,7 @@ Place an order for a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Order**](Order.md) | order placed for purchasing the pet | Required | +**body** | [**Order**](Order.md) | order placed for purchasing the pet | [required] | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/Tag.md b/samples/client/petstore/rust/reqwest/petstore/docs/Tag.md index cc377c0ef4..7bf71ab0e9 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/Tag.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/Tag.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**name** | **String** | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/User.md b/samples/client/petstore/rust/reqwest/petstore/docs/User.md index 8f0a63847c..2e6abda42b 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/User.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/User.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**username** | **String** | | [optional] -**first_name** | **String** | | [optional] -**last_name** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**user_status** | **i32** | User Status | [optional] +**id** | Option<**i64**> | | [optional] +**username** | Option<**String**> | | [optional] +**first_name** | Option<**String**> | | [optional] +**last_name** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**password** | Option<**String**> | | [optional] +**phone** | Option<**String**> | | [optional] +**user_status** | Option<**i32**> | User Status | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/UserApi.md b/samples/client/petstore/rust/reqwest/petstore/docs/UserApi.md index afa1d6cd63..a6268f251a 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/UserApi.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/UserApi.md @@ -27,7 +27,7 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**User**](User.md) | Created user object | Required | +**body** | [**User**](User.md) | Created user object | [required] | ### Return type @@ -55,7 +55,7 @@ Creates list of users with given input array Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Vec**](User.md) | List of user object | Required | +**body** | [**Vec**](User.md) | List of user object | [required] | ### Return type @@ -83,7 +83,7 @@ Creates list of users with given input array Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Vec**](User.md) | List of user object | Required | +**body** | [**Vec**](User.md) | List of user object | [required] | ### Return type @@ -113,7 +113,7 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The name that needs to be deleted | Required | +**username** | **String** | The name that needs to be deleted | [required] | ### Return type @@ -141,7 +141,7 @@ Get user by user name Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The name that needs to be fetched. Use user1 for testing. | Required | +**username** | **String** | The name that needs to be fetched. Use user1 for testing. | [required] | ### Return type @@ -169,8 +169,8 @@ Logs user into the system Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The user name for login | Required | -**password** | **String** | The password for login in clear text | Required | +**username** | **String** | The user name for login | [required] | +**password** | **String** | The password for login in clear text | [required] | ### Return type @@ -225,8 +225,8 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | name that need to be deleted | Required | -**body** | [**User**](User.md) | Updated user object | Required | +**username** | **String** | name that need to be deleted | [required] | +**body** | [**User**](User.md) | Updated user object | [required] | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore/git_push.sh b/samples/client/petstore/rust/reqwest/petstore/git_push.sh index 8442b80bb4..ced3be2b0c 100644 --- a/samples/client/petstore/rust/reqwest/petstore/git_push.sh +++ b/samples/client/petstore/rust/reqwest/petstore/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -28,7 +34,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/client.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/client.rs index f231908832..8a3963dcc5 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/client.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/client.rs @@ -3,9 +3,9 @@ use std::rc::Rc; use super::configuration::Configuration; pub struct APIClient { - pet_api: Box, - store_api: Box, - user_api: Box, + pet_api: Box, + store_api: Box, + user_api: Box, } impl APIClient { @@ -19,15 +19,15 @@ impl APIClient { } } - pub fn pet_api(&self) -> &crate::apis::PetApi{ + pub fn pet_api(&self) -> &dyn crate::apis::PetApi{ self.pet_api.as_ref() } - pub fn store_api(&self) -> &crate::apis::StoreApi{ + pub fn store_api(&self) -> &dyn crate::apis::StoreApi{ self.store_api.as_ref() } - pub fn user_api(&self) -> &crate::apis::UserApi{ + pub fn user_api(&self) -> &dyn crate::apis::UserApi{ self.user_api.as_ref() } diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs index 428e75bbea..2412f13002 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,20 +24,20 @@ pub struct PetApiClient { impl PetApiClient { pub fn new(configuration: Rc) -> PetApiClient { PetApiClient { - configuration: configuration, + configuration, } } } pub trait PetApi { fn add_pet(&self, body: crate::models::Pet) -> Result<(), Error>; - fn delete_pet(&self, pet_id: i64, api_key: &str) -> Result<(), Error>; + fn delete_pet(&self, pet_id: i64, api_key: Option<&str>) -> Result<(), Error>; fn find_pets_by_status(&self, status: Vec) -> Result, Error>; fn find_pets_by_tags(&self, tags: Vec) -> Result, Error>; fn get_pet_by_id(&self, pet_id: i64) -> Result; fn update_pet(&self, body: crate::models::Pet) -> Result<(), Error>; - fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Result<(), Error>; - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Result; + fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Result<(), Error>; + fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Result; } impl PetApi for PetApiClient { @@ -61,7 +63,7 @@ impl PetApi for PetApiClient { Ok(()) } - fn delete_pet(&self, pet_id: i64, api_key: &str) -> Result<(), Error> { + fn delete_pet(&self, pet_id: i64, api_key: Option<&str>) -> Result<(), Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -71,7 +73,9 @@ impl PetApi for PetApiClient { if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - req_builder = req_builder.header("api_key", api_key.to_string()); + if let Some(param_value) = api_key { + req_builder = req_builder.header("api_key", param_value.to_string()); + } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; @@ -172,7 +176,7 @@ impl PetApi for PetApiClient { Ok(()) } - fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Result<(), Error> { + fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Result<(), Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -186,8 +190,12 @@ impl PetApi for PetApiClient { req_builder = req_builder.bearer_auth(token.to_owned()); }; let mut form_params = std::collections::HashMap::new(); - form_params.insert("name", name.to_string()); - form_params.insert("status", status.to_string()); + if let Some(param_value) = name { + form_params.insert("name", param_value.to_string()); + } + if let Some(param_value) = status { + form_params.insert("status", param_value.to_string()); + } req_builder = req_builder.form(&form_params); // send request @@ -197,7 +205,7 @@ impl PetApi for PetApiClient { Ok(()) } - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Result { + fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -210,10 +218,14 @@ impl PetApi for PetApiClient { if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - let mut form_params = std::collections::HashMap::new(); - form_params.insert("additionalMetadata", additional_metadata.to_string()); - form_params.insert("file", unimplemented!("File form param not supported with x-www-form-urlencoded content")); - req_builder = req_builder.form(&form_params); + let mut form = reqwest::multipart::Form::new(); + if let Some(param_value) = additional_metadata { + form = form.text("additionalMetadata", param_value.to_string()); + } + if let Some(param_value) = file { + form = form.file("file", param_value)?; + } + req_builder = req_builder.multipart(form); // send request let req = req_builder.build()?; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs index 16b4176562..11b427c47f 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,7 +24,7 @@ pub struct StoreApiClient { impl StoreApiClient { pub fn new(configuration: Rc) -> StoreApiClient { StoreApiClient { - configuration: configuration, + configuration, } } } diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs index 3c82ab1502..f0d39ed235 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,7 +24,7 @@ pub struct UserApiClient { impl UserApiClient { pub fn new(configuration: Rc) -> UserApiClient { UserApiClient { - configuration: configuration, + configuration, } } } diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/api_response.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/api_response.rs index 45395215a3..f1286a5d1c 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/api_response.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/api_response.rs @@ -11,6 +11,7 @@ /// ApiResponse : Describes the result of uploading an image resource + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ApiResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/category.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/category.rs index 1c8763902b..dcd2dc3863 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/category.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/category.rs @@ -11,6 +11,7 @@ /// Category : A category for a pet + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Category { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/mod.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/mod.rs index b4495b6a5f..1baf2f7528 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/mod.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/mod.rs @@ -1,12 +1,12 @@ -mod api_response; +pub mod api_response; pub use self::api_response::ApiResponse; -mod category; +pub mod category; pub use self::category::Category; -mod order; +pub mod order; pub use self::order::Order; -mod pet; +pub mod pet; pub use self::pet::Pet; -mod tag; +pub mod tag; pub use self::tag::Tag; -mod user; +pub mod user; pub use self::user::User; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs index 685e080e31..89cab91e62 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs @@ -11,6 +11,7 @@ /// Order : An order for a pets from the pet store + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Order { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs index 2da297169e..ff8a32fee3 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs @@ -11,6 +11,7 @@ /// Pet : A pet for sale in the pet store + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Pet { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] @@ -34,8 +35,8 @@ impl Pet { Pet { id: None, category: None, - name: name, - photo_urls: photo_urls, + name, + photo_urls, tags: None, status: None, } diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/tag.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/tag.rs index 364143932c..f6bcb5c78d 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/tag.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/tag.rs @@ -11,6 +11,7 @@ /// Tag : A tag for a pet + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Tag { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/user.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/user.rs index b6b9fc78fb..cf863af7b5 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/user.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/user.rs @@ -11,6 +11,7 @@ /// User : A User who is purchasing from the pet store + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct User { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/VERSION index 83a328a922..c3a2c7076f 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/rust-test/docs/TypeTesting.md b/samples/client/petstore/rust/reqwest/rust-test/docs/TypeTesting.md index e84136389e..7b05cee280 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/docs/TypeTesting.md +++ b/samples/client/petstore/rust/reqwest/rust-test/docs/TypeTesting.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**integer** | **i32** | | [optional] -**long** | **i64** | | [optional] -**number** | **f32** | | [optional] -**float** | **f32** | | [optional] -**double** | **f64** | | [optional] -**uuid** | **String** | | [optional] +**integer** | Option<**i32**> | | [optional] +**long** | Option<**i64**> | | [optional] +**number** | Option<**f32**> | | [optional] +**float** | Option<**f32**> | | [optional] +**double** | Option<**f64**> | | [optional] +**uuid** | Option<**String**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/reqwest/rust-test/git_push.sh b/samples/client/petstore/rust/reqwest/rust-test/git_push.sh index 8442b80bb4..ced3be2b0c 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/git_push.sh +++ b/samples/client/petstore/rust/reqwest/rust-test/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -28,7 +34,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/rust/reqwest/rust-test/src/apis/client.rs b/samples/client/petstore/rust/reqwest/rust-test/src/apis/client.rs index 2f76997d31..7566e9e847 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/src/apis/client.rs +++ b/samples/client/petstore/rust/reqwest/rust-test/src/apis/client.rs @@ -3,7 +3,7 @@ use std::rc::Rc; use super::configuration::Configuration; pub struct APIClient { - default_api: Box, + default_api: Box, } impl APIClient { @@ -15,7 +15,7 @@ impl APIClient { } } - pub fn default_api(&self) -> &crate::apis::DefaultApi{ + pub fn default_api(&self) -> &dyn crate::apis::DefaultApi{ self.default_api.as_ref() } diff --git a/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs b/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs index 9404fefb7d..f154a6998c 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs +++ b/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,7 +24,7 @@ pub struct DefaultApiClient { impl DefaultApiClient { pub fn new(configuration: Rc) -> DefaultApiClient { DefaultApiClient { - configuration: configuration, + configuration, } } } diff --git a/samples/client/petstore/rust/reqwest/rust-test/src/models/mod.rs b/samples/client/petstore/rust/reqwest/rust-test/src/models/mod.rs index 8762207b5b..97887b5798 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/src/models/mod.rs +++ b/samples/client/petstore/rust/reqwest/rust-test/src/models/mod.rs @@ -1,2 +1,2 @@ -mod type_testing; +pub mod type_testing; pub use self::type_testing::TypeTesting; diff --git a/samples/client/petstore/rust/reqwest/rust-test/src/models/type_testing.rs b/samples/client/petstore/rust/reqwest/rust-test/src/models/type_testing.rs index abd6582cc6..57188e8ee7 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/src/models/type_testing.rs +++ b/samples/client/petstore/rust/reqwest/rust-test/src/models/type_testing.rs @@ -11,6 +11,7 @@ /// TypeTesting : Test handling of differing types (see \\#3463) + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TypeTesting { #[serde(rename = "integer", skip_serializing_if = "Option::is_none")] diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index 3d4ced41f5..b5d44c028e 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -292,7 +292,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -525,7 +525,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1126,7 +1126,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Order" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1342,7 +1342,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1380,7 +1380,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1418,7 +1418,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1608,7 +1608,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts index 3d4ced41f5..b5d44c028e 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -292,7 +292,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -525,7 +525,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1126,7 +1126,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Order" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1342,7 +1342,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1380,7 +1380,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1418,7 +1418,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1608,7 +1608,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts index 7658f36165..e4e2a763dc 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts @@ -341,7 +341,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof pet !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(pet !== undefined ? pet : {}) : (pet || ""); return { @@ -574,7 +574,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof pet !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(pet !== undefined ? pet : {}) : (pet || ""); return { @@ -1181,7 +1181,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Order" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof order !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(order !== undefined ? order : {}) : (order || ""); return { @@ -1397,7 +1397,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof user !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(user !== undefined ? user : {}) : (user || ""); return { @@ -1435,7 +1435,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof user !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(user !== undefined ? user : {}) : (user || ""); return { @@ -1473,7 +1473,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof user !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(user !== undefined ? user : {}) : (user || ""); return { @@ -1663,7 +1663,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof user !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(user !== undefined ? user : {}) : (user || ""); return { diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts index a6acb17b1c..691bb79fb6 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -292,7 +292,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -525,7 +525,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1219,7 +1219,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Order" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1482,7 +1482,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1520,7 +1520,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1558,7 +1558,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1748,7 +1748,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts index a2d92d88e1..70d3de8c01 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts @@ -67,7 +67,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts index 4ba4f4c122..af5fe4057e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts @@ -164,7 +164,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Order" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts index a0122ec110..f2a432b5d1 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts @@ -57,7 +57,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -95,7 +95,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -133,7 +133,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -323,7 +323,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts index 3d4ced41f5..b5d44c028e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts @@ -292,7 +292,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -525,7 +525,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Pet" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1126,7 +1126,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Order" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1342,7 +1342,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1380,7 +1380,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1418,7 +1418,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("Array<User>" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { @@ -1608,7 +1608,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - const needsSerialization = ("User" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { diff --git a/samples/client/petstore/typescript-fetch/builds/default/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/default/src/apis/PetApi.ts index 1b59ed3ef0..b0d3563297 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/src/apis/PetApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/default/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/default/src/apis/StoreApi.ts index 4b645dea98..6a05a366c1 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/src/apis/StoreApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/default/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/default/src/apis/UserApi.ts index 52d6f3d2e3..48114f3305 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/src/apis/UserApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/default/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/default/src/models/Category.ts index 7e3076d412..936e0db238 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/src/models/Category.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/default/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/default/src/models/ModelApiResponse.ts index c89b98fc62..b897a9a572 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/src/models/ModelApiResponse.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/default/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/default/src/models/Order.ts index da4ad33711..cae61335b7 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/src/models/Order.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/default/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/default/src/models/Pet.ts index 8f921c6b15..ecd7e174a2 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/src/models/Pet.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/default/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/default/src/models/Tag.ts index 5ea1fd63e8..efe3bb7087 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/src/models/Tag.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/default/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/default/src/models/User.ts index 302960bfef..cfe1263dc6 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/src/models/User.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/default/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/src/runtime.ts index 473d2e7231..5a21387c25 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/src/runtime.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -60,7 +61,7 @@ export class BaseAPI { // do not handle correctly sometimes. url += '?' + this.configuration.queryParamsStringify(context.query); } - const body = (context.body instanceof FormData || isBlob(context.body)) + const body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body)) ? context.body : JSON.stringify(context.body); diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts index 1b59ed3ef0..b0d3563297 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts index 4b645dea98..6a05a366c1 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts index 52d6f3d2e3..48114f3305 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts index 7e3076d412..936e0db238 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts index c89b98fc62..b897a9a572 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts index da4ad33711..cae61335b7 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts index 8f921c6b15..ecd7e174a2 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts index 5ea1fd63e8..efe3bb7087 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts index 302960bfef..cfe1263dc6 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts index 473d2e7231..5a21387c25 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -60,7 +61,7 @@ export class BaseAPI { // do not handle correctly sometimes. url += '?' + this.configuration.queryParamsStringify(context.query); } - const body = (context.body instanceof FormData || isBlob(context.body)) + const body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body)) ? context.body : JSON.stringify(context.body); diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/PetApi.ts index 28a239690b..02971f4df7 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/PetApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/StoreApi.ts index e8635189f6..21bd734d4a 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/StoreApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/UserApi.ts index 008d458aca..aeb81e01e2 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/UserApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Category.ts index 7e3076d412..936e0db238 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Category.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/ModelApiResponse.ts index c89b98fc62..b897a9a572 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/ModelApiResponse.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Order.ts index da4ad33711..cae61335b7 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Order.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Pet.ts index 8f921c6b15..ecd7e174a2 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Pet.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Tag.ts index 5ea1fd63e8..efe3bb7087 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/Tag.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/User.ts index 302960bfef..cfe1263dc6 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/models/User.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/runtime.ts index 473d2e7231..5a21387c25 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/runtime.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -60,7 +61,7 @@ export class BaseAPI { // do not handle correctly sometimes. url += '?' + this.configuration.queryParamsStringify(context.query); } - const body = (context.body instanceof FormData || isBlob(context.body)) + const body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body)) ? context.body : JSON.stringify(context.body); diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts index 3bd5d9cf41..5c45e3bb33 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts index cfe73a1da6..e119ddf0a3 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts index 7738fe82ea..96b0eb672d 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts index 7e3076d412..936e0db238 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts index c89b98fc62..b897a9a572 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts index da4ad33711..cae61335b7 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts index 8f921c6b15..ecd7e174a2 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts index 5ea1fd63e8..efe3bb7087 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts index 302960bfef..cfe1263dc6 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts index 473d2e7231..5a21387c25 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -60,7 +61,7 @@ export class BaseAPI { // do not handle correctly sometimes. url += '?' + this.configuration.queryParamsStringify(context.query); } - const body = (context.body instanceof FormData || isBlob(context.body)) + const body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body)) ? context.body : JSON.stringify(context.body); diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/PetApi.ts index 1b59ed3ef0..b0d3563297 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/PetApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/StoreApi.ts index 4b645dea98..6a05a366c1 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/StoreApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/UserApi.ts index 52d6f3d2e3..48114f3305 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/UserApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Category.ts index 7e3076d412..936e0db238 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Category.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/ModelApiResponse.ts index c89b98fc62..b897a9a572 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/ModelApiResponse.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Order.ts index da4ad33711..cae61335b7 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Order.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Pet.ts index 8f921c6b15..ecd7e174a2 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Pet.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Tag.ts index 5ea1fd63e8..efe3bb7087 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Tag.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/User.ts index 302960bfef..cfe1263dc6 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/User.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts index aa2ef61589..20e0671824 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -60,7 +61,7 @@ export class BaseAPI { // do not handle correctly sometimes. url += '?' + this.configuration.queryParamsStringify(context.query); } - const body = (context.body instanceof FormData || isBlob(context.body)) + const body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body)) ? context.body : JSON.stringify(context.body); diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/PetApi.ts index 1b59ed3ef0..b0d3563297 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/PetApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/StoreApi.ts index 4b645dea98..6a05a366c1 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/StoreApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/UserApi.ts index 52d6f3d2e3..48114f3305 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/UserApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Category.ts index 7e3076d412..936e0db238 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Category.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/ModelApiResponse.ts index c89b98fc62..b897a9a572 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/ModelApiResponse.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Order.ts index da4ad33711..cae61335b7 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Order.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Pet.ts index 8f921c6b15..ecd7e174a2 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Pet.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Tag.ts index 5ea1fd63e8..efe3bb7087 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/Tag.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/User.ts index 302960bfef..cfe1263dc6 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/User.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/runtime.ts index 473d2e7231..5a21387c25 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/src/runtime.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -60,7 +61,7 @@ export class BaseAPI { // do not handle correctly sometimes. url += '?' + this.configuration.queryParamsStringify(context.query); } - const body = (context.body instanceof FormData || isBlob(context.body)) + const body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body)) ? context.body : JSON.stringify(context.body); diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts index 1b59ed3ef0..b0d3563297 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts index 4b645dea98..6a05a366c1 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts index 52d6f3d2e3..48114f3305 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts index 7e3076d412..936e0db238 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts index c89b98fc62..b897a9a572 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts index da4ad33711..cae61335b7 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts index 8f921c6b15..ecd7e174a2 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts index 5ea1fd63e8..efe3bb7087 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts index 302960bfef..cfe1263dc6 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts index 473d2e7231..5a21387c25 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts @@ -1,4 +1,5 @@ // tslint:disable +// eslint-disable /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -60,7 +61,7 @@ export class BaseAPI { // do not handle correctly sometimes. url += '?' + this.configuration.queryParamsStringify(context.query); } - const body = (context.body instanceof FormData || isBlob(context.body)) + const body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body)) ? context.body : JSON.stringify(context.body); diff --git a/samples/client/petstore/typescript-fetch/tests/default/mocks.ts b/samples/client/petstore/typescript-fetch/tests/default/mocks.ts index c140489d8f..9a3a3494ff 100644 --- a/samples/client/petstore/typescript-fetch/tests/default/mocks.ts +++ b/samples/client/petstore/typescript-fetch/tests/default/mocks.ts @@ -1,5 +1,7 @@ import * as FormData from 'form-data'; +import { URLSearchParams } from 'url'; const globals = global as any; globals.FormData = FormData; +globals.URLSearchParams = URLSearchParams; diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts index a5328a8c72..16c0d11636 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts @@ -123,7 +123,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), }; @@ -151,7 +151,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts index 2194fdfe9f..ed3aaa8e37 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts @@ -139,7 +139,7 @@ export class UserApi extends BaseAPI { throwIfRequired(requestParameters, 'username', 'loginUser'); throwIfRequired(requestParameters, 'password', 'loginUser'); - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.username && { 'username': requestParameters.username }), ...(requestParameters.password && { 'password': requestParameters.password }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts index a5328a8c72..16c0d11636 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts @@ -123,7 +123,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), }; @@ -151,7 +151,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts index 2194fdfe9f..ed3aaa8e37 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts @@ -139,7 +139,7 @@ export class UserApi extends BaseAPI { throwIfRequired(requestParameters, 'username', 'loginUser'); throwIfRequired(requestParameters, 'password', 'loginUser'); - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.username && { 'username': requestParameters.username }), ...(requestParameters.password && { 'password': requestParameters.password }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts index a5328a8c72..16c0d11636 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts @@ -123,7 +123,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), }; @@ -151,7 +151,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts index 2194fdfe9f..ed3aaa8e37 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts @@ -139,7 +139,7 @@ export class UserApi extends BaseAPI { throwIfRequired(requestParameters, 'username', 'loginUser'); throwIfRequired(requestParameters, 'password', 'loginUser'); - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.username && { 'username': requestParameters.username }), ...(requestParameters.password && { 'password': requestParameters.password }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts index a5328a8c72..16c0d11636 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts @@ -123,7 +123,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), }; @@ -151,7 +151,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts index 2194fdfe9f..ed3aaa8e37 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts @@ -139,7 +139,7 @@ export class UserApi extends BaseAPI { throwIfRequired(requestParameters, 'username', 'loginUser'); throwIfRequired(requestParameters, 'password', 'loginUser'); - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.username && { 'username': requestParameters.username }), ...(requestParameters.password && { 'password': requestParameters.password }), }; diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/.gitignore b/samples/openapi3/client/petstore/go-experimental/go-petstore/.gitignore new file mode 100644 index 0000000000..daf913b1b3 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator-ignore b/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION b/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION new file mode 100644 index 0000000000..c3a2c7076f --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/.travis.yml b/samples/openapi3/client/petstore/go-experimental/go-petstore/.travis.yml new file mode 100644 index 0000000000..f5cb2ce9a5 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md new file mode 100644 index 0000000000..f78b00bdb8 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md @@ -0,0 +1,229 @@ +# Go API client for openapi + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.GoClientExperimentalCodegen + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/oauth2 +go get golang.org/x/net/context +go get github.com/antihax/optional +``` + +Put the package under your project folder and add the following in import: + +```golang +import sw "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags +*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **Get** /foo | +*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **Get** /fake/health | Health check endpoint +*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | +*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | +*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number | +*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string | +*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | +*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | +*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters +*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | +*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case +*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store +*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet +*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status +*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags +*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID +*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet +*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status +*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID +*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet +*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /user | Create user +*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array +*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /user/{username} | Delete user +*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **Get** /user/{username} | Get user by user name +*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **Get** /user/login | Logs user into the system +*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session +*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Put** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Foo](docs/Foo.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [HealthCheckResult](docs/HealthCheckResult.md) + - [InlineObject](docs/InlineObject.md) + - [InlineObject1](docs/InlineObject1.md) + - [InlineObject2](docs/InlineObject2.md) + - [InlineObject3](docs/InlineObject3.md) + - [InlineObject4](docs/InlineObject4.md) + - [InlineObject5](docs/InlineObject5.md) + - [InlineResponseDefault](docs/InlineResponseDefault.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NullableClass](docs/NullableClass.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [OuterEnumInteger](docs/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [Tag](docs/Tag.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: api_key and passed in as the auth context for each request. + + +### api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: api_key_query and passed in as the auth context for each request. + + +### bearer_test + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +### http_basic_test + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +### petstore_auth + + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING") +r, err := client.Service.Operation(auth, args) +``` + +Or via OAuth2 module to automatically refresh tokens and perform user authentication. + +```golang +import "golang.org/x/oauth2" + +/* Perform OAuth2 round trip request and obtain a token */ + +tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) +auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) +r, err := client.Service.Operation(auth, args) +``` + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml new file mode 100644 index 0000000000..c5e930efc5 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -0,0 +1,2059 @@ +openapi: 3.0.0 +info: + description: 'This spec is mainly for testing Petstore server and contains fake + endpoints, models. Please do not use this for any other purpose. Special characters: + " \' + license: + name: Apache-2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +servers: +- description: petstore server + url: http://{server}.swagger.io:{port}/v2 + variables: + server: + default: petstore + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" +- description: The local server + url: https://localhost:8080/{version} + variables: + version: + default: v2 + enum: + - v1 + - v2 +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /foo: + get: + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_default' + description: response + /pet: + post: + operationId: addPet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + 405: + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + put: + operationId: updatePet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + 400: + description: Invalid ID supplied + 404: + description: Pet not found + 405: + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + servers: + - url: http://petstore.swagger.io/v2 + - url: http://path-server-test.petstore.local/v2 + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + 200: + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + 400: + description: Invalid status value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by status + tags: + - pet + /pet/findByTags: + get: + deprecated: true + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + style: form + responses: + 200: + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + 400: + description: Invalid tag value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by tags + tags: + - pet + /pet/{petId}: + delete: + operationId: deletePet + parameters: + - explode: false + in: header + name: api_key + required: false + schema: + type: string + style: simple + - description: Pet id to delete + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + 400: + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + get: + description: Returns a single pet + operationId: getPetById + parameters: + - description: ID of pet to return + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + 200: + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + 400: + description: Invalid ID supplied + 404: + description: Pet not found + security: + - api_key: [] + summary: Find pet by ID + tags: + - pet + post: + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + $ref: '#/components/requestBodies/inline_object' + content: + application/x-www-form-urlencoded: + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + responses: + 405: + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Updates a pet in the store with form data + tags: + - pet + /pet/{petId}/uploadImage: + post: + operationId: uploadFile + parameters: + - description: ID of pet to update + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + $ref: '#/components/requestBodies/inline_object_1' + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + /store/inventory: + get: + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + 200: + content: + application/json: + schema: + additionalProperties: + format: int32 + type: integer + type: object + description: successful operation + security: + - api_key: [] + summary: Returns pet inventories by status + tags: + - store + /store/order: + post: + operationId: placeOrder + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + 200: + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + 400: + description: Invalid Order + summary: Place an order for a pet + tags: + - store + /store/order/{order_id}: + delete: + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + explode: false + in: path + name: order_id + required: true + schema: + type: string + style: simple + responses: + 400: + description: Invalid ID supplied + 404: + description: Order not found + summary: Delete purchase order by ID + tags: + - store + get: + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions + operationId: getOrderById + parameters: + - description: ID of pet that needs to be fetched + explode: false + in: path + name: order_id + required: true + schema: + format: int64 + maximum: 5 + minimum: 1 + type: integer + style: simple + responses: + 200: + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + 400: + description: Invalid ID supplied + 404: + description: Order not found + summary: Find purchase order by ID + tags: + - store + /user: + post: + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + responses: + default: + description: successful operation + summary: Create user + tags: + - user + /user/createWithArray: + post: + operationId: createUsersWithArrayInput + requestBody: + $ref: '#/components/requestBodies/UserArray' + responses: + default: + description: successful operation + summary: Creates list of users with given input array + tags: + - user + /user/createWithList: + post: + operationId: createUsersWithListInput + requestBody: + $ref: '#/components/requestBodies/UserArray' + responses: + default: + description: successful operation + summary: Creates list of users with given input array + tags: + - user + /user/login: + get: + operationId: loginUser + parameters: + - description: The user name for login + explode: true + in: query + name: username + required: true + schema: + type: string + style: form + - description: The password for login in clear text + explode: true + in: query + name: password + required: true + schema: + type: string + style: form + responses: + 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + explode: false + schema: + format: int32 + type: integer + style: simple + X-Expires-After: + description: date in UTC when token expires + explode: false + schema: + format: date-time + type: string + style: simple + 400: + description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user + /user/logout: + get: + operationId: logoutUser + responses: + default: + description: successful operation + summary: Logs out current logged in user session + tags: + - user + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + 400: + description: Invalid username supplied + 404: + description: User not found + summary: Delete user + tags: + - user + get: + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + 200: + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + description: successful operation + 400: + description: Invalid username supplied + 404: + description: User not found + summary: Get user by user name + tags: + - user + put: + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - description: name that need to be deleted + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + responses: + 400: + description: Invalid user supplied + 404: + description: User not found + summary: Updated user + tags: + - user + /fake_classname_test: + patch: + description: To test class name in snake case + operationId: testClassname + requestBody: + $ref: '#/components/requestBodies/Client' + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + security: + - api_key_query: [] + summary: To test class name in snake case + tags: + - fake_classname_tags 123#$%^ + /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: Required String in group parameters + explode: true + in: query + name: required_string_group + required: true + schema: + type: integer + style: form + - description: Required Boolean in group parameters + explode: false + in: header + name: required_boolean_group + required: true + schema: + type: boolean + style: simple + - description: Required Integer in group parameters + explode: true + in: query + name: required_int64_group + required: true + schema: + format: int64 + type: integer + style: form + - description: String in group parameters + explode: true + in: query + name: string_group + required: false + schema: + type: integer + style: form + - description: Boolean in group parameters + explode: false + in: header + name: boolean_group + required: false + schema: + type: boolean + style: simple + - description: Integer in group parameters + explode: true + in: query + name: int64_group + required: false + schema: + format: int64 + type: integer + style: form + responses: + 400: + description: Someting wrong + security: + - bearer_test: [] + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true + get: + description: To test enum parameters + operationId: testEnumParameters + parameters: + - description: Header parameter enum test (string array) + explode: false + in: header + name: enum_header_string_array + required: false + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: simple + - description: Header parameter enum test (string) + explode: false + in: header + name: enum_header_string + required: false + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + style: simple + - description: Query parameter enum test (string array) + explode: true + in: query + name: enum_query_string_array + required: false + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: form + - description: Query parameter enum test (string) + explode: true + in: query + name: enum_query_string + required: false + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + style: form + - description: Query parameter enum test (double) + explode: true + in: query + name: enum_query_integer + required: false + schema: + enum: + - 1 + - -2 + format: int32 + type: integer + style: form + - description: Query parameter enum test (double) + explode: true + in: query + name: enum_query_double + required: false + schema: + enum: + - 1.1 + - -1.2 + format: double + type: number + style: form + requestBody: + $ref: '#/components/requestBodies/inline_object_2' + content: + application/x-www-form-urlencoded: + schema: + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + type: string + type: object + responses: + 400: + description: Invalid request + 404: + description: Not found + summary: To test enum parameters + tags: + - fake + patch: + description: To test "client" model + operationId: testClientModel + requestBody: + $ref: '#/components/requestBodies/Client' + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test "client" model + tags: + - fake + post: + description: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + requestBody: + $ref: '#/components/requestBodies/inline_object_3' + content: + application/x-www-form-urlencoded: + schema: + properties: + integer: + description: None + maximum: 100 + minimum: 10 + type: integer + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + type: object + responses: + 400: + description: Invalid username supplied + 404: + description: User not found + security: + - http_basic_test: [] + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + tags: + - fake + /fake/outer/number: + post: + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + responses: + 200: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Output number + tags: + - fake + /fake/outer/string: + post: + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + responses: + 200: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Output string + tags: + - fake + /fake/outer/boolean: + post: + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + responses: + 200: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Output boolean + tags: + - fake + /fake/outer/composite: + post: + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + responses: + 200: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Output composite + tags: + - fake + /fake/jsonFormData: + get: + operationId: testJsonFormData + requestBody: + $ref: '#/components/requestBodies/inline_object_4' + content: + application/x-www-form-urlencoded: + schema: + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + type: object + responses: + 200: + description: successful operation + summary: test json serialization of form data + tags: + - fake + /fake/inline-additionalProperties: + post: + operationId: testInlineAdditionalProperties + requestBody: + content: + application/json: + schema: + additionalProperties: + type: string + type: object + description: request body + required: true + responses: + 200: + description: successful operation + summary: test inline additionalProperties + tags: + - fake + /fake/body-with-query-params: + put: + operationId: testBodyWithQueryParams + parameters: + - explode: true + in: query + name: query + required: true + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + responses: + 200: + description: Success + tags: + - fake + /another-fake/dummy: + patch: + description: To test special tags and operation ID starting with number + operationId: 123_test_@#$%_special_tags + requestBody: + $ref: '#/components/requestBodies/Client' + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test special tags + tags: + - $another-fake? + /fake/body-with-file-schema: + put: + description: For this test, the body for this request much reference a schema + named `File`. + operationId: testBodyWithFileSchema + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + responses: + 200: + description: Success + tags: + - fake + /fake/test-query-paramters: + put: + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - explode: true + in: query + name: pipe + required: true + schema: + items: + type: string + type: array + style: form + - explode: false + in: query + name: ioutil + required: true + schema: + items: + type: string + type: array + style: form + - explode: false + in: query + name: http + required: true + schema: + items: + type: string + type: array + style: spaceDelimited + - explode: false + in: query + name: url + required: true + schema: + items: + type: string + type: array + style: form + - explode: true + in: query + name: context + required: true + schema: + items: + type: string + type: array + style: form + responses: + 200: + description: Success + tags: + - fake + /fake/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + $ref: '#/components/requestBodies/inline_object_5' + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + format: binary + type: string + required: + - requiredFile + type: object + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image (required) + tags: + - pet + /fake/health: + get: + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + description: The instance started successfully + summary: Health check endpoint + tags: + - fake +components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + inline_object: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object' + inline_object_1: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_1' + inline_object_2: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object_2' + inline_object_3: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object_3' + inline_object_4: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object_4' + inline_object_5: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_5' + schemas: + Foo: + example: + bar: bar + properties: + bar: + default: bar + type: string + type: object + Bar: + default: bar + type: string + Order: + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + type: object + xml: + name: Order + Category: + example: + name: default-name + id: 6 + properties: + id: + format: int64 + type: integer + name: + default: default-name + type: string + required: + - name + type: object + xml: + name: Category + User: + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + type: object + xml: + name: User + Tag: + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: Tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: default-name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: Pet + ApiResponse: + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + type: object + Return: + description: Model for testing reserved words + properties: + return: + format: int32 + type: integer + xml: + name: Return + Name: + description: Model for testing model name same as property name + properties: + name: + format: int32 + type: integer + snake_case: + format: int32 + readOnly: true + type: integer + property: + type: string + 123Number: + readOnly: true + type: integer + required: + - name + xml: + name: Name + 200_response: + description: Model for testing model name starting with number + properties: + name: + format: int32 + type: integer + class: + type: string + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Dog_allOf' + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Cat_allOf' + Animal: + discriminator: + propertyName: className + properties: + className: + type: string + color: + default: red + type: string + required: + - className + type: object + AnimalFarm: + items: + $ref: '#/components/schemas/Animal' + type: array + format_test: + properties: + integer: + maximum: 100 + minimum: 10 + type: integer + int32: + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + format: int64 + type: integer + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + format: float + maximum: 987.6 + minimum: 54.3 + type: number + double: + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + pattern: /[a-z]/i + type: string + byte: + format: byte + type: string + binary: + format: binary + type: string + date: + format: date + type: string + dateTime: + format: date-time + type: string + uuid: + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + format: uuid + type: string + password: + format: password + maxLength: 64 + minLength: 10 + type: string + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + pattern: ^\d{10}$ + type: string + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. + pattern: /^image_\d{1,3}$/i + type: string + required: + - byte + - date + - number + - password + type: object + EnumClass: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + Enum_Test: + properties: + enum_string: + enum: + - UPPER + - lower + - "" + type: string + enum_string_required: + enum: + - UPPER + - lower + - "" + type: string + enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer + enum_number: + enum: + - 1.1 + - -1.2 + format: double + type: number + outerEnum: + $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' + required: + - enum_string_required + type: object + AdditionalPropertiesClass: + properties: + map_property: + additionalProperties: + type: string + type: object + map_of_map_property: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + type: object + MixedPropertiesAndAdditionalPropertiesClass: + properties: + uuid: + format: uuid + type: string + dateTime: + format: date-time + type: string + map: + additionalProperties: + $ref: '#/components/schemas/Animal' + type: object + type: object + List: + properties: + 123-list: + type: string + type: object + Client: + example: + client: client + properties: + client: + type: string + type: object + ReadOnlyFirst: + properties: + bar: + readOnly: true + type: string + baz: + type: string + type: object + hasOnlyReadOnly: + properties: + bar: + readOnly: true + type: string + foo: + readOnly: true + type: string + type: object + Capitalization: + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet + type: string + type: object + MapTest: + properties: + map_map_of_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_of_enum_string: + additionalProperties: + enum: + - UPPER + - lower + type: string + type: object + direct_map: + additionalProperties: + type: boolean + type: object + indirect_map: + additionalProperties: + type: boolean + type: object + type: object + ArrayTest: + properties: + array_of_string: + items: + type: string + type: array + array_array_of_integer: + items: + items: + format: int64 + type: integer + type: array + type: array + array_array_of_model: + items: + items: + $ref: '#/components/schemas/ReadOnlyFirst' + type: array + type: array + type: object + NumberOnly: + properties: + JustNumber: + type: number + type: object + ArrayOfNumberOnly: + properties: + ArrayNumber: + items: + type: number + type: array + type: object + ArrayOfArrayOfNumberOnly: + properties: + ArrayArrayNumber: + items: + items: + type: number + type: array + type: array + type: object + EnumArrays: + properties: + just_symbol: + enum: + - '>=' + - $ + type: string + array_enum: + items: + enum: + - fish + - crab + type: string + type: array + type: object + OuterEnum: + enum: + - placed + - approved + - delivered + nullable: true + type: string + OuterEnumInteger: + enum: + - 0 + - 1 + - 2 + type: integer + OuterEnumDefaultValue: + default: placed + enum: + - placed + - approved + - delivered + type: string + OuterEnumIntegerDefaultValue: + default: 0 + enum: + - 0 + - 1 + - 2 + type: integer + OuterComposite: + example: + my_string: my_string + my_number: 0.8008281904610115 + my_boolean: true + properties: + my_number: + type: number + my_string: + type: string + my_boolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + type: object + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + type: object + FileSchemaTestClass: + example: + file: + sourceURI: sourceURI + files: + - sourceURI: sourceURI + - sourceURI: sourceURI + properties: + file: + $ref: '#/components/schemas/File' + files: + items: + $ref: '#/components/schemas/File' + type: array + type: object + File: + description: Must be named `File` for test. + example: + sourceURI: sourceURI + properties: + sourceURI: + description: Test capitalization + type: string + type: object + _special_model.name_: + properties: + $special[property.name]: + format: int64 + type: integer + xml: + name: $special[model.name] + HealthCheckResult: + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. + example: + NullableMessage: NullableMessage + properties: + NullableMessage: + nullable: true + type: string + type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object + inline_response_default: + example: + string: + bar: bar + properties: + string: + $ref: '#/components/schemas/Foo' + inline_object: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + inline_object_1: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object + inline_object_2: + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + type: string + type: object + inline_object_3: + properties: + integer: + description: None + maximum: 100 + minimum: 10 + type: integer + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + type: object + inline_object_4: + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + type: object + inline_object_5: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + format: binary + type: string + required: + - requiredFile + type: object + Dog_allOf: + properties: + breed: + type: string + Cat_allOf: + properties: + declawed: + type: boolean + securitySchemes: + petstore_auth: + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + type: oauth2 + api_key: + in: header + name: api_key + type: apiKey + api_key_query: + in: query + name: api_key_query + type: apiKey + http_basic_test: + scheme: basic + type: http + bearer_test: + bearerFormat: JWT + scheme: bearer + type: http diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go new file mode 100644 index 0000000000..acc143f53a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go @@ -0,0 +1,113 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" +) + +// Linger please +var ( + _ _context.Context +) + +// AnotherFakeApiService AnotherFakeApi service +type AnotherFakeApiService service + +/* +Call123TestSpecialTags To test special tags +To test special tags and operation ID starting with number + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param client client model +@return Client +*/ +func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Client + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/another-fake/dummy" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = &client + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v Client + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go new file mode 100644 index 0000000000..6dfb9613df --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go @@ -0,0 +1,107 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" +) + +// Linger please +var ( + _ _context.Context +) + +// DefaultApiService DefaultApi service +type DefaultApiService service + +/* +FooGet Method for FooGet + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@return InlineResponseDefault +*/ +func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponseDefault + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/foo" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v InlineResponseDefault + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go new file mode 100644 index 0000000000..53964c30b0 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go @@ -0,0 +1,1316 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "github.com/antihax/optional" + "os" + "reflect" +) + +// Linger please +var ( + _ _context.Context +) + +// FakeApiService FakeApi service +type FakeApiService service + +/* +FakeHealthGet Health check endpoint + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@return HealthCheckResult +*/ +func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue HealthCheckResult + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/health" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v HealthCheckResult + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// FakeOuterBooleanSerializeOpts Optional parameters for the method 'FakeOuterBooleanSerialize' +type FakeOuterBooleanSerializeOpts struct { + Body optional.Bool +} + +/* +FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize +Test serialization of outer boolean types + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *FakeOuterBooleanSerializeOpts - Optional Parameters: + * @param "Body" (optional.Bool) - Input boolean as post body +@return bool +*/ +func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue bool + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/outer/boolean" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + if localVarOptionals != nil && localVarOptionals.Body.IsSet() { + localVarPostBody = localVarOptionals.Body.Value() + } + + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v bool + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// FakeOuterCompositeSerializeOpts Optional parameters for the method 'FakeOuterCompositeSerialize' +type FakeOuterCompositeSerializeOpts struct { + OuterComposite optional.Interface +} + +/* +FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize +Test serialization of object with outer number type + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *FakeOuterCompositeSerializeOpts - Optional Parameters: + * @param "OuterComposite" (optional.Interface of OuterComposite) - Input composite as post body +@return OuterComposite +*/ +func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue OuterComposite + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/outer/composite" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + if localVarOptionals != nil && localVarOptionals.OuterComposite.IsSet() { + localVarOptionalOuterComposite, localVarOptionalOuterCompositeok := localVarOptionals.OuterComposite.Value().(OuterComposite) + if !localVarOptionalOuterCompositeok { + return localVarReturnValue, nil, reportError("outerComposite should be OuterComposite") + } + localVarPostBody = &localVarOptionalOuterComposite + } + + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v OuterComposite + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// FakeOuterNumberSerializeOpts Optional parameters for the method 'FakeOuterNumberSerialize' +type FakeOuterNumberSerializeOpts struct { + Body optional.Float32 +} + +/* +FakeOuterNumberSerialize Method for FakeOuterNumberSerialize +Test serialization of outer number types + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *FakeOuterNumberSerializeOpts - Optional Parameters: + * @param "Body" (optional.Float32) - Input number as post body +@return float32 +*/ +func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue float32 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/outer/number" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + if localVarOptionals != nil && localVarOptionals.Body.IsSet() { + localVarPostBody = localVarOptionals.Body.Value() + } + + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v float32 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// FakeOuterStringSerializeOpts Optional parameters for the method 'FakeOuterStringSerialize' +type FakeOuterStringSerializeOpts struct { + Body optional.String +} + +/* +FakeOuterStringSerialize Method for FakeOuterStringSerialize +Test serialization of outer string types + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *FakeOuterStringSerializeOpts - Optional Parameters: + * @param "Body" (optional.String) - Input string as post body +@return string +*/ +func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/outer/string" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + if localVarOptionals != nil && localVarOptionals.Body.IsSet() { + localVarPostBody = localVarOptionals.Body.Value() + } + + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +/* +TestBodyWithFileSchema Method for TestBodyWithFileSchema +For this test, the body for this request much reference a schema named `File`. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param fileSchemaTestClass +*/ +func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, fileSchemaTestClass FileSchemaTestClass) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/body-with-file-schema" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = &fileSchemaTestClass + 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 +} + +/* +TestBodyWithQueryParams Method for TestBodyWithQueryParams + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param query + * @param user +*/ +func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, user User) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/body-with-query-params" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + localVarQueryParams.Add("query", parameterToString(query, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = &user + 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 +} + +/* +TestClientModel To test \"client\" model +To test \"client\" model + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param client client model +@return Client +*/ +func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Client + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = &client + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v Client + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// TestEndpointParametersOpts Optional parameters for the method 'TestEndpointParameters' +type TestEndpointParametersOpts struct { + Integer optional.Int32 + Int32_ optional.Int32 + Int64_ optional.Int64 + Float optional.Float32 + String_ optional.String + Binary optional.Interface + Date optional.String + DateTime optional.Time + Password optional.String + Callback optional.String +} + +/* +TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param number None + * @param double None + * @param patternWithoutDelimiter None + * @param byte_ None + * @param optional nil or *TestEndpointParametersOpts - Optional Parameters: + * @param "Integer" (optional.Int32) - None + * @param "Int32_" (optional.Int32) - None + * @param "Int64_" (optional.Int64) - None + * @param "Float" (optional.Float32) - None + * @param "String_" (optional.String) - None + * @param "Binary" (optional.Interface of *os.File) - None + * @param "Date" (optional.String) - None + * @param "DateTime" (optional.Time) - None + * @param "Password" (optional.String) - None + * @param "Callback" (optional.String) - None +*/ +func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + 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 := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if number < 32.1 { + return nil, reportError("number must be greater than 32.1") + } + if number > 543.2 { + return nil, reportError("number must be less than 543.2") + } + if double < 67.8 { + return nil, reportError("double must be greater than 67.8") + } + if double > 123.4 { + return nil, reportError("double must be less than 123.4") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // 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.Integer.IsSet() { + localVarFormParams.Add("integer", parameterToString(localVarOptionals.Integer.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int32_.IsSet() { + localVarFormParams.Add("int32", parameterToString(localVarOptionals.Int32_.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int64_.IsSet() { + localVarFormParams.Add("int64", parameterToString(localVarOptionals.Int64_.Value(), "")) + } + localVarFormParams.Add("number", parameterToString(number, "")) + if localVarOptionals != nil && localVarOptionals.Float.IsSet() { + localVarFormParams.Add("float", parameterToString(localVarOptionals.Float.Value(), "")) + } + localVarFormParams.Add("double", parameterToString(double, "")) + if localVarOptionals != nil && localVarOptionals.String_.IsSet() { + localVarFormParams.Add("string", parameterToString(localVarOptionals.String_.Value(), "")) + } + localVarFormParams.Add("pattern_without_delimiter", parameterToString(patternWithoutDelimiter, "")) + localVarFormParams.Add("byte", parameterToString(byte_, "")) + localVarFormFileName = "binary" + var localVarFile *os.File + if localVarOptionals != nil && localVarOptionals.Binary.IsSet() { + localVarFileOk := false + localVarFile, localVarFileOk = localVarOptionals.Binary.Value().(*os.File) + if !localVarFileOk { + return nil, reportError("binary should be *os.File") + } + } + if localVarFile != nil { + fbs, _ := _ioutil.ReadAll(localVarFile) + localVarFileBytes = fbs + localVarFileName = localVarFile.Name() + localVarFile.Close() + } + if localVarOptionals != nil && localVarOptionals.Date.IsSet() { + localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.DateTime.IsSet() { + localVarFormParams.Add("dateTime", parameterToString(localVarOptionals.DateTime.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Password.IsSet() { + localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Callback.IsSet() { + localVarFormParams.Add("callback", parameterToString(localVarOptionals.Callback.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 +} + +// TestEnumParametersOpts Optional parameters for the method 'TestEnumParameters' +type TestEnumParametersOpts struct { + EnumHeaderStringArray optional.Interface + EnumHeaderString optional.String + EnumQueryStringArray optional.Interface + EnumQueryString optional.String + EnumQueryInteger optional.Int32 + EnumQueryDouble optional.Float64 + EnumFormStringArray optional.Interface + EnumFormString optional.String +} + +/* +TestEnumParameters To test enum parameters +To test enum parameters + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *TestEnumParametersOpts - Optional Parameters: + * @param "EnumHeaderStringArray" (optional.Interface of []string) - Header parameter enum test (string array) + * @param "EnumHeaderString" (optional.String) - Header parameter enum test (string) + * @param "EnumQueryStringArray" (optional.Interface of []string) - Query parameter enum test (string array) + * @param "EnumQueryString" (optional.String) - Query parameter enum test (string) + * @param "EnumQueryInteger" (optional.Int32) - Query parameter enum test (double) + * @param "EnumQueryDouble" (optional.Float64) - Query parameter enum test (double) + * @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array) + * @param "EnumFormString" (optional.String) - Form parameter enum test (string) +*/ +func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + 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 := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if localVarOptionals != nil && localVarOptionals.EnumQueryStringArray.IsSet() { + t:=localVarOptionals.EnumQueryStringArray.Value() + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("enum_query_string_array", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("enum_query_string_array", parameterToString(t, "multi")) + } + } + if localVarOptionals != nil && localVarOptionals.EnumQueryString.IsSet() { + localVarQueryParams.Add("enum_query_string", parameterToString(localVarOptionals.EnumQueryString.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EnumQueryInteger.IsSet() { + localVarQueryParams.Add("enum_query_integer", parameterToString(localVarOptionals.EnumQueryInteger.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EnumQueryDouble.IsSet() { + localVarQueryParams.Add("enum_query_double", parameterToString(localVarOptionals.EnumQueryDouble.Value(), "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // 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.EnumHeaderStringArray.IsSet() { + localVarHeaderParams["enum_header_string_array"] = parameterToString(localVarOptionals.EnumHeaderStringArray.Value(), "csv") + } + if localVarOptionals != nil && localVarOptionals.EnumHeaderString.IsSet() { + localVarHeaderParams["enum_header_string"] = parameterToString(localVarOptionals.EnumHeaderString.Value(), "") + } + if localVarOptionals != nil && localVarOptionals.EnumFormStringArray.IsSet() { + localVarFormParams.Add("enum_form_string_array", parameterToString(localVarOptionals.EnumFormStringArray.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.EnumFormString.IsSet() { + localVarFormParams.Add("enum_form_string", parameterToString(localVarOptionals.EnumFormString.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 +} + +// TestGroupParametersOpts Optional parameters for the method 'TestGroupParameters' +type TestGroupParametersOpts struct { + StringGroup optional.Int32 + BooleanGroup optional.Bool + Int64Group optional.Int64 +} + +/* +TestGroupParameters 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 requiredStringGroup Required String in group parameters + * @param requiredBooleanGroup Required Boolean in group parameters + * @param requiredInt64Group Required Integer in group parameters + * @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 +*/ +func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + 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 := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + localVarQueryParams.Add("required_string_group", parameterToString(requiredStringGroup, "")) + localVarQueryParams.Add("required_int64_group", parameterToString(requiredInt64Group, "")) + 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 + } + localVarHeaderParams["required_boolean_group"] = parameterToString(requiredBooleanGroup, "") + 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 +} + +/* +TestInlineAdditionalProperties test inline additionalProperties + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param requestBody request body +*/ +func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, requestBody map[string]string) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/inline-additionalProperties" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = &requestBody + 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 +} + +/* +TestJsonFormData test json serialization of form data + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param param field1 + * @param param2 field2 +*/ +func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/jsonFormData" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // 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 + } + localVarFormParams.Add("param", parameterToString(param, "")) + localVarFormParams.Add("param2", parameterToString(param2, "")) + 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 +} + +/* +TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat +To test the collection format in query parameters + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param pipe + * @param ioutil + * @param http + * @param url + * @param context +*/ +func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/test-query-paramters" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + t:=pipe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("pipe", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("pipe", parameterToString(t, "multi")) + } + localVarQueryParams.Add("ioutil", parameterToString(ioutil, "csv")) + localVarQueryParams.Add("http", parameterToString(http, "space")) + localVarQueryParams.Add("url", parameterToString(url, "csv")) + t:=context + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("context", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("context", parameterToString(t, "multi")) + } + // 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 + } + 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 +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go new file mode 100644 index 0000000000..e64fa111ce --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go @@ -0,0 +1,127 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" +) + +// Linger please +var ( + _ _context.Context +) + +// FakeClassnameTags123ApiService FakeClassnameTags123Api service +type FakeClassnameTags123ApiService service + +/* +TestClassname To test class name in snake case +To test class name in snake case + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param client client model +@return Client +*/ +func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Client + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake_classname_test" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = &client + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["api_key_query"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarQueryParams.Add("api_key_query", key) + } + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v Client + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go new file mode 100644 index 0000000000..a96faf2bac --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go @@ -0,0 +1,819 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "fmt" + "strings" + "github.com/antihax/optional" + "os" +) + +// Linger please +var ( + _ _context.Context +) + +// PetApiService PetApi service +type PetApiService service + +/* +AddPet Add a new pet to the store + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param pet Pet object that needs to be added to the store +*/ +func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/xml"} + + // 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 + } + // body params + localVarPostBody = &pet + 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 +} + +// DeletePetOpts Optional parameters for the method 'DeletePet' +type DeletePetOpts struct { + ApiKey optional.String +} + +/* +DeletePet Deletes a pet + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param petId Pet id to delete + * @param optional nil or *DeletePetOpts - Optional Parameters: + * @param "ApiKey" (optional.String) - +*/ +func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet/{petId}" + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() { + localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.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 +} + +/* +FindPetsByStatus Finds Pets by status +Multiple status values can be provided with comma separated strings + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param status Status values that need to be considered for filter +@return []Pet +*/ +func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []Pet + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet/findByStatus" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + localVarQueryParams.Add("status", parameterToString(status, "csv")) + // 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{"application/xml", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v []Pet + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +/* +FindPetsByTags Finds Pets by tags +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param tags Tags to filter by +@return []Pet +*/ +func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []Pet + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet/findByTags" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + localVarQueryParams.Add("tags", parameterToString(tags, "csv")) + // 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{"application/xml", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v []Pet + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +/* +GetPetById Find pet by ID +Returns a single pet + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param petId ID of pet to return +@return Pet +*/ +func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Pet + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet/{petId}" + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/xml", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["api_key"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api_key"] = key + } + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v Pet + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +/* +UpdatePet Update an existing pet + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param pet Pet object that needs to be added to the store +*/ +func (a *PetApiService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/xml"} + + // 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 + } + // body params + localVarPostBody = &pet + 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 +} + +// UpdatePetWithFormOpts Optional parameters for the method 'UpdatePetWithForm' +type UpdatePetWithFormOpts struct { + Name optional.String + Status optional.String +} + +/* +UpdatePetWithForm Updates a pet in the store with form data + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param petId ID of pet that needs to be updated + * @param optional nil or *UpdatePetWithFormOpts - Optional Parameters: + * @param "Name" (optional.String) - Updated name of the pet + * @param "Status" (optional.String) - Updated status of the pet +*/ +func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet/{petId}" + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // 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.Name.IsSet() { + localVarFormParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Status.IsSet() { + localVarFormParams.Add("status", parameterToString(localVarOptionals.Status.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 +} + +// UploadFileOpts Optional parameters for the method 'UploadFile' +type UploadFileOpts struct { + AdditionalMetadata optional.String + File optional.Interface +} + +/* +UploadFile uploads an image + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param petId ID of pet to update + * @param optional nil or *UploadFileOpts - Optional Parameters: + * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server + * @param "File" (optional.Interface of *os.File) - file to upload +@return ApiResponse +*/ +func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApiResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImage" + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { + localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) + } + localVarFormFileName = "file" + var localVarFile *os.File + if localVarOptionals != nil && localVarOptionals.File.IsSet() { + localVarFileOk := false + localVarFile, localVarFileOk = localVarOptionals.File.Value().(*os.File) + if !localVarFileOk { + return localVarReturnValue, nil, reportError("file should be *os.File") + } + } + if localVarFile != nil { + fbs, _ := _ioutil.ReadAll(localVarFile) + localVarFileBytes = fbs + localVarFileName = localVarFile.Name() + localVarFile.Close() + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v ApiResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// UploadFileWithRequiredFileOpts Optional parameters for the method 'UploadFileWithRequiredFile' +type UploadFileWithRequiredFileOpts struct { + AdditionalMetadata optional.String +} + +/* +UploadFileWithRequiredFile uploads an image (required) + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param petId ID of pet to update + * @param requiredFile file to upload + * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: + * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server +@return ApiResponse +*/ +func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApiResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake/{petId}/uploadImageWithRequiredFile" + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { + localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) + } + localVarFormFileName = "requiredFile" + localVarFile := requiredFile + if localVarFile != nil { + fbs, _ := _ioutil.ReadAll(localVarFile) + localVarFileBytes = fbs + localVarFileName = localVarFile.Name() + localVarFile.Close() + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v ApiResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go new file mode 100644 index 0000000000..826647ff74 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go @@ -0,0 +1,377 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "fmt" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +// StoreApiService StoreApi service +type StoreApiService service + +/* +DeleteOrder Delete purchase order by ID +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orderId ID of the order that needs to be deleted +*/ +func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", orderId)), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + 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 +} + +/* +GetInventory Returns pet inventories by status +Returns a map of status codes to quantities + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@return map[string]int32 +*/ +func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue map[string]int32 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/store/inventory" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["api_key"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api_key"] = key + } + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v map[string]int32 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +/* +GetOrderById Find purchase order by ID +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orderId ID of pet that needs to be fetched +@return Order +*/ +func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Order + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", orderId)), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if orderId < 1 { + return localVarReturnValue, nil, reportError("orderId must be greater than 1") + } + if orderId > 5 { + return localVarReturnValue, nil, reportError("orderId must be less than 5") + } + + // 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{"application/xml", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v Order + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +/* +PlaceOrder Place an order for a pet + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param order order placed for purchasing the pet +@return Order +*/ +func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Order + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/store/order" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/xml", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = &order + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v Order + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go new file mode 100644 index 0000000000..a5510a407d --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go @@ -0,0 +1,608 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "fmt" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +// UserApiService UserApi service +type UserApiService service + +/* +CreateUser Create user +This can only be done by the logged in user. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param user Created user object +*/ +func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/user" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = &user + 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 +} + +/* +CreateUsersWithArrayInput Creates list of users with given input array + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param user List of user object +*/ +func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/user/createWithArray" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = &user + 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 +} + +/* +CreateUsersWithListInput Creates list of users with given input array + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param user List of user object +*/ +func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/user/createWithList" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = &user + 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 +} + +/* +DeleteUser Delete user +This can only be done by the logged in user. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param username The name that needs to be deleted +*/ +func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/user/{username}" + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", username)), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + 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 +} + +/* +GetUserByName Get user by user name + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param username The name that needs to be fetched. Use user1 for testing. +@return User +*/ +func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue User + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/user/{username}" + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", username)), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/xml", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v User + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +/* +LoginUser Logs user into the system + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param username The user name for login + * @param password The password for login in clear text +@return string +*/ +func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/user/login" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + localVarQueryParams.Add("username", parameterToString(username, "")) + localVarQueryParams.Add("password", parameterToString(password, "")) + // 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{"application/xml", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(r) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +/* +LogoutUser Logs out current logged in user session + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +*/ +func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/user/logout" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + 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 +} + +/* +UpdateUser Updated user +This can only be done by the logged in user. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param username name that need to be deleted + * @param user Updated user object +*/ +func (a *UserApiService) UpdateUser(ctx _context.Context, username string, user User) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/user/{username}" + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", username)), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = &user + 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 +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go new file mode 100644 index 0000000000..db6225efeb --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go @@ -0,0 +1,517 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "mime/multipart" + "net/http" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) +) + +// APIClient manages communication with the OpenAPI Petstore API v1.0.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AnotherFakeApi *AnotherFakeApiService + + DefaultApi *DefaultApiService + + FakeApi *FakeApiService + + FakeClassnameTags123Api *FakeClassnameTags123ApiService + + PetApi *PetApiService + + StoreApi *StoreApiService + + UserApi *UserApiService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AnotherFakeApi = (*AnotherFakeApiService)(&c.common) + c.DefaultApi = (*DefaultApiService)(&c.common) + c.FakeApi = (*FakeApiService)(&c.common) + c.FakeClassnameTags123Api = (*FakeClassnameTags123ApiService)(&c.common) + c.PetApi = (*PetApiService)(&c.common) + c.StoreApi = (*StoreApiService)(&c.common) + c.UserApi = (*UserApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insenstive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.ToLower(a) == strings.ToLower(needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { + var delimiter string + + switch collectionFormat { + case "pipes": + delimiter = "|" + case "ssv": + delimiter = " " + case "tsv": + delimiter = "\t" + case "csv": + delimiter = "," + } + + if reflect.TypeOf(obj).Kind() == reflect.Slice { + return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + } else if t, ok := obj.(time.Time); ok { + return t.Format(time.RFC3339) + } + + return fmt.Sprintf("%v", obj) +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + return c.cfg.HTTPClient.Do(request) +} + +// ChangeBasePath changes base path to allow switching to mocks +func (c *APIClient) ChangeBasePath(path string) { + c.cfg.BasePath = path +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFileName string, + fileName string, + fileBytes []byte) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + if len(fileBytes) > 0 && fileName != "" { + w.Boundary() + //_, fileNm := filepath.Split(fileName) + part, err := w.CreateFormFile(formFileName, filepath.Base(fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(fileBytes) + if err != nil { + return nil, err + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers.Set(h, v) + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if err = json.Unmarshal(b, v); err != nil { + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + err = xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("Invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go new file mode 100644 index 0000000000..1c71df1309 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go @@ -0,0 +1,75 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// Configuration stores the configuration of the API client +type Configuration struct { + BasePath string `json:"basePath,omitempty"` + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + BasePath: "http://petstore.swagger.io:80/v2", + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md new file mode 100644 index 0000000000..264d926fce --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md @@ -0,0 +1,65 @@ +# AdditionalPropertiesClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MapProperty** | Pointer to **map[string]string** | | [optional] +**MapOfMapProperty** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] + +## Methods + +### GetMapProperty + +`func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string` + +GetMapProperty returns the MapProperty field if non-nil, zero value otherwise. + +### GetMapPropertyOk + +`func (o *AdditionalPropertiesClass) GetMapPropertyOk() (map[string]string, bool)` + +GetMapPropertyOk returns a tuple with the MapProperty field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapProperty + +`func (o *AdditionalPropertiesClass) HasMapProperty() bool` + +HasMapProperty returns a boolean if a field has been set. + +### SetMapProperty + +`func (o *AdditionalPropertiesClass) SetMapProperty(v map[string]string)` + +SetMapProperty gets a reference to the given map[string]string and assigns it to the MapProperty field. + +### GetMapOfMapProperty + +`func (o *AdditionalPropertiesClass) GetMapOfMapProperty() map[string]map[string]string` + +GetMapOfMapProperty returns the MapOfMapProperty field if non-nil, zero value otherwise. + +### GetMapOfMapPropertyOk + +`func (o *AdditionalPropertiesClass) GetMapOfMapPropertyOk() (map[string]map[string]string, bool)` + +GetMapOfMapPropertyOk returns a tuple with the MapOfMapProperty field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapOfMapProperty + +`func (o *AdditionalPropertiesClass) HasMapOfMapProperty() bool` + +HasMapOfMapProperty returns a boolean if a field has been set. + +### SetMapOfMapProperty + +`func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string]string)` + +SetMapOfMapProperty gets a reference to the given map[string]map[string]string and assigns it to the MapOfMapProperty field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md new file mode 100644 index 0000000000..55133b2974 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md @@ -0,0 +1,65 @@ +# Animal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | Pointer to **string** | | +**Color** | Pointer to **string** | | [optional] [default to red] + +## Methods + +### GetClassName + +`func (o *Animal) GetClassName() string` + +GetClassName returns the ClassName field if non-nil, zero value otherwise. + +### GetClassNameOk + +`func (o *Animal) GetClassNameOk() (string, bool)` + +GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClassName + +`func (o *Animal) HasClassName() bool` + +HasClassName returns a boolean if a field has been set. + +### SetClassName + +`func (o *Animal) SetClassName(v string)` + +SetClassName gets a reference to the given string and assigns it to the ClassName field. + +### GetColor + +`func (o *Animal) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *Animal) GetColorOk() (string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasColor + +`func (o *Animal) HasColor() bool` + +HasColor returns a boolean if a field has been set. + +### SetColor + +`func (o *Animal) SetColor(v string)` + +SetColor gets a reference to the given string and assigns it to the Color field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md new file mode 100644 index 0000000000..fb674f202e --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md @@ -0,0 +1,43 @@ +# \AnotherFakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags + + + +## Call123TestSpecialTags + +> Client Call123TestSpecialTags(ctx, client) + +To test special tags + +To test special tags and operation ID starting with number + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**client** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md new file mode 100644 index 0000000000..b0c891bbc9 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md @@ -0,0 +1,91 @@ +# ApiResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **int32** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### GetCode + +`func (o *ApiResponse) GetCode() int32` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *ApiResponse) GetCodeOk() (int32, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCode + +`func (o *ApiResponse) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### SetCode + +`func (o *ApiResponse) SetCode(v int32)` + +SetCode gets a reference to the given int32 and assigns it to the Code field. + +### GetType + +`func (o *ApiResponse) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ApiResponse) GetTypeOk() (string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasType + +`func (o *ApiResponse) HasType() bool` + +HasType returns a boolean if a field has been set. + +### SetType + +`func (o *ApiResponse) SetType(v string)` + +SetType gets a reference to the given string and assigns it to the Type field. + +### GetMessage + +`func (o *ApiResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ApiResponse) GetMessageOk() (string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMessage + +`func (o *ApiResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessage + +`func (o *ApiResponse) SetMessage(v string)` + +SetMessage gets a reference to the given string and assigns it to the Message field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 0000000000..64ad908ea3 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,39 @@ +# ArrayOfArrayOfNumberOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayArrayNumber** | Pointer to [**[][]float32**](array.md) | | [optional] + +## Methods + +### GetArrayArrayNumber + +`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32` + +GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise. + +### GetArrayArrayNumberOk + +`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool)` + +GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayArrayNumber + +`func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool` + +HasArrayArrayNumber returns a boolean if a field has been set. + +### SetArrayArrayNumber + +`func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32)` + +SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md new file mode 100644 index 0000000000..0ce95922a5 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md @@ -0,0 +1,39 @@ +# ArrayOfNumberOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayNumber** | Pointer to **[]float32** | | [optional] + +## Methods + +### GetArrayNumber + +`func (o *ArrayOfNumberOnly) GetArrayNumber() []float32` + +GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. + +### GetArrayNumberOk + +`func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool)` + +GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayNumber + +`func (o *ArrayOfNumberOnly) HasArrayNumber() bool` + +HasArrayNumber returns a boolean if a field has been set. + +### SetArrayNumber + +`func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32)` + +SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md new file mode 100644 index 0000000000..f7020fadea --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md @@ -0,0 +1,91 @@ +# ArrayTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayOfString** | Pointer to **[]string** | | [optional] +**ArrayArrayOfInteger** | Pointer to [**[][]int64**](array.md) | | [optional] +**ArrayArrayOfModel** | Pointer to [**[][]ReadOnlyFirst**](array.md) | | [optional] + +## Methods + +### GetArrayOfString + +`func (o *ArrayTest) GetArrayOfString() []string` + +GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise. + +### GetArrayOfStringOk + +`func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool)` + +GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayOfString + +`func (o *ArrayTest) HasArrayOfString() bool` + +HasArrayOfString returns a boolean if a field has been set. + +### SetArrayOfString + +`func (o *ArrayTest) SetArrayOfString(v []string)` + +SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field. + +### GetArrayArrayOfInteger + +`func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64` + +GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise. + +### GetArrayArrayOfIntegerOk + +`func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool)` + +GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayArrayOfInteger + +`func (o *ArrayTest) HasArrayArrayOfInteger() bool` + +HasArrayArrayOfInteger returns a boolean if a field has been set. + +### SetArrayArrayOfInteger + +`func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64)` + +SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field. + +### GetArrayArrayOfModel + +`func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst` + +GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise. + +### GetArrayArrayOfModelOk + +`func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool)` + +GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayArrayOfModel + +`func (o *ArrayTest) HasArrayArrayOfModel() bool` + +HasArrayArrayOfModel returns a boolean if a field has been set. + +### SetArrayArrayOfModel + +`func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst)` + +SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md new file mode 100644 index 0000000000..a4772d7400 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md @@ -0,0 +1,169 @@ +# Capitalization + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SmallCamel** | Pointer to **string** | | [optional] +**CapitalCamel** | Pointer to **string** | | [optional] +**SmallSnake** | Pointer to **string** | | [optional] +**CapitalSnake** | Pointer to **string** | | [optional] +**SCAETHFlowPoints** | Pointer to **string** | | [optional] +**ATT_NAME** | Pointer to **string** | Name of the pet | [optional] + +## Methods + +### GetSmallCamel + +`func (o *Capitalization) GetSmallCamel() string` + +GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. + +### GetSmallCamelOk + +`func (o *Capitalization) GetSmallCamelOk() (string, bool)` + +GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSmallCamel + +`func (o *Capitalization) HasSmallCamel() bool` + +HasSmallCamel returns a boolean if a field has been set. + +### SetSmallCamel + +`func (o *Capitalization) SetSmallCamel(v string)` + +SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field. + +### GetCapitalCamel + +`func (o *Capitalization) GetCapitalCamel() string` + +GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. + +### GetCapitalCamelOk + +`func (o *Capitalization) GetCapitalCamelOk() (string, bool)` + +GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCapitalCamel + +`func (o *Capitalization) HasCapitalCamel() bool` + +HasCapitalCamel returns a boolean if a field has been set. + +### SetCapitalCamel + +`func (o *Capitalization) SetCapitalCamel(v string)` + +SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field. + +### GetSmallSnake + +`func (o *Capitalization) GetSmallSnake() string` + +GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. + +### GetSmallSnakeOk + +`func (o *Capitalization) GetSmallSnakeOk() (string, bool)` + +GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSmallSnake + +`func (o *Capitalization) HasSmallSnake() bool` + +HasSmallSnake returns a boolean if a field has been set. + +### SetSmallSnake + +`func (o *Capitalization) SetSmallSnake(v string)` + +SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field. + +### GetCapitalSnake + +`func (o *Capitalization) GetCapitalSnake() string` + +GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. + +### GetCapitalSnakeOk + +`func (o *Capitalization) GetCapitalSnakeOk() (string, bool)` + +GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCapitalSnake + +`func (o *Capitalization) HasCapitalSnake() bool` + +HasCapitalSnake returns a boolean if a field has been set. + +### SetCapitalSnake + +`func (o *Capitalization) SetCapitalSnake(v string)` + +SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field. + +### GetSCAETHFlowPoints + +`func (o *Capitalization) GetSCAETHFlowPoints() string` + +GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise. + +### GetSCAETHFlowPointsOk + +`func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool)` + +GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSCAETHFlowPoints + +`func (o *Capitalization) HasSCAETHFlowPoints() bool` + +HasSCAETHFlowPoints returns a boolean if a field has been set. + +### SetSCAETHFlowPoints + +`func (o *Capitalization) SetSCAETHFlowPoints(v string)` + +SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field. + +### GetATT_NAME + +`func (o *Capitalization) GetATT_NAME() string` + +GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. + +### GetATT_NAMEOk + +`func (o *Capitalization) GetATT_NAMEOk() (string, bool)` + +GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasATT_NAME + +`func (o *Capitalization) HasATT_NAME() bool` + +HasATT_NAME returns a boolean if a field has been set. + +### SetATT_NAME + +`func (o *Capitalization) SetATT_NAME(v string)` + +SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md new file mode 100644 index 0000000000..0f2fe5a1f1 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md @@ -0,0 +1,91 @@ +# Cat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | Pointer to **string** | | +**Color** | Pointer to **string** | | [optional] [default to red] +**Declawed** | Pointer to **bool** | | [optional] + +## Methods + +### GetClassName + +`func (o *Cat) GetClassName() string` + +GetClassName returns the ClassName field if non-nil, zero value otherwise. + +### GetClassNameOk + +`func (o *Cat) GetClassNameOk() (string, bool)` + +GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClassName + +`func (o *Cat) HasClassName() bool` + +HasClassName returns a boolean if a field has been set. + +### SetClassName + +`func (o *Cat) SetClassName(v string)` + +SetClassName gets a reference to the given string and assigns it to the ClassName field. + +### GetColor + +`func (o *Cat) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *Cat) GetColorOk() (string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasColor + +`func (o *Cat) HasColor() bool` + +HasColor returns a boolean if a field has been set. + +### SetColor + +`func (o *Cat) SetColor(v string)` + +SetColor gets a reference to the given string and assigns it to the Color field. + +### GetDeclawed + +`func (o *Cat) GetDeclawed() bool` + +GetDeclawed returns the Declawed field if non-nil, zero value otherwise. + +### GetDeclawedOk + +`func (o *Cat) GetDeclawedOk() (bool, bool)` + +GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDeclawed + +`func (o *Cat) HasDeclawed() bool` + +HasDeclawed returns a boolean if a field has been set. + +### SetDeclawed + +`func (o *Cat) SetDeclawed(v bool)` + +SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md new file mode 100644 index 0000000000..85f40d251d --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md @@ -0,0 +1,39 @@ +# CatAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Declawed** | Pointer to **bool** | | [optional] + +## Methods + +### GetDeclawed + +`func (o *CatAllOf) GetDeclawed() bool` + +GetDeclawed returns the Declawed field if non-nil, zero value otherwise. + +### GetDeclawedOk + +`func (o *CatAllOf) GetDeclawedOk() (bool, bool)` + +GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDeclawed + +`func (o *CatAllOf) HasDeclawed() bool` + +HasDeclawed returns a boolean if a field has been set. + +### SetDeclawed + +`func (o *CatAllOf) SetDeclawed(v bool)` + +SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md new file mode 100644 index 0000000000..88b525bade --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md @@ -0,0 +1,65 @@ +# Category + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [default to default-name] + +## Methods + +### GetId + +`func (o *Category) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Category) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Category) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Category) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetName + +`func (o *Category) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Category) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Category) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Category) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md new file mode 100644 index 0000000000..d9c4f41e98 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md @@ -0,0 +1,39 @@ +# ClassModel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Class** | Pointer to **string** | | [optional] + +## Methods + +### GetClass + +`func (o *ClassModel) GetClass() string` + +GetClass returns the Class field if non-nil, zero value otherwise. + +### GetClassOk + +`func (o *ClassModel) GetClassOk() (string, bool)` + +GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClass + +`func (o *ClassModel) HasClass() bool` + +HasClass returns a boolean if a field has been set. + +### SetClass + +`func (o *ClassModel) SetClass(v string)` + +SetClass gets a reference to the given string and assigns it to the Class field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md new file mode 100644 index 0000000000..5ed3098fd4 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md @@ -0,0 +1,39 @@ +# Client + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Client** | Pointer to **string** | | [optional] + +## Methods + +### GetClient + +`func (o *Client) GetClient() string` + +GetClient returns the Client field if non-nil, zero value otherwise. + +### GetClientOk + +`func (o *Client) GetClientOk() (string, bool)` + +GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClient + +`func (o *Client) HasClient() bool` + +HasClient returns a boolean if a field has been set. + +### SetClient + +`func (o *Client) SetClient(v string)` + +SetClient gets a reference to the given string and assigns it to the Client field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md new file mode 100644 index 0000000000..daf779c8e3 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md @@ -0,0 +1,37 @@ +# \DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FooGet**](DefaultApi.md#FooGet) | **Get** /foo | + + + +## FooGet + +> InlineResponseDefault FooGet(ctx, ) + + + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**InlineResponseDefault**](inline_response_default.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md new file mode 100644 index 0000000000..4b5c332d8e --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md @@ -0,0 +1,91 @@ +# Dog + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | Pointer to **string** | | +**Color** | Pointer to **string** | | [optional] [default to red] +**Breed** | Pointer to **string** | | [optional] + +## Methods + +### GetClassName + +`func (o *Dog) GetClassName() string` + +GetClassName returns the ClassName field if non-nil, zero value otherwise. + +### GetClassNameOk + +`func (o *Dog) GetClassNameOk() (string, bool)` + +GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClassName + +`func (o *Dog) HasClassName() bool` + +HasClassName returns a boolean if a field has been set. + +### SetClassName + +`func (o *Dog) SetClassName(v string)` + +SetClassName gets a reference to the given string and assigns it to the ClassName field. + +### GetColor + +`func (o *Dog) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *Dog) GetColorOk() (string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasColor + +`func (o *Dog) HasColor() bool` + +HasColor returns a boolean if a field has been set. + +### SetColor + +`func (o *Dog) SetColor(v string)` + +SetColor gets a reference to the given string and assigns it to the Color field. + +### GetBreed + +`func (o *Dog) GetBreed() string` + +GetBreed returns the Breed field if non-nil, zero value otherwise. + +### GetBreedOk + +`func (o *Dog) GetBreedOk() (string, bool)` + +GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBreed + +`func (o *Dog) HasBreed() bool` + +HasBreed returns a boolean if a field has been set. + +### SetBreed + +`func (o *Dog) SetBreed(v string)` + +SetBreed gets a reference to the given string and assigns it to the Breed field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md new file mode 100644 index 0000000000..a3169521ce --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md @@ -0,0 +1,39 @@ +# DogAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Breed** | Pointer to **string** | | [optional] + +## Methods + +### GetBreed + +`func (o *DogAllOf) GetBreed() string` + +GetBreed returns the Breed field if non-nil, zero value otherwise. + +### GetBreedOk + +`func (o *DogAllOf) GetBreedOk() (string, bool)` + +GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBreed + +`func (o *DogAllOf) HasBreed() bool` + +HasBreed returns a boolean if a field has been set. + +### SetBreed + +`func (o *DogAllOf) SetBreed(v string)` + +SetBreed gets a reference to the given string and assigns it to the Breed field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md new file mode 100644 index 0000000000..31d7b2b9fa --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md @@ -0,0 +1,65 @@ +# EnumArrays + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JustSymbol** | Pointer to **string** | | [optional] +**ArrayEnum** | Pointer to **[]string** | | [optional] + +## Methods + +### GetJustSymbol + +`func (o *EnumArrays) GetJustSymbol() string` + +GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. + +### GetJustSymbolOk + +`func (o *EnumArrays) GetJustSymbolOk() (string, bool)` + +GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasJustSymbol + +`func (o *EnumArrays) HasJustSymbol() bool` + +HasJustSymbol returns a boolean if a field has been set. + +### SetJustSymbol + +`func (o *EnumArrays) SetJustSymbol(v string)` + +SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field. + +### GetArrayEnum + +`func (o *EnumArrays) GetArrayEnum() []string` + +GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. + +### GetArrayEnumOk + +`func (o *EnumArrays) GetArrayEnumOk() ([]string, bool)` + +GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayEnum + +`func (o *EnumArrays) HasArrayEnum() bool` + +HasArrayEnum returns a boolean if a field has been set. + +### SetArrayEnum + +`func (o *EnumArrays) SetArrayEnum(v []string)` + +SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumClass.md new file mode 100644 index 0000000000..e231f94bd7 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumClass.md @@ -0,0 +1,11 @@ +# EnumClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md new file mode 100644 index 0000000000..45b1b7e5ad --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md @@ -0,0 +1,228 @@ +# EnumTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumString** | Pointer to **string** | | [optional] +**EnumStringRequired** | Pointer to **string** | | +**EnumInteger** | Pointer to **int32** | | [optional] +**EnumNumber** | Pointer to **float64** | | [optional] +**OuterEnum** | Pointer to [**OuterEnum**](OuterEnum.md) | | [optional] +**OuterEnumInteger** | Pointer to [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**OuterEnumDefaultValue** | Pointer to [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**OuterEnumIntegerDefaultValue** | Pointer to [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] + +## Methods + +### GetEnumString + +`func (o *EnumTest) GetEnumString() string` + +GetEnumString returns the EnumString field if non-nil, zero value otherwise. + +### GetEnumStringOk + +`func (o *EnumTest) GetEnumStringOk() (string, bool)` + +GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumString + +`func (o *EnumTest) HasEnumString() bool` + +HasEnumString returns a boolean if a field has been set. + +### SetEnumString + +`func (o *EnumTest) SetEnumString(v string)` + +SetEnumString gets a reference to the given string and assigns it to the EnumString field. + +### GetEnumStringRequired + +`func (o *EnumTest) GetEnumStringRequired() string` + +GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise. + +### GetEnumStringRequiredOk + +`func (o *EnumTest) GetEnumStringRequiredOk() (string, bool)` + +GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumStringRequired + +`func (o *EnumTest) HasEnumStringRequired() bool` + +HasEnumStringRequired returns a boolean if a field has been set. + +### SetEnumStringRequired + +`func (o *EnumTest) SetEnumStringRequired(v string)` + +SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field. + +### GetEnumInteger + +`func (o *EnumTest) GetEnumInteger() int32` + +GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. + +### GetEnumIntegerOk + +`func (o *EnumTest) GetEnumIntegerOk() (int32, bool)` + +GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumInteger + +`func (o *EnumTest) HasEnumInteger() bool` + +HasEnumInteger returns a boolean if a field has been set. + +### SetEnumInteger + +`func (o *EnumTest) SetEnumInteger(v int32)` + +SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field. + +### GetEnumNumber + +`func (o *EnumTest) GetEnumNumber() float64` + +GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. + +### GetEnumNumberOk + +`func (o *EnumTest) GetEnumNumberOk() (float64, bool)` + +GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumNumber + +`func (o *EnumTest) HasEnumNumber() bool` + +HasEnumNumber returns a boolean if a field has been set. + +### SetEnumNumber + +`func (o *EnumTest) SetEnumNumber(v float64)` + +SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field. + +### GetOuterEnum + +`func (o *EnumTest) GetOuterEnum() OuterEnum` + +GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. + +### GetOuterEnumOk + +`func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool)` + +GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasOuterEnum + +`func (o *EnumTest) HasOuterEnum() bool` + +HasOuterEnum returns a boolean if a field has been set. + +### SetOuterEnum + +`func (o *EnumTest) SetOuterEnum(v OuterEnum)` + +SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field. + +### SetOuterEnumExplicitNull + +`func (o *EnumTest) SetOuterEnumExplicitNull(b bool)` + +SetOuterEnumExplicitNull (un)sets OuterEnum to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The OuterEnum value is set to nil even if false is passed +### GetOuterEnumInteger + +`func (o *EnumTest) GetOuterEnumInteger() OuterEnumInteger` + +GetOuterEnumInteger returns the OuterEnumInteger field if non-nil, zero value otherwise. + +### GetOuterEnumIntegerOk + +`func (o *EnumTest) GetOuterEnumIntegerOk() (OuterEnumInteger, bool)` + +GetOuterEnumIntegerOk returns a tuple with the OuterEnumInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasOuterEnumInteger + +`func (o *EnumTest) HasOuterEnumInteger() bool` + +HasOuterEnumInteger returns a boolean if a field has been set. + +### SetOuterEnumInteger + +`func (o *EnumTest) SetOuterEnumInteger(v OuterEnumInteger)` + +SetOuterEnumInteger gets a reference to the given OuterEnumInteger and assigns it to the OuterEnumInteger field. + +### GetOuterEnumDefaultValue + +`func (o *EnumTest) GetOuterEnumDefaultValue() OuterEnumDefaultValue` + +GetOuterEnumDefaultValue returns the OuterEnumDefaultValue field if non-nil, zero value otherwise. + +### GetOuterEnumDefaultValueOk + +`func (o *EnumTest) GetOuterEnumDefaultValueOk() (OuterEnumDefaultValue, bool)` + +GetOuterEnumDefaultValueOk returns a tuple with the OuterEnumDefaultValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasOuterEnumDefaultValue + +`func (o *EnumTest) HasOuterEnumDefaultValue() bool` + +HasOuterEnumDefaultValue returns a boolean if a field has been set. + +### SetOuterEnumDefaultValue + +`func (o *EnumTest) SetOuterEnumDefaultValue(v OuterEnumDefaultValue)` + +SetOuterEnumDefaultValue gets a reference to the given OuterEnumDefaultValue and assigns it to the OuterEnumDefaultValue field. + +### GetOuterEnumIntegerDefaultValue + +`func (o *EnumTest) GetOuterEnumIntegerDefaultValue() OuterEnumIntegerDefaultValue` + +GetOuterEnumIntegerDefaultValue returns the OuterEnumIntegerDefaultValue field if non-nil, zero value otherwise. + +### GetOuterEnumIntegerDefaultValueOk + +`func (o *EnumTest) GetOuterEnumIntegerDefaultValueOk() (OuterEnumIntegerDefaultValue, bool)` + +GetOuterEnumIntegerDefaultValueOk returns a tuple with the OuterEnumIntegerDefaultValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasOuterEnumIntegerDefaultValue + +`func (o *EnumTest) HasOuterEnumIntegerDefaultValue() bool` + +HasOuterEnumIntegerDefaultValue returns a boolean if a field has been set. + +### SetOuterEnumIntegerDefaultValue + +`func (o *EnumTest) SetOuterEnumIntegerDefaultValue(v OuterEnumIntegerDefaultValue)` + +SetOuterEnumIntegerDefaultValue gets a reference to the given OuterEnumIntegerDefaultValue and assigns it to the OuterEnumIntegerDefaultValue field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md new file mode 100644 index 0000000000..3634a8771e --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md @@ -0,0 +1,587 @@ +# \FakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FakeHealthGet**](FakeApi.md#FakeHealthGet) | **Get** /fake/health | Health check endpoint +[**FakeOuterBooleanSerialize**](FakeApi.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | +[**FakeOuterCompositeSerialize**](FakeApi.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | +[**FakeOuterNumberSerialize**](FakeApi.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | +[**FakeOuterStringSerialize**](FakeApi.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | +[**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | +[**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | +[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model +[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters +[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeApi.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | + + + +## FakeHealthGet + +> HealthCheckResult FakeHealthGet(ctx, ) + +Health check endpoint + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterBooleanSerialize + +> bool FakeOuterBooleanSerialize(ctx, optional) + + + +Test serialization of outer boolean types + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***FakeOuterBooleanSerializeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FakeOuterBooleanSerializeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **optional.Bool**| Input boolean as post body | + +### Return type + +**bool** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterCompositeSerialize + +> OuterComposite FakeOuterCompositeSerialize(ctx, optional) + + + +Test serialization of object with outer number type + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***FakeOuterCompositeSerializeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FakeOuterCompositeSerializeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outerComposite** | [**optional.Interface of OuterComposite**](OuterComposite.md)| Input composite as post body | + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterNumberSerialize + +> float32 FakeOuterNumberSerialize(ctx, optional) + + + +Test serialization of outer number types + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***FakeOuterNumberSerializeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FakeOuterNumberSerializeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **optional.Float32**| Input number as post body | + +### Return type + +**float32** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FakeOuterStringSerialize + +> string FakeOuterStringSerialize(ctx, optional) + + + +Test serialization of outer string types + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***FakeOuterStringSerializeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FakeOuterStringSerializeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **optional.String**| Input string as post body | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestBodyWithFileSchema + +> TestBodyWithFileSchema(ctx, fileSchemaTestClass) + + + +For this test, the body for this request much reference a schema named `File`. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestBodyWithQueryParams + +> TestBodyWithQueryParams(ctx, query, user) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**query** | **string**| | +**user** | [**User**](User.md)| | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestClientModel + +> Client TestClientModel(ctx, client) + +To test \"client\" model + +To test \"client\" model + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**client** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestEndpointParameters + +> TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**number** | **float32**| None | +**double** | **float64**| None | +**patternWithoutDelimiter** | **string**| None | +**byte_** | **string**| None | + **optional** | ***TestEndpointParametersOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a TestEndpointParametersOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + **integer** | **optional.Int32**| None | + **int32_** | **optional.Int32**| None | + **int64_** | **optional.Int64**| None | + **float** | **optional.Float32**| None | + **string_** | **optional.String**| None | + **binary** | **optional.Interface of *os.File****optional.*os.File**| None | + **date** | **optional.String**| None | + **dateTime** | **optional.Time**| None | + **password** | **optional.String**| None | + **callback** | **optional.String**| None | + +### Return type + + (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestEnumParameters + +> TestEnumParameters(ctx, optional) + +To test enum parameters + +To test enum parameters + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***TestEnumParametersOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a TestEnumParametersOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**optional.Interface of []string**](string.md)| Header parameter enum test (string array) | + **enumHeaderString** | **optional.String**| Header parameter enum test (string) | [default to -efg] + **enumQueryStringArray** | [**optional.Interface of []string**](string.md)| Query parameter enum test (string array) | + **enumQueryString** | **optional.String**| Query parameter enum test (string) | [default to -efg] + **enumQueryInteger** | **optional.Int32**| Query parameter enum test (double) | + **enumQueryDouble** | **optional.Float64**| Query parameter enum test (double) | + **enumFormStringArray** | [**optional.Interface of []string**](string.md)| Form parameter enum test (string array) | [default to $] + **enumFormString** | **optional.String**| Form parameter enum test (string) | [default to -efg] + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestGroupParameters + +> TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, 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. +**requiredStringGroup** | **int32**| Required String in group parameters | +**requiredBooleanGroup** | **bool**| Required Boolean in group parameters | +**requiredInt64Group** | **int64**| Required Integer in group parameters | + **optional** | ***TestGroupParametersOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a TestGroupParametersOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **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 + +[bearer_test](../README.md#bearer_test) + +### 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 + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**requestBody** | [**map[string]string**](string.md)| request body | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestJsonFormData + +> TestJsonFormData(ctx, param, param2) + +test json serialization of form data + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**param** | **string**| field1 | +**param2** | **string**| field2 | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestQueryParameterCollectionFormat + +> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) + + + +To test the collection format in query parameters + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**pipe** | [**[]string**](string.md)| | +**ioutil** | [**[]string**](string.md)| | +**http** | [**[]string**](string.md)| | +**url** | [**[]string**](string.md)| | +**context** | [**[]string**](string.md)| | + +### 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) + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md new file mode 100644 index 0000000000..b070326cc3 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md @@ -0,0 +1,43 @@ +# \FakeClassnameTags123Api + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case + + + +## TestClassname + +> Client TestClassname(ctx, client) + +To test class name in snake case + +To test class name in snake case + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**client** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md new file mode 100644 index 0000000000..454b159609 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md @@ -0,0 +1,39 @@ +# File + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SourceURI** | Pointer to **string** | Test capitalization | [optional] + +## Methods + +### GetSourceURI + +`func (o *File) GetSourceURI() string` + +GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. + +### GetSourceURIOk + +`func (o *File) GetSourceURIOk() (string, bool)` + +GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSourceURI + +`func (o *File) HasSourceURI() bool` + +HasSourceURI returns a boolean if a field has been set. + +### SetSourceURI + +`func (o *File) SetSourceURI(v string)` + +SetSourceURI gets a reference to the given string and assigns it to the SourceURI field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md new file mode 100644 index 0000000000..d4a4da7206 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md @@ -0,0 +1,65 @@ +# FileSchemaTestClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**File** | Pointer to [**File**](File.md) | | [optional] +**Files** | Pointer to [**[]File**](File.md) | | [optional] + +## Methods + +### GetFile + +`func (o *FileSchemaTestClass) GetFile() File` + +GetFile returns the File field if non-nil, zero value otherwise. + +### GetFileOk + +`func (o *FileSchemaTestClass) GetFileOk() (File, bool)` + +GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFile + +`func (o *FileSchemaTestClass) HasFile() bool` + +HasFile returns a boolean if a field has been set. + +### SetFile + +`func (o *FileSchemaTestClass) SetFile(v File)` + +SetFile gets a reference to the given File and assigns it to the File field. + +### GetFiles + +`func (o *FileSchemaTestClass) GetFiles() []File` + +GetFiles returns the Files field if non-nil, zero value otherwise. + +### GetFilesOk + +`func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool)` + +GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFiles + +`func (o *FileSchemaTestClass) HasFiles() bool` + +HasFiles returns a boolean if a field has been set. + +### SetFiles + +`func (o *FileSchemaTestClass) SetFiles(v []File)` + +SetFiles gets a reference to the given []File and assigns it to the Files field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md new file mode 100644 index 0000000000..82e3c253f2 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md @@ -0,0 +1,39 @@ +# Foo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bar** | Pointer to **string** | | [optional] [default to bar] + +## Methods + +### GetBar + +`func (o *Foo) GetBar() string` + +GetBar returns the Bar field if non-nil, zero value otherwise. + +### GetBarOk + +`func (o *Foo) GetBarOk() (string, bool)` + +GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBar + +`func (o *Foo) HasBar() bool` + +HasBar returns a boolean if a field has been set. + +### SetBar + +`func (o *Foo) SetBar(v string)` + +SetBar gets a reference to the given string and assigns it to the Bar field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md new file mode 100644 index 0000000000..861d7aa3eb --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md @@ -0,0 +1,403 @@ +# FormatTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | Pointer to **int32** | | [optional] +**Int32** | Pointer to **int32** | | [optional] +**Int64** | Pointer to **int64** | | [optional] +**Number** | Pointer to **float32** | | +**Float** | Pointer to **float32** | | [optional] +**Double** | Pointer to **float64** | | [optional] +**String** | Pointer to **string** | | [optional] +**Byte** | Pointer to **string** | | +**Binary** | Pointer to [***os.File**](*os.File.md) | | [optional] +**Date** | Pointer to **string** | | +**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Uuid** | Pointer to **string** | | [optional] +**Password** | Pointer to **string** | | +**PatternWithDigits** | Pointer to **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**PatternWithDigitsAndDelimiter** | Pointer to **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] + +## Methods + +### GetInteger + +`func (o *FormatTest) GetInteger() int32` + +GetInteger returns the Integer field if non-nil, zero value otherwise. + +### GetIntegerOk + +`func (o *FormatTest) GetIntegerOk() (int32, bool)` + +GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInteger + +`func (o *FormatTest) HasInteger() bool` + +HasInteger returns a boolean if a field has been set. + +### SetInteger + +`func (o *FormatTest) SetInteger(v int32)` + +SetInteger gets a reference to the given int32 and assigns it to the Integer field. + +### GetInt32 + +`func (o *FormatTest) GetInt32() int32` + +GetInt32 returns the Int32 field if non-nil, zero value otherwise. + +### GetInt32Ok + +`func (o *FormatTest) GetInt32Ok() (int32, bool)` + +GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInt32 + +`func (o *FormatTest) HasInt32() bool` + +HasInt32 returns a boolean if a field has been set. + +### SetInt32 + +`func (o *FormatTest) SetInt32(v int32)` + +SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. + +### GetInt64 + +`func (o *FormatTest) GetInt64() int64` + +GetInt64 returns the Int64 field if non-nil, zero value otherwise. + +### GetInt64Ok + +`func (o *FormatTest) GetInt64Ok() (int64, bool)` + +GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInt64 + +`func (o *FormatTest) HasInt64() bool` + +HasInt64 returns a boolean if a field has been set. + +### SetInt64 + +`func (o *FormatTest) SetInt64(v int64)` + +SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. + +### GetNumber + +`func (o *FormatTest) GetNumber() float32` + +GetNumber returns the Number field if non-nil, zero value otherwise. + +### GetNumberOk + +`func (o *FormatTest) GetNumberOk() (float32, bool)` + +GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNumber + +`func (o *FormatTest) HasNumber() bool` + +HasNumber returns a boolean if a field has been set. + +### SetNumber + +`func (o *FormatTest) SetNumber(v float32)` + +SetNumber gets a reference to the given float32 and assigns it to the Number field. + +### GetFloat + +`func (o *FormatTest) GetFloat() float32` + +GetFloat returns the Float field if non-nil, zero value otherwise. + +### GetFloatOk + +`func (o *FormatTest) GetFloatOk() (float32, bool)` + +GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFloat + +`func (o *FormatTest) HasFloat() bool` + +HasFloat returns a boolean if a field has been set. + +### SetFloat + +`func (o *FormatTest) SetFloat(v float32)` + +SetFloat gets a reference to the given float32 and assigns it to the Float field. + +### GetDouble + +`func (o *FormatTest) GetDouble() float64` + +GetDouble returns the Double field if non-nil, zero value otherwise. + +### GetDoubleOk + +`func (o *FormatTest) GetDoubleOk() (float64, bool)` + +GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDouble + +`func (o *FormatTest) HasDouble() bool` + +HasDouble returns a boolean if a field has been set. + +### SetDouble + +`func (o *FormatTest) SetDouble(v float64)` + +SetDouble gets a reference to the given float64 and assigns it to the Double field. + +### GetString + +`func (o *FormatTest) GetString() string` + +GetString returns the String field if non-nil, zero value otherwise. + +### GetStringOk + +`func (o *FormatTest) GetStringOk() (string, bool)` + +GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasString + +`func (o *FormatTest) HasString() bool` + +HasString returns a boolean if a field has been set. + +### SetString + +`func (o *FormatTest) SetString(v string)` + +SetString gets a reference to the given string and assigns it to the String field. + +### GetByte + +`func (o *FormatTest) GetByte() string` + +GetByte returns the Byte field if non-nil, zero value otherwise. + +### GetByteOk + +`func (o *FormatTest) GetByteOk() (string, bool)` + +GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasByte + +`func (o *FormatTest) HasByte() bool` + +HasByte returns a boolean if a field has been set. + +### SetByte + +`func (o *FormatTest) SetByte(v string)` + +SetByte gets a reference to the given string and assigns it to the Byte field. + +### GetBinary + +`func (o *FormatTest) GetBinary() *os.File` + +GetBinary returns the Binary field if non-nil, zero value otherwise. + +### GetBinaryOk + +`func (o *FormatTest) GetBinaryOk() (*os.File, bool)` + +GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBinary + +`func (o *FormatTest) HasBinary() bool` + +HasBinary returns a boolean if a field has been set. + +### SetBinary + +`func (o *FormatTest) SetBinary(v *os.File)` + +SetBinary gets a reference to the given *os.File and assigns it to the Binary field. + +### GetDate + +`func (o *FormatTest) GetDate() string` + +GetDate returns the Date field if non-nil, zero value otherwise. + +### GetDateOk + +`func (o *FormatTest) GetDateOk() (string, bool)` + +GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDate + +`func (o *FormatTest) HasDate() bool` + +HasDate returns a boolean if a field has been set. + +### SetDate + +`func (o *FormatTest) SetDate(v string)` + +SetDate gets a reference to the given string and assigns it to the Date field. + +### GetDateTime + +`func (o *FormatTest) GetDateTime() time.Time` + +GetDateTime returns the DateTime field if non-nil, zero value otherwise. + +### GetDateTimeOk + +`func (o *FormatTest) GetDateTimeOk() (time.Time, bool)` + +GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDateTime + +`func (o *FormatTest) HasDateTime() bool` + +HasDateTime returns a boolean if a field has been set. + +### SetDateTime + +`func (o *FormatTest) SetDateTime(v time.Time)` + +SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. + +### GetUuid + +`func (o *FormatTest) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *FormatTest) GetUuidOk() (string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUuid + +`func (o *FormatTest) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### SetUuid + +`func (o *FormatTest) SetUuid(v string)` + +SetUuid gets a reference to the given string and assigns it to the Uuid field. + +### GetPassword + +`func (o *FormatTest) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *FormatTest) GetPasswordOk() (string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPassword + +`func (o *FormatTest) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### SetPassword + +`func (o *FormatTest) SetPassword(v string)` + +SetPassword gets a reference to the given string and assigns it to the Password field. + +### GetPatternWithDigits + +`func (o *FormatTest) GetPatternWithDigits() string` + +GetPatternWithDigits returns the PatternWithDigits field if non-nil, zero value otherwise. + +### GetPatternWithDigitsOk + +`func (o *FormatTest) GetPatternWithDigitsOk() (string, bool)` + +GetPatternWithDigitsOk returns a tuple with the PatternWithDigits field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPatternWithDigits + +`func (o *FormatTest) HasPatternWithDigits() bool` + +HasPatternWithDigits returns a boolean if a field has been set. + +### SetPatternWithDigits + +`func (o *FormatTest) SetPatternWithDigits(v string)` + +SetPatternWithDigits gets a reference to the given string and assigns it to the PatternWithDigits field. + +### GetPatternWithDigitsAndDelimiter + +`func (o *FormatTest) GetPatternWithDigitsAndDelimiter() string` + +GetPatternWithDigitsAndDelimiter returns the PatternWithDigitsAndDelimiter field if non-nil, zero value otherwise. + +### GetPatternWithDigitsAndDelimiterOk + +`func (o *FormatTest) GetPatternWithDigitsAndDelimiterOk() (string, bool)` + +GetPatternWithDigitsAndDelimiterOk returns a tuple with the PatternWithDigitsAndDelimiter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPatternWithDigitsAndDelimiter + +`func (o *FormatTest) HasPatternWithDigitsAndDelimiter() bool` + +HasPatternWithDigitsAndDelimiter returns a boolean if a field has been set. + +### SetPatternWithDigitsAndDelimiter + +`func (o *FormatTest) SetPatternWithDigitsAndDelimiter(v string)` + +SetPatternWithDigitsAndDelimiter gets a reference to the given string and assigns it to the PatternWithDigitsAndDelimiter field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md new file mode 100644 index 0000000000..b5502272ce --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md @@ -0,0 +1,65 @@ +# HasOnlyReadOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bar** | Pointer to **string** | | [optional] [readonly] +**Foo** | Pointer to **string** | | [optional] [readonly] + +## Methods + +### GetBar + +`func (o *HasOnlyReadOnly) GetBar() string` + +GetBar returns the Bar field if non-nil, zero value otherwise. + +### GetBarOk + +`func (o *HasOnlyReadOnly) GetBarOk() (string, bool)` + +GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBar + +`func (o *HasOnlyReadOnly) HasBar() bool` + +HasBar returns a boolean if a field has been set. + +### SetBar + +`func (o *HasOnlyReadOnly) SetBar(v string)` + +SetBar gets a reference to the given string and assigns it to the Bar field. + +### GetFoo + +`func (o *HasOnlyReadOnly) GetFoo() string` + +GetFoo returns the Foo field if non-nil, zero value otherwise. + +### GetFooOk + +`func (o *HasOnlyReadOnly) GetFooOk() (string, bool)` + +GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFoo + +`func (o *HasOnlyReadOnly) HasFoo() bool` + +HasFoo returns a boolean if a field has been set. + +### SetFoo + +`func (o *HasOnlyReadOnly) SetFoo(v string)` + +SetFoo gets a reference to the given string and assigns it to the Foo field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md new file mode 100644 index 0000000000..63f7a2fa84 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md @@ -0,0 +1,46 @@ +# HealthCheckResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NullableMessage** | Pointer to **string** | | [optional] + +## Methods + +### GetNullableMessage + +`func (o *HealthCheckResult) GetNullableMessage() string` + +GetNullableMessage returns the NullableMessage field if non-nil, zero value otherwise. + +### GetNullableMessageOk + +`func (o *HealthCheckResult) GetNullableMessageOk() (string, bool)` + +GetNullableMessageOk returns a tuple with the NullableMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNullableMessage + +`func (o *HealthCheckResult) HasNullableMessage() bool` + +HasNullableMessage returns a boolean if a field has been set. + +### SetNullableMessage + +`func (o *HealthCheckResult) SetNullableMessage(v string)` + +SetNullableMessage gets a reference to the given string and assigns it to the NullableMessage field. + +### SetNullableMessageExplicitNull + +`func (o *HealthCheckResult) SetNullableMessageExplicitNull(b bool)` + +SetNullableMessageExplicitNull (un)sets NullableMessage to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The NullableMessage value is set to nil even if false is passed + +[[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/go-experimental/go-petstore/docs/InlineObject.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject.md new file mode 100644 index 0000000000..0c93a8999a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject.md @@ -0,0 +1,65 @@ +# InlineObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Updated name of the pet | [optional] +**Status** | Pointer to **string** | Updated status of the pet | [optional] + +## Methods + +### GetName + +`func (o *InlineObject) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *InlineObject) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *InlineObject) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *InlineObject) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetStatus + +`func (o *InlineObject) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *InlineObject) GetStatusOk() (string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStatus + +`func (o *InlineObject) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatus + +`func (o *InlineObject) SetStatus(v string)` + +SetStatus gets a reference to the given string and assigns it to the Status field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md new file mode 100644 index 0000000000..f30ef94a83 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md @@ -0,0 +1,65 @@ +# InlineObject1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdditionalMetadata** | Pointer to **string** | Additional data to pass to server | [optional] +**File** | Pointer to [***os.File**](*os.File.md) | file to upload | [optional] + +## Methods + +### GetAdditionalMetadata + +`func (o *InlineObject1) GetAdditionalMetadata() string` + +GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero value otherwise. + +### GetAdditionalMetadataOk + +`func (o *InlineObject1) GetAdditionalMetadataOk() (string, bool)` + +GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAdditionalMetadata + +`func (o *InlineObject1) HasAdditionalMetadata() bool` + +HasAdditionalMetadata returns a boolean if a field has been set. + +### SetAdditionalMetadata + +`func (o *InlineObject1) SetAdditionalMetadata(v string)` + +SetAdditionalMetadata gets a reference to the given string and assigns it to the AdditionalMetadata field. + +### GetFile + +`func (o *InlineObject1) GetFile() *os.File` + +GetFile returns the File field if non-nil, zero value otherwise. + +### GetFileOk + +`func (o *InlineObject1) GetFileOk() (*os.File, bool)` + +GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFile + +`func (o *InlineObject1) HasFile() bool` + +HasFile returns a boolean if a field has been set. + +### SetFile + +`func (o *InlineObject1) SetFile(v *os.File)` + +SetFile gets a reference to the given *os.File and assigns it to the File field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md new file mode 100644 index 0000000000..62a7142a4d --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md @@ -0,0 +1,65 @@ +# InlineObject2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumFormStringArray** | Pointer to **[]string** | Form parameter enum test (string array) | [optional] +**EnumFormString** | Pointer to **string** | Form parameter enum test (string) | [optional] [default to ENUM_FORM_STRING_EFG] + +## Methods + +### GetEnumFormStringArray + +`func (o *InlineObject2) GetEnumFormStringArray() []string` + +GetEnumFormStringArray returns the EnumFormStringArray field if non-nil, zero value otherwise. + +### GetEnumFormStringArrayOk + +`func (o *InlineObject2) GetEnumFormStringArrayOk() ([]string, bool)` + +GetEnumFormStringArrayOk returns a tuple with the EnumFormStringArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumFormStringArray + +`func (o *InlineObject2) HasEnumFormStringArray() bool` + +HasEnumFormStringArray returns a boolean if a field has been set. + +### SetEnumFormStringArray + +`func (o *InlineObject2) SetEnumFormStringArray(v []string)` + +SetEnumFormStringArray gets a reference to the given []string and assigns it to the EnumFormStringArray field. + +### GetEnumFormString + +`func (o *InlineObject2) GetEnumFormString() string` + +GetEnumFormString returns the EnumFormString field if non-nil, zero value otherwise. + +### GetEnumFormStringOk + +`func (o *InlineObject2) GetEnumFormStringOk() (string, bool)` + +GetEnumFormStringOk returns a tuple with the EnumFormString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumFormString + +`func (o *InlineObject2) HasEnumFormString() bool` + +HasEnumFormString returns a boolean if a field has been set. + +### SetEnumFormString + +`func (o *InlineObject2) SetEnumFormString(v string)` + +SetEnumFormString gets a reference to the given string and assigns it to the EnumFormString field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md new file mode 100644 index 0000000000..911b0ffb91 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md @@ -0,0 +1,377 @@ +# InlineObject3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | Pointer to **int32** | None | [optional] +**Int32** | Pointer to **int32** | None | [optional] +**Int64** | Pointer to **int64** | None | [optional] +**Number** | Pointer to **float32** | None | +**Float** | Pointer to **float32** | None | [optional] +**Double** | Pointer to **float64** | None | +**String** | Pointer to **string** | None | [optional] +**PatternWithoutDelimiter** | Pointer to **string** | None | +**Byte** | Pointer to **string** | None | +**Binary** | Pointer to [***os.File**](*os.File.md) | None | [optional] +**Date** | Pointer to **string** | None | [optional] +**DateTime** | Pointer to [**time.Time**](time.Time.md) | None | [optional] +**Password** | Pointer to **string** | None | [optional] +**Callback** | Pointer to **string** | None | [optional] + +## Methods + +### GetInteger + +`func (o *InlineObject3) GetInteger() int32` + +GetInteger returns the Integer field if non-nil, zero value otherwise. + +### GetIntegerOk + +`func (o *InlineObject3) GetIntegerOk() (int32, bool)` + +GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInteger + +`func (o *InlineObject3) HasInteger() bool` + +HasInteger returns a boolean if a field has been set. + +### SetInteger + +`func (o *InlineObject3) SetInteger(v int32)` + +SetInteger gets a reference to the given int32 and assigns it to the Integer field. + +### GetInt32 + +`func (o *InlineObject3) GetInt32() int32` + +GetInt32 returns the Int32 field if non-nil, zero value otherwise. + +### GetInt32Ok + +`func (o *InlineObject3) GetInt32Ok() (int32, bool)` + +GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInt32 + +`func (o *InlineObject3) HasInt32() bool` + +HasInt32 returns a boolean if a field has been set. + +### SetInt32 + +`func (o *InlineObject3) SetInt32(v int32)` + +SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. + +### GetInt64 + +`func (o *InlineObject3) GetInt64() int64` + +GetInt64 returns the Int64 field if non-nil, zero value otherwise. + +### GetInt64Ok + +`func (o *InlineObject3) GetInt64Ok() (int64, bool)` + +GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInt64 + +`func (o *InlineObject3) HasInt64() bool` + +HasInt64 returns a boolean if a field has been set. + +### SetInt64 + +`func (o *InlineObject3) SetInt64(v int64)` + +SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. + +### GetNumber + +`func (o *InlineObject3) GetNumber() float32` + +GetNumber returns the Number field if non-nil, zero value otherwise. + +### GetNumberOk + +`func (o *InlineObject3) GetNumberOk() (float32, bool)` + +GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNumber + +`func (o *InlineObject3) HasNumber() bool` + +HasNumber returns a boolean if a field has been set. + +### SetNumber + +`func (o *InlineObject3) SetNumber(v float32)` + +SetNumber gets a reference to the given float32 and assigns it to the Number field. + +### GetFloat + +`func (o *InlineObject3) GetFloat() float32` + +GetFloat returns the Float field if non-nil, zero value otherwise. + +### GetFloatOk + +`func (o *InlineObject3) GetFloatOk() (float32, bool)` + +GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFloat + +`func (o *InlineObject3) HasFloat() bool` + +HasFloat returns a boolean if a field has been set. + +### SetFloat + +`func (o *InlineObject3) SetFloat(v float32)` + +SetFloat gets a reference to the given float32 and assigns it to the Float field. + +### GetDouble + +`func (o *InlineObject3) GetDouble() float64` + +GetDouble returns the Double field if non-nil, zero value otherwise. + +### GetDoubleOk + +`func (o *InlineObject3) GetDoubleOk() (float64, bool)` + +GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDouble + +`func (o *InlineObject3) HasDouble() bool` + +HasDouble returns a boolean if a field has been set. + +### SetDouble + +`func (o *InlineObject3) SetDouble(v float64)` + +SetDouble gets a reference to the given float64 and assigns it to the Double field. + +### GetString + +`func (o *InlineObject3) GetString() string` + +GetString returns the String field if non-nil, zero value otherwise. + +### GetStringOk + +`func (o *InlineObject3) GetStringOk() (string, bool)` + +GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasString + +`func (o *InlineObject3) HasString() bool` + +HasString returns a boolean if a field has been set. + +### SetString + +`func (o *InlineObject3) SetString(v string)` + +SetString gets a reference to the given string and assigns it to the String field. + +### GetPatternWithoutDelimiter + +`func (o *InlineObject3) GetPatternWithoutDelimiter() string` + +GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field if non-nil, zero value otherwise. + +### GetPatternWithoutDelimiterOk + +`func (o *InlineObject3) GetPatternWithoutDelimiterOk() (string, bool)` + +GetPatternWithoutDelimiterOk returns a tuple with the PatternWithoutDelimiter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPatternWithoutDelimiter + +`func (o *InlineObject3) HasPatternWithoutDelimiter() bool` + +HasPatternWithoutDelimiter returns a boolean if a field has been set. + +### SetPatternWithoutDelimiter + +`func (o *InlineObject3) SetPatternWithoutDelimiter(v string)` + +SetPatternWithoutDelimiter gets a reference to the given string and assigns it to the PatternWithoutDelimiter field. + +### GetByte + +`func (o *InlineObject3) GetByte() string` + +GetByte returns the Byte field if non-nil, zero value otherwise. + +### GetByteOk + +`func (o *InlineObject3) GetByteOk() (string, bool)` + +GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasByte + +`func (o *InlineObject3) HasByte() bool` + +HasByte returns a boolean if a field has been set. + +### SetByte + +`func (o *InlineObject3) SetByte(v string)` + +SetByte gets a reference to the given string and assigns it to the Byte field. + +### GetBinary + +`func (o *InlineObject3) GetBinary() *os.File` + +GetBinary returns the Binary field if non-nil, zero value otherwise. + +### GetBinaryOk + +`func (o *InlineObject3) GetBinaryOk() (*os.File, bool)` + +GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBinary + +`func (o *InlineObject3) HasBinary() bool` + +HasBinary returns a boolean if a field has been set. + +### SetBinary + +`func (o *InlineObject3) SetBinary(v *os.File)` + +SetBinary gets a reference to the given *os.File and assigns it to the Binary field. + +### GetDate + +`func (o *InlineObject3) GetDate() string` + +GetDate returns the Date field if non-nil, zero value otherwise. + +### GetDateOk + +`func (o *InlineObject3) GetDateOk() (string, bool)` + +GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDate + +`func (o *InlineObject3) HasDate() bool` + +HasDate returns a boolean if a field has been set. + +### SetDate + +`func (o *InlineObject3) SetDate(v string)` + +SetDate gets a reference to the given string and assigns it to the Date field. + +### GetDateTime + +`func (o *InlineObject3) GetDateTime() time.Time` + +GetDateTime returns the DateTime field if non-nil, zero value otherwise. + +### GetDateTimeOk + +`func (o *InlineObject3) GetDateTimeOk() (time.Time, bool)` + +GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDateTime + +`func (o *InlineObject3) HasDateTime() bool` + +HasDateTime returns a boolean if a field has been set. + +### SetDateTime + +`func (o *InlineObject3) SetDateTime(v time.Time)` + +SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. + +### GetPassword + +`func (o *InlineObject3) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *InlineObject3) GetPasswordOk() (string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPassword + +`func (o *InlineObject3) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### SetPassword + +`func (o *InlineObject3) SetPassword(v string)` + +SetPassword gets a reference to the given string and assigns it to the Password field. + +### GetCallback + +`func (o *InlineObject3) GetCallback() string` + +GetCallback returns the Callback field if non-nil, zero value otherwise. + +### GetCallbackOk + +`func (o *InlineObject3) GetCallbackOk() (string, bool)` + +GetCallbackOk returns a tuple with the Callback field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCallback + +`func (o *InlineObject3) HasCallback() bool` + +HasCallback returns a boolean if a field has been set. + +### SetCallback + +`func (o *InlineObject3) SetCallback(v string)` + +SetCallback gets a reference to the given string and assigns it to the Callback field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md new file mode 100644 index 0000000000..8316407b65 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md @@ -0,0 +1,65 @@ +# InlineObject4 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Param** | Pointer to **string** | field1 | +**Param2** | Pointer to **string** | field2 | + +## Methods + +### GetParam + +`func (o *InlineObject4) GetParam() string` + +GetParam returns the Param field if non-nil, zero value otherwise. + +### GetParamOk + +`func (o *InlineObject4) GetParamOk() (string, bool)` + +GetParamOk returns a tuple with the Param field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasParam + +`func (o *InlineObject4) HasParam() bool` + +HasParam returns a boolean if a field has been set. + +### SetParam + +`func (o *InlineObject4) SetParam(v string)` + +SetParam gets a reference to the given string and assigns it to the Param field. + +### GetParam2 + +`func (o *InlineObject4) GetParam2() string` + +GetParam2 returns the Param2 field if non-nil, zero value otherwise. + +### GetParam2Ok + +`func (o *InlineObject4) GetParam2Ok() (string, bool)` + +GetParam2Ok returns a tuple with the Param2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasParam2 + +`func (o *InlineObject4) HasParam2() bool` + +HasParam2 returns a boolean if a field has been set. + +### SetParam2 + +`func (o *InlineObject4) SetParam2(v string)` + +SetParam2 gets a reference to the given string and assigns it to the Param2 field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md new file mode 100644 index 0000000000..24aa799df3 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md @@ -0,0 +1,65 @@ +# InlineObject5 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdditionalMetadata** | Pointer to **string** | Additional data to pass to server | [optional] +**RequiredFile** | Pointer to [***os.File**](*os.File.md) | file to upload | + +## Methods + +### GetAdditionalMetadata + +`func (o *InlineObject5) GetAdditionalMetadata() string` + +GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero value otherwise. + +### GetAdditionalMetadataOk + +`func (o *InlineObject5) GetAdditionalMetadataOk() (string, bool)` + +GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAdditionalMetadata + +`func (o *InlineObject5) HasAdditionalMetadata() bool` + +HasAdditionalMetadata returns a boolean if a field has been set. + +### SetAdditionalMetadata + +`func (o *InlineObject5) SetAdditionalMetadata(v string)` + +SetAdditionalMetadata gets a reference to the given string and assigns it to the AdditionalMetadata field. + +### GetRequiredFile + +`func (o *InlineObject5) GetRequiredFile() *os.File` + +GetRequiredFile returns the RequiredFile field if non-nil, zero value otherwise. + +### GetRequiredFileOk + +`func (o *InlineObject5) GetRequiredFileOk() (*os.File, bool)` + +GetRequiredFileOk returns a tuple with the RequiredFile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasRequiredFile + +`func (o *InlineObject5) HasRequiredFile() bool` + +HasRequiredFile returns a boolean if a field has been set. + +### SetRequiredFile + +`func (o *InlineObject5) SetRequiredFile(v *os.File)` + +SetRequiredFile gets a reference to the given *os.File and assigns it to the RequiredFile field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md new file mode 100644 index 0000000000..714067d561 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md @@ -0,0 +1,39 @@ +# InlineResponseDefault + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**String** | Pointer to [**Foo**](Foo.md) | | [optional] + +## Methods + +### GetString + +`func (o *InlineResponseDefault) GetString() Foo` + +GetString returns the String field if non-nil, zero value otherwise. + +### GetStringOk + +`func (o *InlineResponseDefault) GetStringOk() (Foo, bool)` + +GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasString + +`func (o *InlineResponseDefault) HasString() bool` + +HasString returns a boolean if a field has been set. + +### SetString + +`func (o *InlineResponseDefault) SetString(v Foo)` + +SetString gets a reference to the given Foo and assigns it to the String field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md new file mode 100644 index 0000000000..ca8849936e --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md @@ -0,0 +1,39 @@ +# List + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Var123List** | Pointer to **string** | | [optional] + +## Methods + +### GetVar123List + +`func (o *List) GetVar123List() string` + +GetVar123List returns the Var123List field if non-nil, zero value otherwise. + +### GetVar123ListOk + +`func (o *List) GetVar123ListOk() (string, bool)` + +GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasVar123List + +`func (o *List) HasVar123List() bool` + +HasVar123List returns a boolean if a field has been set. + +### SetVar123List + +`func (o *List) SetVar123List(v string)` + +SetVar123List gets a reference to the given string and assigns it to the Var123List field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md new file mode 100644 index 0000000000..6c84c2e89c --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md @@ -0,0 +1,117 @@ +# MapTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MapMapOfString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] +**MapOfEnumString** | Pointer to **map[string]string** | | [optional] +**DirectMap** | Pointer to **map[string]bool** | | [optional] +**IndirectMap** | Pointer to **map[string]bool** | | [optional] + +## Methods + +### GetMapMapOfString + +`func (o *MapTest) GetMapMapOfString() map[string]map[string]string` + +GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise. + +### GetMapMapOfStringOk + +`func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool)` + +GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapMapOfString + +`func (o *MapTest) HasMapMapOfString() bool` + +HasMapMapOfString returns a boolean if a field has been set. + +### SetMapMapOfString + +`func (o *MapTest) SetMapMapOfString(v map[string]map[string]string)` + +SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field. + +### GetMapOfEnumString + +`func (o *MapTest) GetMapOfEnumString() map[string]string` + +GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise. + +### GetMapOfEnumStringOk + +`func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool)` + +GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapOfEnumString + +`func (o *MapTest) HasMapOfEnumString() bool` + +HasMapOfEnumString returns a boolean if a field has been set. + +### SetMapOfEnumString + +`func (o *MapTest) SetMapOfEnumString(v map[string]string)` + +SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field. + +### GetDirectMap + +`func (o *MapTest) GetDirectMap() map[string]bool` + +GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. + +### GetDirectMapOk + +`func (o *MapTest) GetDirectMapOk() (map[string]bool, bool)` + +GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDirectMap + +`func (o *MapTest) HasDirectMap() bool` + +HasDirectMap returns a boolean if a field has been set. + +### SetDirectMap + +`func (o *MapTest) SetDirectMap(v map[string]bool)` + +SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field. + +### GetIndirectMap + +`func (o *MapTest) GetIndirectMap() map[string]bool` + +GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. + +### GetIndirectMapOk + +`func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool)` + +GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasIndirectMap + +`func (o *MapTest) HasIndirectMap() bool` + +HasIndirectMap returns a boolean if a field has been set. + +### SetIndirectMap + +`func (o *MapTest) SetIndirectMap(v map[string]bool)` + +SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 0000000000..49f7c8eb76 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,91 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | Pointer to **string** | | [optional] +**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Map** | Pointer to [**map[string]Animal**](Animal.md) | | [optional] + +## Methods + +### GetUuid + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUuid + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### SetUuid + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)` + +SetUuid gets a reference to the given string and assigns it to the Uuid field. + +### GetDateTime + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time` + +GetDateTime returns the DateTime field if non-nil, zero value otherwise. + +### GetDateTimeOk + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool)` + +GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDateTime + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool` + +HasDateTime returns a boolean if a field has been set. + +### SetDateTime + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time)` + +SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. + +### GetMap + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal` + +GetMap returns the Map field if non-nil, zero value otherwise. + +### GetMapOk + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool)` + +GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMap + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool` + +HasMap returns a boolean if a field has been set. + +### SetMap + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal)` + +SetMap gets a reference to the given map[string]Animal and assigns it to the Map field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md new file mode 100644 index 0000000000..d0bde7b7f7 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md @@ -0,0 +1,65 @@ +# Model200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **int32** | | [optional] +**Class** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *Model200Response) GetName() int32` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Model200Response) GetNameOk() (int32, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Model200Response) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Model200Response) SetName(v int32)` + +SetName gets a reference to the given int32 and assigns it to the Name field. + +### GetClass + +`func (o *Model200Response) GetClass() string` + +GetClass returns the Class field if non-nil, zero value otherwise. + +### GetClassOk + +`func (o *Model200Response) GetClassOk() (string, bool)` + +GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClass + +`func (o *Model200Response) HasClass() bool` + +HasClass returns a boolean if a field has been set. + +### SetClass + +`func (o *Model200Response) SetClass(v string)` + +SetClass gets a reference to the given string and assigns it to the Class field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md new file mode 100644 index 0000000000..6104c42beb --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md @@ -0,0 +1,117 @@ +# Name + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **int32** | | +**SnakeCase** | Pointer to **int32** | | [optional] [readonly] +**Property** | Pointer to **string** | | [optional] +**Var123Number** | Pointer to **int32** | | [optional] [readonly] + +## Methods + +### GetName + +`func (o *Name) GetName() int32` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Name) GetNameOk() (int32, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Name) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Name) SetName(v int32)` + +SetName gets a reference to the given int32 and assigns it to the Name field. + +### GetSnakeCase + +`func (o *Name) GetSnakeCase() int32` + +GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. + +### GetSnakeCaseOk + +`func (o *Name) GetSnakeCaseOk() (int32, bool)` + +GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSnakeCase + +`func (o *Name) HasSnakeCase() bool` + +HasSnakeCase returns a boolean if a field has been set. + +### SetSnakeCase + +`func (o *Name) SetSnakeCase(v int32)` + +SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field. + +### GetProperty + +`func (o *Name) GetProperty() string` + +GetProperty returns the Property field if non-nil, zero value otherwise. + +### GetPropertyOk + +`func (o *Name) GetPropertyOk() (string, bool)` + +GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProperty + +`func (o *Name) HasProperty() bool` + +HasProperty returns a boolean if a field has been set. + +### SetProperty + +`func (o *Name) SetProperty(v string)` + +SetProperty gets a reference to the given string and assigns it to the Property field. + +### GetVar123Number + +`func (o *Name) GetVar123Number() int32` + +GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. + +### GetVar123NumberOk + +`func (o *Name) GetVar123NumberOk() (int32, bool)` + +GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasVar123Number + +`func (o *Name) HasVar123Number() bool` + +HasVar123Number returns a boolean if a field has been set. + +### SetVar123Number + +`func (o *Name) SetVar123Number(v int32)` + +SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md new file mode 100644 index 0000000000..65067eda2a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md @@ -0,0 +1,395 @@ +# NullableClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IntegerProp** | Pointer to **int32** | | [optional] +**NumberProp** | Pointer to **float32** | | [optional] +**BooleanProp** | Pointer to **bool** | | [optional] +**StringProp** | Pointer to **string** | | [optional] +**DateProp** | Pointer to **string** | | [optional] +**DatetimeProp** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**ArrayNullableProp** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional] +**ArrayAndItemsNullableProp** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional] +**ArrayItemsNullable** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional] +**ObjectNullableProp** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional] +**ObjectAndItemsNullableProp** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional] +**ObjectItemsNullable** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional] + +## Methods + +### GetIntegerProp + +`func (o *NullableClass) GetIntegerProp() int32` + +GetIntegerProp returns the IntegerProp field if non-nil, zero value otherwise. + +### GetIntegerPropOk + +`func (o *NullableClass) GetIntegerPropOk() (int32, bool)` + +GetIntegerPropOk returns a tuple with the IntegerProp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasIntegerProp + +`func (o *NullableClass) HasIntegerProp() bool` + +HasIntegerProp returns a boolean if a field has been set. + +### SetIntegerProp + +`func (o *NullableClass) SetIntegerProp(v int32)` + +SetIntegerProp gets a reference to the given int32 and assigns it to the IntegerProp field. + +### SetIntegerPropExplicitNull + +`func (o *NullableClass) SetIntegerPropExplicitNull(b bool)` + +SetIntegerPropExplicitNull (un)sets IntegerProp to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The IntegerProp value is set to nil even if false is passed +### GetNumberProp + +`func (o *NullableClass) GetNumberProp() float32` + +GetNumberProp returns the NumberProp field if non-nil, zero value otherwise. + +### GetNumberPropOk + +`func (o *NullableClass) GetNumberPropOk() (float32, bool)` + +GetNumberPropOk returns a tuple with the NumberProp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNumberProp + +`func (o *NullableClass) HasNumberProp() bool` + +HasNumberProp returns a boolean if a field has been set. + +### SetNumberProp + +`func (o *NullableClass) SetNumberProp(v float32)` + +SetNumberProp gets a reference to the given float32 and assigns it to the NumberProp field. + +### SetNumberPropExplicitNull + +`func (o *NullableClass) SetNumberPropExplicitNull(b bool)` + +SetNumberPropExplicitNull (un)sets NumberProp to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The NumberProp value is set to nil even if false is passed +### GetBooleanProp + +`func (o *NullableClass) GetBooleanProp() bool` + +GetBooleanProp returns the BooleanProp field if non-nil, zero value otherwise. + +### GetBooleanPropOk + +`func (o *NullableClass) GetBooleanPropOk() (bool, bool)` + +GetBooleanPropOk returns a tuple with the BooleanProp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBooleanProp + +`func (o *NullableClass) HasBooleanProp() bool` + +HasBooleanProp returns a boolean if a field has been set. + +### SetBooleanProp + +`func (o *NullableClass) SetBooleanProp(v bool)` + +SetBooleanProp gets a reference to the given bool and assigns it to the BooleanProp field. + +### SetBooleanPropExplicitNull + +`func (o *NullableClass) SetBooleanPropExplicitNull(b bool)` + +SetBooleanPropExplicitNull (un)sets BooleanProp to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The BooleanProp value is set to nil even if false is passed +### GetStringProp + +`func (o *NullableClass) GetStringProp() string` + +GetStringProp returns the StringProp field if non-nil, zero value otherwise. + +### GetStringPropOk + +`func (o *NullableClass) GetStringPropOk() (string, bool)` + +GetStringPropOk returns a tuple with the StringProp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStringProp + +`func (o *NullableClass) HasStringProp() bool` + +HasStringProp returns a boolean if a field has been set. + +### SetStringProp + +`func (o *NullableClass) SetStringProp(v string)` + +SetStringProp gets a reference to the given string and assigns it to the StringProp field. + +### SetStringPropExplicitNull + +`func (o *NullableClass) SetStringPropExplicitNull(b bool)` + +SetStringPropExplicitNull (un)sets StringProp to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The StringProp value is set to nil even if false is passed +### GetDateProp + +`func (o *NullableClass) GetDateProp() string` + +GetDateProp returns the DateProp field if non-nil, zero value otherwise. + +### GetDatePropOk + +`func (o *NullableClass) GetDatePropOk() (string, bool)` + +GetDatePropOk returns a tuple with the DateProp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDateProp + +`func (o *NullableClass) HasDateProp() bool` + +HasDateProp returns a boolean if a field has been set. + +### SetDateProp + +`func (o *NullableClass) SetDateProp(v string)` + +SetDateProp gets a reference to the given string and assigns it to the DateProp field. + +### SetDatePropExplicitNull + +`func (o *NullableClass) SetDatePropExplicitNull(b bool)` + +SetDatePropExplicitNull (un)sets DateProp to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The DateProp value is set to nil even if false is passed +### GetDatetimeProp + +`func (o *NullableClass) GetDatetimeProp() time.Time` + +GetDatetimeProp returns the DatetimeProp field if non-nil, zero value otherwise. + +### GetDatetimePropOk + +`func (o *NullableClass) GetDatetimePropOk() (time.Time, bool)` + +GetDatetimePropOk returns a tuple with the DatetimeProp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDatetimeProp + +`func (o *NullableClass) HasDatetimeProp() bool` + +HasDatetimeProp returns a boolean if a field has been set. + +### SetDatetimeProp + +`func (o *NullableClass) SetDatetimeProp(v time.Time)` + +SetDatetimeProp gets a reference to the given time.Time and assigns it to the DatetimeProp field. + +### SetDatetimePropExplicitNull + +`func (o *NullableClass) SetDatetimePropExplicitNull(b bool)` + +SetDatetimePropExplicitNull (un)sets DatetimeProp to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The DatetimeProp value is set to nil even if false is passed +### GetArrayNullableProp + +`func (o *NullableClass) GetArrayNullableProp() []map[string]interface{}` + +GetArrayNullableProp returns the ArrayNullableProp field if non-nil, zero value otherwise. + +### GetArrayNullablePropOk + +`func (o *NullableClass) GetArrayNullablePropOk() ([]map[string]interface{}, bool)` + +GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayNullableProp + +`func (o *NullableClass) HasArrayNullableProp() bool` + +HasArrayNullableProp returns a boolean if a field has been set. + +### SetArrayNullableProp + +`func (o *NullableClass) SetArrayNullableProp(v []map[string]interface{})` + +SetArrayNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayNullableProp field. + +### SetArrayNullablePropExplicitNull + +`func (o *NullableClass) SetArrayNullablePropExplicitNull(b bool)` + +SetArrayNullablePropExplicitNull (un)sets ArrayNullableProp to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The ArrayNullableProp value is set to nil even if false is passed +### GetArrayAndItemsNullableProp + +`func (o *NullableClass) GetArrayAndItemsNullableProp() []map[string]interface{}` + +GetArrayAndItemsNullableProp returns the ArrayAndItemsNullableProp field if non-nil, zero value otherwise. + +### GetArrayAndItemsNullablePropOk + +`func (o *NullableClass) GetArrayAndItemsNullablePropOk() ([]map[string]interface{}, bool)` + +GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayAndItemsNullableProp + +`func (o *NullableClass) HasArrayAndItemsNullableProp() bool` + +HasArrayAndItemsNullableProp returns a boolean if a field has been set. + +### SetArrayAndItemsNullableProp + +`func (o *NullableClass) SetArrayAndItemsNullableProp(v []map[string]interface{})` + +SetArrayAndItemsNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayAndItemsNullableProp field. + +### SetArrayAndItemsNullablePropExplicitNull + +`func (o *NullableClass) SetArrayAndItemsNullablePropExplicitNull(b bool)` + +SetArrayAndItemsNullablePropExplicitNull (un)sets ArrayAndItemsNullableProp to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The ArrayAndItemsNullableProp value is set to nil even if false is passed +### GetArrayItemsNullable + +`func (o *NullableClass) GetArrayItemsNullable() []map[string]interface{}` + +GetArrayItemsNullable returns the ArrayItemsNullable field if non-nil, zero value otherwise. + +### GetArrayItemsNullableOk + +`func (o *NullableClass) GetArrayItemsNullableOk() ([]map[string]interface{}, bool)` + +GetArrayItemsNullableOk returns a tuple with the ArrayItemsNullable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayItemsNullable + +`func (o *NullableClass) HasArrayItemsNullable() bool` + +HasArrayItemsNullable returns a boolean if a field has been set. + +### SetArrayItemsNullable + +`func (o *NullableClass) SetArrayItemsNullable(v []map[string]interface{})` + +SetArrayItemsNullable gets a reference to the given []map[string]interface{} and assigns it to the ArrayItemsNullable field. + +### GetObjectNullableProp + +`func (o *NullableClass) GetObjectNullableProp() map[string]map[string]interface{}` + +GetObjectNullableProp returns the ObjectNullableProp field if non-nil, zero value otherwise. + +### GetObjectNullablePropOk + +`func (o *NullableClass) GetObjectNullablePropOk() (map[string]map[string]interface{}, bool)` + +GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasObjectNullableProp + +`func (o *NullableClass) HasObjectNullableProp() bool` + +HasObjectNullableProp returns a boolean if a field has been set. + +### SetObjectNullableProp + +`func (o *NullableClass) SetObjectNullableProp(v map[string]map[string]interface{})` + +SetObjectNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectNullableProp field. + +### SetObjectNullablePropExplicitNull + +`func (o *NullableClass) SetObjectNullablePropExplicitNull(b bool)` + +SetObjectNullablePropExplicitNull (un)sets ObjectNullableProp to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The ObjectNullableProp value is set to nil even if false is passed +### GetObjectAndItemsNullableProp + +`func (o *NullableClass) GetObjectAndItemsNullableProp() map[string]map[string]interface{}` + +GetObjectAndItemsNullableProp returns the ObjectAndItemsNullableProp field if non-nil, zero value otherwise. + +### GetObjectAndItemsNullablePropOk + +`func (o *NullableClass) GetObjectAndItemsNullablePropOk() (map[string]map[string]interface{}, bool)` + +GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasObjectAndItemsNullableProp + +`func (o *NullableClass) HasObjectAndItemsNullableProp() bool` + +HasObjectAndItemsNullableProp returns a boolean if a field has been set. + +### SetObjectAndItemsNullableProp + +`func (o *NullableClass) SetObjectAndItemsNullableProp(v map[string]map[string]interface{})` + +SetObjectAndItemsNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectAndItemsNullableProp field. + +### SetObjectAndItemsNullablePropExplicitNull + +`func (o *NullableClass) SetObjectAndItemsNullablePropExplicitNull(b bool)` + +SetObjectAndItemsNullablePropExplicitNull (un)sets ObjectAndItemsNullableProp to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The ObjectAndItemsNullableProp value is set to nil even if false is passed +### GetObjectItemsNullable + +`func (o *NullableClass) GetObjectItemsNullable() map[string]map[string]interface{}` + +GetObjectItemsNullable returns the ObjectItemsNullable field if non-nil, zero value otherwise. + +### GetObjectItemsNullableOk + +`func (o *NullableClass) GetObjectItemsNullableOk() (map[string]map[string]interface{}, bool)` + +GetObjectItemsNullableOk returns a tuple with the ObjectItemsNullable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasObjectItemsNullable + +`func (o *NullableClass) HasObjectItemsNullable() bool` + +HasObjectItemsNullable returns a boolean if a field has been set. + +### SetObjectItemsNullable + +`func (o *NullableClass) SetObjectItemsNullable(v map[string]map[string]interface{})` + +SetObjectItemsNullable gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectItemsNullable field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md new file mode 100644 index 0000000000..c8dcac264c --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md @@ -0,0 +1,39 @@ +# NumberOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JustNumber** | Pointer to **float32** | | [optional] + +## Methods + +### GetJustNumber + +`func (o *NumberOnly) GetJustNumber() float32` + +GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. + +### GetJustNumberOk + +`func (o *NumberOnly) GetJustNumberOk() (float32, bool)` + +GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasJustNumber + +`func (o *NumberOnly) HasJustNumber() bool` + +HasJustNumber returns a boolean if a field has been set. + +### SetJustNumber + +`func (o *NumberOnly) SetJustNumber(v float32)` + +SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md new file mode 100644 index 0000000000..8aa8bbd1ee --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md @@ -0,0 +1,169 @@ +# Order + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**PetId** | Pointer to **int64** | | [optional] +**Quantity** | Pointer to **int32** | | [optional] +**ShipDate** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Status** | Pointer to **string** | Order Status | [optional] +**Complete** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### GetId + +`func (o *Order) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Order) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Order) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Order) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetPetId + +`func (o *Order) GetPetId() int64` + +GetPetId returns the PetId field if non-nil, zero value otherwise. + +### GetPetIdOk + +`func (o *Order) GetPetIdOk() (int64, bool)` + +GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPetId + +`func (o *Order) HasPetId() bool` + +HasPetId returns a boolean if a field has been set. + +### SetPetId + +`func (o *Order) SetPetId(v int64)` + +SetPetId gets a reference to the given int64 and assigns it to the PetId field. + +### GetQuantity + +`func (o *Order) GetQuantity() int32` + +GetQuantity returns the Quantity field if non-nil, zero value otherwise. + +### GetQuantityOk + +`func (o *Order) GetQuantityOk() (int32, bool)` + +GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasQuantity + +`func (o *Order) HasQuantity() bool` + +HasQuantity returns a boolean if a field has been set. + +### SetQuantity + +`func (o *Order) SetQuantity(v int32)` + +SetQuantity gets a reference to the given int32 and assigns it to the Quantity field. + +### GetShipDate + +`func (o *Order) GetShipDate() time.Time` + +GetShipDate returns the ShipDate field if non-nil, zero value otherwise. + +### GetShipDateOk + +`func (o *Order) GetShipDateOk() (time.Time, bool)` + +GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasShipDate + +`func (o *Order) HasShipDate() bool` + +HasShipDate returns a boolean if a field has been set. + +### SetShipDate + +`func (o *Order) SetShipDate(v time.Time)` + +SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field. + +### GetStatus + +`func (o *Order) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Order) GetStatusOk() (string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStatus + +`func (o *Order) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatus + +`func (o *Order) SetStatus(v string)` + +SetStatus gets a reference to the given string and assigns it to the Status field. + +### GetComplete + +`func (o *Order) GetComplete() bool` + +GetComplete returns the Complete field if non-nil, zero value otherwise. + +### GetCompleteOk + +`func (o *Order) GetCompleteOk() (bool, bool)` + +GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasComplete + +`func (o *Order) HasComplete() bool` + +HasComplete returns a boolean if a field has been set. + +### SetComplete + +`func (o *Order) SetComplete(v bool)` + +SetComplete gets a reference to the given bool and assigns it to the Complete field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md new file mode 100644 index 0000000000..f890802228 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md @@ -0,0 +1,91 @@ +# OuterComposite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MyNumber** | Pointer to **float32** | | [optional] +**MyString** | Pointer to **string** | | [optional] +**MyBoolean** | Pointer to **bool** | | [optional] + +## Methods + +### GetMyNumber + +`func (o *OuterComposite) GetMyNumber() float32` + +GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. + +### GetMyNumberOk + +`func (o *OuterComposite) GetMyNumberOk() (float32, bool)` + +GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMyNumber + +`func (o *OuterComposite) HasMyNumber() bool` + +HasMyNumber returns a boolean if a field has been set. + +### SetMyNumber + +`func (o *OuterComposite) SetMyNumber(v float32)` + +SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field. + +### GetMyString + +`func (o *OuterComposite) GetMyString() string` + +GetMyString returns the MyString field if non-nil, zero value otherwise. + +### GetMyStringOk + +`func (o *OuterComposite) GetMyStringOk() (string, bool)` + +GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMyString + +`func (o *OuterComposite) HasMyString() bool` + +HasMyString returns a boolean if a field has been set. + +### SetMyString + +`func (o *OuterComposite) SetMyString(v string)` + +SetMyString gets a reference to the given string and assigns it to the MyString field. + +### GetMyBoolean + +`func (o *OuterComposite) GetMyBoolean() bool` + +GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. + +### GetMyBooleanOk + +`func (o *OuterComposite) GetMyBooleanOk() (bool, bool)` + +GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMyBoolean + +`func (o *OuterComposite) HasMyBoolean() bool` + +HasMyBoolean returns a boolean if a field has been set. + +### SetMyBoolean + +`func (o *OuterComposite) SetMyBoolean(v bool)` + +SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnum.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnum.md new file mode 100644 index 0000000000..13bed2d17f --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnum.md @@ -0,0 +1,11 @@ +# OuterEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnumDefaultValue.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnumDefaultValue.md new file mode 100644 index 0000000000..50f8ab0096 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnumDefaultValue.md @@ -0,0 +1,11 @@ +# OuterEnumDefaultValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnumInteger.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnumInteger.md new file mode 100644 index 0000000000..eb033db7cc --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnumInteger.md @@ -0,0 +1,11 @@ +# OuterEnumInteger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 0000000000..7a16343295 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,11 @@ +# OuterEnumIntegerDefaultValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md new file mode 100644 index 0000000000..dba9589f9d --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md @@ -0,0 +1,169 @@ +# Pet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**Category** | Pointer to [**Category**](Category.md) | | [optional] +**Name** | Pointer to **string** | | +**PhotoUrls** | Pointer to **[]string** | | +**Tags** | Pointer to [**[]Tag**](Tag.md) | | [optional] +**Status** | Pointer to **string** | pet status in the store | [optional] + +## Methods + +### GetId + +`func (o *Pet) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Pet) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Pet) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Pet) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetCategory + +`func (o *Pet) GetCategory() Category` + +GetCategory returns the Category field if non-nil, zero value otherwise. + +### GetCategoryOk + +`func (o *Pet) GetCategoryOk() (Category, bool)` + +GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCategory + +`func (o *Pet) HasCategory() bool` + +HasCategory returns a boolean if a field has been set. + +### SetCategory + +`func (o *Pet) SetCategory(v Category)` + +SetCategory gets a reference to the given Category and assigns it to the Category field. + +### GetName + +`func (o *Pet) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Pet) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Pet) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Pet) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetPhotoUrls + +`func (o *Pet) GetPhotoUrls() []string` + +GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. + +### GetPhotoUrlsOk + +`func (o *Pet) GetPhotoUrlsOk() ([]string, bool)` + +GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPhotoUrls + +`func (o *Pet) HasPhotoUrls() bool` + +HasPhotoUrls returns a boolean if a field has been set. + +### SetPhotoUrls + +`func (o *Pet) SetPhotoUrls(v []string)` + +SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field. + +### GetTags + +`func (o *Pet) GetTags() []Tag` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Pet) GetTagsOk() ([]Tag, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTags + +`func (o *Pet) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### SetTags + +`func (o *Pet) SetTags(v []Tag)` + +SetTags gets a reference to the given []Tag and assigns it to the Tags field. + +### GetStatus + +`func (o *Pet) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Pet) GetStatusOk() (string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStatus + +`func (o *Pet) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatus + +`func (o *Pet) SetStatus(v string)` + +SetStatus gets a reference to the given string and assigns it to the Status field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md new file mode 100644 index 0000000000..8118df7009 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md @@ -0,0 +1,359 @@ +# \PetApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddPet**](PetApi.md#AddPet) | **Post** /pet | Add a new pet to the store +[**DeletePet**](PetApi.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet +[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status +[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags +[**GetPetById**](PetApi.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID +[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet +[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data +[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + + +## AddPet + +> AddPet(ctx, pet) + +Add a new pet to the store + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + + (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeletePet + +> DeletePet(ctx, petId, optional) + +Deletes a pet + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| Pet id to delete | + **optional** | ***DeletePetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeletePetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **apiKey** | **optional.String**| | + +### Return type + + (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### 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) + + +## FindPetsByStatus + +> []Pet FindPetsByStatus(ctx, status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**status** | [**[]string**](string.md)| Status values that need to be considered for filter | + +### Return type + +[**[]Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FindPetsByTags + +> []Pet FindPetsByTags(ctx, tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tags** | [**[]string**](string.md)| Tags to filter by | + +### Return type + +[**[]Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetPetById + +> Pet GetPetById(ctx, petId) + +Find pet by ID + +Returns a single pet + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePet + +> UpdatePet(ctx, pet) + +Update an existing pet + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + + (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePetWithForm + +> UpdatePetWithForm(ctx, petId, optional) + +Updates a pet in the store with form data + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet that needs to be updated | + **optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdatePetWithFormOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **name** | **optional.String**| Updated name of the pet | + **status** | **optional.String**| Updated status of the pet | + +### Return type + + (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UploadFile + +> ApiResponse UploadFile(ctx, petId, optional) + +uploads an image + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet to update | + **optional** | ***UploadFileOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UploadFileOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **additionalMetadata** | **optional.String**| Additional data to pass to server | + **file** | **optional.Interface of *os.File****optional.*os.File**| file to upload | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UploadFileWithRequiredFile + +> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) + +uploads an image (required) + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**petId** | **int64**| ID of pet to update | +**requiredFile** | ***os.File*****os.File**| file to upload | + **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **additionalMetadata** | **optional.String**| Additional data to pass to server | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md new file mode 100644 index 0000000000..ce2ff23bc6 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md @@ -0,0 +1,65 @@ +# ReadOnlyFirst + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bar** | Pointer to **string** | | [optional] [readonly] +**Baz** | Pointer to **string** | | [optional] + +## Methods + +### GetBar + +`func (o *ReadOnlyFirst) GetBar() string` + +GetBar returns the Bar field if non-nil, zero value otherwise. + +### GetBarOk + +`func (o *ReadOnlyFirst) GetBarOk() (string, bool)` + +GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBar + +`func (o *ReadOnlyFirst) HasBar() bool` + +HasBar returns a boolean if a field has been set. + +### SetBar + +`func (o *ReadOnlyFirst) SetBar(v string)` + +SetBar gets a reference to the given string and assigns it to the Bar field. + +### GetBaz + +`func (o *ReadOnlyFirst) GetBaz() string` + +GetBaz returns the Baz field if non-nil, zero value otherwise. + +### GetBazOk + +`func (o *ReadOnlyFirst) GetBazOk() (string, bool)` + +GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBaz + +`func (o *ReadOnlyFirst) HasBaz() bool` + +HasBaz returns a boolean if a field has been set. + +### SetBaz + +`func (o *ReadOnlyFirst) SetBaz(v string)` + +SetBaz gets a reference to the given string and assigns it to the Baz field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md new file mode 100644 index 0000000000..1facabb6bb --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md @@ -0,0 +1,39 @@ +# Return + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Return** | Pointer to **int32** | | [optional] + +## Methods + +### GetReturn + +`func (o *Return) GetReturn() int32` + +GetReturn returns the Return field if non-nil, zero value otherwise. + +### GetReturnOk + +`func (o *Return) GetReturnOk() (int32, bool)` + +GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasReturn + +`func (o *Return) HasReturn() bool` + +HasReturn returns a boolean if a field has been set. + +### SetReturn + +`func (o *Return) SetReturn(v int32)` + +SetReturn gets a reference to the given int32 and assigns it to the Return field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md new file mode 100644 index 0000000000..34d8d8d89c --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md @@ -0,0 +1,39 @@ +# SpecialModelName + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SpecialPropertyName** | Pointer to **int64** | | [optional] + +## Methods + +### GetSpecialPropertyName + +`func (o *SpecialModelName) GetSpecialPropertyName() int64` + +GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise. + +### GetSpecialPropertyNameOk + +`func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool)` + +GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSpecialPropertyName + +`func (o *SpecialModelName) HasSpecialPropertyName() bool` + +HasSpecialPropertyName returns a boolean if a field has been set. + +### SetSpecialPropertyName + +`func (o *SpecialModelName) SetSpecialPropertyName(v int64)` + +SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md new file mode 100644 index 0000000000..c24d87bbfd --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md @@ -0,0 +1,142 @@ +# \StoreApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +[**GetInventory**](StoreApi.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status +[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID +[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet + + + +## DeleteOrder + +> DeleteOrder(ctx, orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orderId** | **string**| ID of the order that needs to be deleted | + +### 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) + + +## GetInventory + +> map[string]int32 GetInventory(ctx, ) + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +**map[string]int32** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetOrderById + +> Order GetOrderById(ctx, orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orderId** | **int64**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PlaceOrder + +> Order PlaceOrder(ctx, order) + +Place an order for a pet + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**order** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md new file mode 100644 index 0000000000..bf868298a5 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md @@ -0,0 +1,65 @@ +# Tag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetId + +`func (o *Tag) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Tag) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Tag) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Tag) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetName + +`func (o *Tag) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Tag) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Tag) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Tag) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md new file mode 100644 index 0000000000..8b93a65d8a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md @@ -0,0 +1,221 @@ +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**Username** | Pointer to **string** | | [optional] +**FirstName** | Pointer to **string** | | [optional] +**LastName** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**Password** | Pointer to **string** | | [optional] +**Phone** | Pointer to **string** | | [optional] +**UserStatus** | Pointer to **int32** | User Status | [optional] + +## Methods + +### GetId + +`func (o *User) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *User) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *User) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *User) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetUsername + +`func (o *User) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *User) GetUsernameOk() (string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUsername + +`func (o *User) HasUsername() bool` + +HasUsername returns a boolean if a field has been set. + +### SetUsername + +`func (o *User) SetUsername(v string)` + +SetUsername gets a reference to the given string and assigns it to the Username field. + +### GetFirstName + +`func (o *User) GetFirstName() string` + +GetFirstName returns the FirstName field if non-nil, zero value otherwise. + +### GetFirstNameOk + +`func (o *User) GetFirstNameOk() (string, bool)` + +GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFirstName + +`func (o *User) HasFirstName() bool` + +HasFirstName returns a boolean if a field has been set. + +### SetFirstName + +`func (o *User) SetFirstName(v string)` + +SetFirstName gets a reference to the given string and assigns it to the FirstName field. + +### GetLastName + +`func (o *User) GetLastName() string` + +GetLastName returns the LastName field if non-nil, zero value otherwise. + +### GetLastNameOk + +`func (o *User) GetLastNameOk() (string, bool)` + +GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasLastName + +`func (o *User) HasLastName() bool` + +HasLastName returns a boolean if a field has been set. + +### SetLastName + +`func (o *User) SetLastName(v string)` + +SetLastName gets a reference to the given string and assigns it to the LastName field. + +### GetEmail + +`func (o *User) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *User) GetEmailOk() (string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEmail + +`func (o *User) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### SetEmail + +`func (o *User) SetEmail(v string)` + +SetEmail gets a reference to the given string and assigns it to the Email field. + +### GetPassword + +`func (o *User) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *User) GetPasswordOk() (string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPassword + +`func (o *User) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### SetPassword + +`func (o *User) SetPassword(v string)` + +SetPassword gets a reference to the given string and assigns it to the Password field. + +### GetPhone + +`func (o *User) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *User) GetPhoneOk() (string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPhone + +`func (o *User) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### SetPhone + +`func (o *User) SetPhone(v string)` + +SetPhone gets a reference to the given string and assigns it to the Phone field. + +### GetUserStatus + +`func (o *User) GetUserStatus() int32` + +GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. + +### GetUserStatusOk + +`func (o *User) GetUserStatusOk() (int32, bool)` + +GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUserStatus + +`func (o *User) HasUserStatus() bool` + +HasUserStatus returns a boolean if a field has been set. + +### SetUserStatus + +`func (o *User) SetUserStatus(v int32)` + +SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md new file mode 100644 index 0000000000..01d05d555c --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md @@ -0,0 +1,276 @@ +# \UserApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateUser**](UserApi.md#CreateUser) | **Post** /user | Create user +[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array +[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array +[**DeleteUser**](UserApi.md#DeleteUser) | **Delete** /user/{username} | Delete user +[**GetUserByName**](UserApi.md#GetUserByName) | **Get** /user/{username} | Get user by user name +[**LoginUser**](UserApi.md#LoginUser) | **Get** /user/login | Logs user into the system +[**LogoutUser**](UserApi.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session +[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user + + + +## CreateUser + +> CreateUser(ctx, user) + +Create user + +This can only be done by the logged in user. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**user** | [**User**](User.md)| Created user object | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUsersWithArrayInput + +> CreateUsersWithArrayInput(ctx, user) + +Creates list of users with given input array + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**user** | [**[]User**](User.md)| List of user object | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUsersWithListInput + +> CreateUsersWithListInput(ctx, user) + +Creates list of users with given input array + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**user** | [**[]User**](User.md)| List of user object | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser + +> DeleteUser(ctx, username) + +Delete user + +This can only be done by the logged in user. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| The name that needs to be deleted | + +### 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) + + +## GetUserByName + +> User GetUserByName(ctx, username) + +Get user by user name + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LoginUser + +> string LoginUser(ctx, username, password) + +Logs user into the system + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| The user name for login | +**password** | **string**| The password for login in clear text | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LogoutUser + +> LogoutUser(ctx, ) + +Logs out current logged in user session + +### Required Parameters + +This endpoint does not need any parameter. + +### 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) + + +## UpdateUser + +> UpdateUser(ctx, username, user) + +Updated user + +This can only be done by the logged in user. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**username** | **string**| name that need to be deleted | +**user** | [**User**](User.md)| Updated user object | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/git_push.sh b/samples/openapi3/client/petstore/go-experimental/go-petstore/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/go.mod b/samples/openapi3/client/petstore/go-experimental/go-petstore/go.mod new file mode 100644 index 0000000000..199809ed70 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/go.mod @@ -0,0 +1,6 @@ +module github.com/GIT_USER_ID/GIT_REPO_ID + +require ( + github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 + golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a +) diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/go.sum b/samples/openapi3/client/petstore/go-experimental/go-petstore/go.sum new file mode 100644 index 0000000000..e3c16fef3a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/go.sum @@ -0,0 +1,11 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go new file mode 100644 index 0000000000..236aca8ee3 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go @@ -0,0 +1,101 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// Model200Response Model for testing model name starting with number +type Model200Response struct { + Name *int32 `json:"name,omitempty"` + + Class *string `json:"class,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Model200Response) GetName() int32 { + if o == nil || o.Name == nil { + var ret int32 + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Model200Response) GetNameOk() (int32, bool) { + if o == nil || o.Name == nil { + var ret int32 + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Model200Response) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given int32 and assigns it to the Name field. +func (o *Model200Response) SetName(v int32) { + o.Name = &v +} + +// GetClass returns the Class field if non-nil, zero value otherwise. +func (o *Model200Response) GetClass() string { + if o == nil || o.Class == nil { + var ret string + return ret + } + return *o.Class +} + +// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Model200Response) GetClassOk() (string, bool) { + if o == nil || o.Class == nil { + var ret string + return ret, false + } + return *o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *Model200Response) HasClass() bool { + if o != nil && o.Class != nil { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *Model200Response) SetClass(v string) { + o.Class = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Model200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Class != nil { + toSerialize["class"] = o.Class + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go new file mode 100644 index 0000000000..9c2435fa14 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// SpecialModelName struct for SpecialModelName +type SpecialModelName struct { + SpecialPropertyName *int64 `json:"$special[property.name],omitempty"` + +} + +// GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise. +func (o *SpecialModelName) GetSpecialPropertyName() int64 { + if o == nil || o.SpecialPropertyName == nil { + var ret int64 + return ret + } + return *o.SpecialPropertyName +} + +// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool) { + if o == nil || o.SpecialPropertyName == nil { + var ret int64 + return ret, false + } + return *o.SpecialPropertyName, true +} + +// HasSpecialPropertyName returns a boolean if a field has been set. +func (o *SpecialModelName) HasSpecialPropertyName() bool { + if o != nil && o.SpecialPropertyName != nil { + return true + } + + return false +} + +// SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field. +func (o *SpecialModelName) SetSpecialPropertyName(v int64) { + o.SpecialPropertyName = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o SpecialModelName) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SpecialPropertyName != nil { + toSerialize["$special[property.name]"] = o.SpecialPropertyName + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go new file mode 100644 index 0000000000..a4050e424c --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -0,0 +1,101 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// AdditionalPropertiesClass struct for AdditionalPropertiesClass +type AdditionalPropertiesClass struct { + MapProperty *map[string]string `json:"map_property,omitempty"` + + MapOfMapProperty *map[string]map[string]string `json:"map_of_map_property,omitempty"` + +} + +// GetMapProperty returns the MapProperty field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string { + if o == nil || o.MapProperty == nil { + var ret map[string]string + return ret + } + return *o.MapProperty +} + +// GetMapPropertyOk returns a tuple with the MapProperty field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapPropertyOk() (map[string]string, bool) { + if o == nil || o.MapProperty == nil { + var ret map[string]string + return ret, false + } + return *o.MapProperty, true +} + +// HasMapProperty returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapProperty() bool { + if o != nil && o.MapProperty != nil { + return true + } + + return false +} + +// SetMapProperty gets a reference to the given map[string]string and assigns it to the MapProperty field. +func (o *AdditionalPropertiesClass) SetMapProperty(v map[string]string) { + o.MapProperty = &v +} + +// GetMapOfMapProperty returns the MapOfMapProperty field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapOfMapProperty() map[string]map[string]string { + if o == nil || o.MapOfMapProperty == nil { + var ret map[string]map[string]string + return ret + } + return *o.MapOfMapProperty +} + +// GetMapOfMapPropertyOk returns a tuple with the MapOfMapProperty field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapOfMapPropertyOk() (map[string]map[string]string, bool) { + if o == nil || o.MapOfMapProperty == nil { + var ret map[string]map[string]string + return ret, false + } + return *o.MapOfMapProperty, true +} + +// HasMapOfMapProperty returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapOfMapProperty() bool { + if o != nil && o.MapOfMapProperty != nil { + return true + } + + return false +} + +// SetMapOfMapProperty gets a reference to the given map[string]map[string]string and assigns it to the MapOfMapProperty field. +func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string]string) { + o.MapOfMapProperty = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MapProperty != nil { + toSerialize["map_property"] = o.MapProperty + } + if o.MapOfMapProperty != nil { + toSerialize["map_of_map_property"] = o.MapOfMapProperty + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go new file mode 100644 index 0000000000..472ed9a093 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" + "errors" +) +// Animal struct for Animal +type Animal struct { + ClassName *string `json:"className,omitempty"` + + Color *string `json:"color,omitempty"` + +} + +// GetClassName returns the ClassName field if non-nil, zero value otherwise. +func (o *Animal) GetClassName() string { + if o == nil || o.ClassName == nil { + var ret string + return ret + } + return *o.ClassName +} + +// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Animal) GetClassNameOk() (string, bool) { + if o == nil || o.ClassName == nil { + var ret string + return ret, false + } + return *o.ClassName, true +} + +// HasClassName returns a boolean if a field has been set. +func (o *Animal) HasClassName() bool { + if o != nil && o.ClassName != nil { + return true + } + + return false +} + +// SetClassName gets a reference to the given string and assigns it to the ClassName field. +func (o *Animal) SetClassName(v string) { + o.ClassName = &v +} + +// GetColor returns the Color field if non-nil, zero value otherwise. +func (o *Animal) GetColor() string { + if o == nil || o.Color == nil { + var ret string + return ret + } + return *o.Color +} + +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Animal) GetColorOk() (string, bool) { + if o == nil || o.Color == nil { + var ret string + return ret, false + } + return *o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *Animal) HasColor() bool { + if o != nil && o.Color != nil { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *Animal) SetColor(v string) { + o.Color = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Animal) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ClassName == nil { + return nil, errors.New("ClassName is required and not nullable, but was not set on Animal") + } + if o.ClassName != nil { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go new file mode 100644 index 0000000000..6ef9d8e9da --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go @@ -0,0 +1,139 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// ApiResponse struct for ApiResponse +type ApiResponse struct { + Code *int32 `json:"code,omitempty"` + + Type *string `json:"type,omitempty"` + + Message *string `json:"message,omitempty"` + +} + +// GetCode returns the Code field if non-nil, zero value otherwise. +func (o *ApiResponse) GetCode() int32 { + if o == nil || o.Code == nil { + var ret int32 + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApiResponse) GetCodeOk() (int32, bool) { + if o == nil || o.Code == nil { + var ret int32 + return ret, false + } + return *o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *ApiResponse) HasCode() bool { + if o != nil && o.Code != nil { + return true + } + + return false +} + +// SetCode gets a reference to the given int32 and assigns it to the Code field. +func (o *ApiResponse) SetCode(v int32) { + o.Code = &v +} + +// GetType returns the Type field if non-nil, zero value otherwise. +func (o *ApiResponse) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApiResponse) GetTypeOk() (string, bool) { + if o == nil || o.Type == nil { + var ret string + return ret, false + } + return *o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ApiResponse) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ApiResponse) SetType(v string) { + o.Type = &v +} + +// GetMessage returns the Message field if non-nil, zero value otherwise. +func (o *ApiResponse) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApiResponse) GetMessageOk() (string, bool) { + if o == nil || o.Message == nil { + var ret string + return ret, false + } + return *o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ApiResponse) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ApiResponse) SetMessage(v string) { + o.Message = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o ApiResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Code != nil { + toSerialize["code"] = o.Code + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go new file mode 100644 index 0000000000..72f2637167 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly +type ArrayOfArrayOfNumberOnly struct { + ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"` + +} + +// GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise. +func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { + if o == nil || o.ArrayArrayNumber == nil { + var ret [][]float32 + return ret + } + return *o.ArrayArrayNumber +} + +// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) { + if o == nil || o.ArrayArrayNumber == nil { + var ret [][]float32 + return ret, false + } + return *o.ArrayArrayNumber, true +} + +// HasArrayArrayNumber returns a boolean if a field has been set. +func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool { + if o != nil && o.ArrayArrayNumber != nil { + return true + } + + return false +} + +// SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field. +func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) { + o.ArrayArrayNumber = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ArrayArrayNumber != nil { + toSerialize["ArrayArrayNumber"] = o.ArrayArrayNumber + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go new file mode 100644 index 0000000000..595caf5c35 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// ArrayOfNumberOnly struct for ArrayOfNumberOnly +type ArrayOfNumberOnly struct { + ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"` + +} + +// GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. +func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { + if o == nil || o.ArrayNumber == nil { + var ret []float32 + return ret + } + return *o.ArrayNumber +} + +// GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) { + if o == nil || o.ArrayNumber == nil { + var ret []float32 + return ret, false + } + return *o.ArrayNumber, true +} + +// HasArrayNumber returns a boolean if a field has been set. +func (o *ArrayOfNumberOnly) HasArrayNumber() bool { + if o != nil && o.ArrayNumber != nil { + return true + } + + return false +} + +// SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field. +func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) { + o.ArrayNumber = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ArrayNumber != nil { + toSerialize["ArrayNumber"] = o.ArrayNumber + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go new file mode 100644 index 0000000000..fe8729cc1d --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go @@ -0,0 +1,139 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// ArrayTest struct for ArrayTest +type ArrayTest struct { + ArrayOfString *[]string `json:"array_of_string,omitempty"` + + ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"` + + ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` + +} + +// GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise. +func (o *ArrayTest) GetArrayOfString() []string { + if o == nil || o.ArrayOfString == nil { + var ret []string + return ret + } + return *o.ArrayOfString +} + +// GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) { + if o == nil || o.ArrayOfString == nil { + var ret []string + return ret, false + } + return *o.ArrayOfString, true +} + +// HasArrayOfString returns a boolean if a field has been set. +func (o *ArrayTest) HasArrayOfString() bool { + if o != nil && o.ArrayOfString != nil { + return true + } + + return false +} + +// SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field. +func (o *ArrayTest) SetArrayOfString(v []string) { + o.ArrayOfString = &v +} + +// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise. +func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { + if o == nil || o.ArrayArrayOfInteger == nil { + var ret [][]int64 + return ret + } + return *o.ArrayArrayOfInteger +} + +// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) { + if o == nil || o.ArrayArrayOfInteger == nil { + var ret [][]int64 + return ret, false + } + return *o.ArrayArrayOfInteger, true +} + +// HasArrayArrayOfInteger returns a boolean if a field has been set. +func (o *ArrayTest) HasArrayArrayOfInteger() bool { + if o != nil && o.ArrayArrayOfInteger != nil { + return true + } + + return false +} + +// SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field. +func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) { + o.ArrayArrayOfInteger = &v +} + +// GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise. +func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { + if o == nil || o.ArrayArrayOfModel == nil { + var ret [][]ReadOnlyFirst + return ret + } + return *o.ArrayArrayOfModel +} + +// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) { + if o == nil || o.ArrayArrayOfModel == nil { + var ret [][]ReadOnlyFirst + return ret, false + } + return *o.ArrayArrayOfModel, true +} + +// HasArrayArrayOfModel returns a boolean if a field has been set. +func (o *ArrayTest) HasArrayArrayOfModel() bool { + if o != nil && o.ArrayArrayOfModel != nil { + return true + } + + return false +} + +// SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field. +func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) { + o.ArrayArrayOfModel = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o ArrayTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ArrayOfString != nil { + toSerialize["array_of_string"] = o.ArrayOfString + } + if o.ArrayArrayOfInteger != nil { + toSerialize["array_array_of_integer"] = o.ArrayArrayOfInteger + } + if o.ArrayArrayOfModel != nil { + toSerialize["array_array_of_model"] = o.ArrayArrayOfModel + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go new file mode 100644 index 0000000000..152069cde9 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go @@ -0,0 +1,254 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// Capitalization struct for Capitalization +type Capitalization struct { + SmallCamel *string `json:"smallCamel,omitempty"` + + CapitalCamel *string `json:"CapitalCamel,omitempty"` + + SmallSnake *string `json:"small_Snake,omitempty"` + + CapitalSnake *string `json:"Capital_Snake,omitempty"` + + SCAETHFlowPoints *string `json:"SCA_ETH_Flow_Points,omitempty"` + + // Name of the pet + ATT_NAME *string `json:"ATT_NAME,omitempty"` + +} + +// GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. +func (o *Capitalization) GetSmallCamel() string { + if o == nil || o.SmallCamel == nil { + var ret string + return ret + } + return *o.SmallCamel +} + +// GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetSmallCamelOk() (string, bool) { + if o == nil || o.SmallCamel == nil { + var ret string + return ret, false + } + return *o.SmallCamel, true +} + +// HasSmallCamel returns a boolean if a field has been set. +func (o *Capitalization) HasSmallCamel() bool { + if o != nil && o.SmallCamel != nil { + return true + } + + return false +} + +// SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field. +func (o *Capitalization) SetSmallCamel(v string) { + o.SmallCamel = &v +} + +// GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. +func (o *Capitalization) GetCapitalCamel() string { + if o == nil || o.CapitalCamel == nil { + var ret string + return ret + } + return *o.CapitalCamel +} + +// GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetCapitalCamelOk() (string, bool) { + if o == nil || o.CapitalCamel == nil { + var ret string + return ret, false + } + return *o.CapitalCamel, true +} + +// HasCapitalCamel returns a boolean if a field has been set. +func (o *Capitalization) HasCapitalCamel() bool { + if o != nil && o.CapitalCamel != nil { + return true + } + + return false +} + +// SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field. +func (o *Capitalization) SetCapitalCamel(v string) { + o.CapitalCamel = &v +} + +// GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. +func (o *Capitalization) GetSmallSnake() string { + if o == nil || o.SmallSnake == nil { + var ret string + return ret + } + return *o.SmallSnake +} + +// GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetSmallSnakeOk() (string, bool) { + if o == nil || o.SmallSnake == nil { + var ret string + return ret, false + } + return *o.SmallSnake, true +} + +// HasSmallSnake returns a boolean if a field has been set. +func (o *Capitalization) HasSmallSnake() bool { + if o != nil && o.SmallSnake != nil { + return true + } + + return false +} + +// SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field. +func (o *Capitalization) SetSmallSnake(v string) { + o.SmallSnake = &v +} + +// GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. +func (o *Capitalization) GetCapitalSnake() string { + if o == nil || o.CapitalSnake == nil { + var ret string + return ret + } + return *o.CapitalSnake +} + +// GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetCapitalSnakeOk() (string, bool) { + if o == nil || o.CapitalSnake == nil { + var ret string + return ret, false + } + return *o.CapitalSnake, true +} + +// HasCapitalSnake returns a boolean if a field has been set. +func (o *Capitalization) HasCapitalSnake() bool { + if o != nil && o.CapitalSnake != nil { + return true + } + + return false +} + +// SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field. +func (o *Capitalization) SetCapitalSnake(v string) { + o.CapitalSnake = &v +} + +// GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise. +func (o *Capitalization) GetSCAETHFlowPoints() string { + if o == nil || o.SCAETHFlowPoints == nil { + var ret string + return ret + } + return *o.SCAETHFlowPoints +} + +// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool) { + if o == nil || o.SCAETHFlowPoints == nil { + var ret string + return ret, false + } + return *o.SCAETHFlowPoints, true +} + +// HasSCAETHFlowPoints returns a boolean if a field has been set. +func (o *Capitalization) HasSCAETHFlowPoints() bool { + if o != nil && o.SCAETHFlowPoints != nil { + return true + } + + return false +} + +// SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field. +func (o *Capitalization) SetSCAETHFlowPoints(v string) { + o.SCAETHFlowPoints = &v +} + +// GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. +func (o *Capitalization) GetATT_NAME() string { + if o == nil || o.ATT_NAME == nil { + var ret string + return ret + } + return *o.ATT_NAME +} + +// GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetATT_NAMEOk() (string, bool) { + if o == nil || o.ATT_NAME == nil { + var ret string + return ret, false + } + return *o.ATT_NAME, true +} + +// HasATT_NAME returns a boolean if a field has been set. +func (o *Capitalization) HasATT_NAME() bool { + if o != nil && o.ATT_NAME != nil { + return true + } + + return false +} + +// SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field. +func (o *Capitalization) SetATT_NAME(v string) { + o.ATT_NAME = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Capitalization) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SmallCamel != nil { + toSerialize["smallCamel"] = o.SmallCamel + } + if o.CapitalCamel != nil { + toSerialize["CapitalCamel"] = o.CapitalCamel + } + if o.SmallSnake != nil { + toSerialize["small_Snake"] = o.SmallSnake + } + if o.CapitalSnake != nil { + toSerialize["Capital_Snake"] = o.CapitalSnake + } + if o.SCAETHFlowPoints != nil { + toSerialize["SCA_ETH_Flow_Points"] = o.SCAETHFlowPoints + } + if o.ATT_NAME != nil { + toSerialize["ATT_NAME"] = o.ATT_NAME + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go new file mode 100644 index 0000000000..68740a9cc9 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go @@ -0,0 +1,143 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" + "errors" +) +// Cat struct for Cat +type Cat struct { + ClassName *string `json:"className,omitempty"` + + Color *string `json:"color,omitempty"` + + Declawed *bool `json:"declawed,omitempty"` + +} + +// GetClassName returns the ClassName field if non-nil, zero value otherwise. +func (o *Cat) GetClassName() string { + if o == nil || o.ClassName == nil { + var ret string + return ret + } + return *o.ClassName +} + +// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Cat) GetClassNameOk() (string, bool) { + if o == nil || o.ClassName == nil { + var ret string + return ret, false + } + return *o.ClassName, true +} + +// HasClassName returns a boolean if a field has been set. +func (o *Cat) HasClassName() bool { + if o != nil && o.ClassName != nil { + return true + } + + return false +} + +// SetClassName gets a reference to the given string and assigns it to the ClassName field. +func (o *Cat) SetClassName(v string) { + o.ClassName = &v +} + +// GetColor returns the Color field if non-nil, zero value otherwise. +func (o *Cat) GetColor() string { + if o == nil || o.Color == nil { + var ret string + return ret + } + return *o.Color +} + +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Cat) GetColorOk() (string, bool) { + if o == nil || o.Color == nil { + var ret string + return ret, false + } + return *o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *Cat) HasColor() bool { + if o != nil && o.Color != nil { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *Cat) SetColor(v string) { + o.Color = &v +} + +// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. +func (o *Cat) GetDeclawed() bool { + if o == nil || o.Declawed == nil { + var ret bool + return ret + } + return *o.Declawed +} + +// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Cat) GetDeclawedOk() (bool, bool) { + if o == nil || o.Declawed == nil { + var ret bool + return ret, false + } + return *o.Declawed, true +} + +// HasDeclawed returns a boolean if a field has been set. +func (o *Cat) HasDeclawed() bool { + if o != nil && o.Declawed != nil { + return true + } + + return false +} + +// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. +func (o *Cat) SetDeclawed(v bool) { + o.Declawed = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Cat) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ClassName == nil { + return nil, errors.New("ClassName is required and not nullable, but was not set on Cat") + } + if o.ClassName != nil { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + if o.Declawed != nil { + toSerialize["declawed"] = o.Declawed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go new file mode 100644 index 0000000000..0ae64baf61 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// CatAllOf struct for CatAllOf +type CatAllOf struct { + Declawed *bool `json:"declawed,omitempty"` + +} + +// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. +func (o *CatAllOf) GetDeclawed() bool { + if o == nil || o.Declawed == nil { + var ret bool + return ret + } + return *o.Declawed +} + +// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CatAllOf) GetDeclawedOk() (bool, bool) { + if o == nil || o.Declawed == nil { + var ret bool + return ret, false + } + return *o.Declawed, true +} + +// HasDeclawed returns a boolean if a field has been set. +func (o *CatAllOf) HasDeclawed() bool { + if o != nil && o.Declawed != nil { + return true + } + + return false +} + +// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. +func (o *CatAllOf) SetDeclawed(v bool) { + o.Declawed = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o CatAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Declawed != nil { + toSerialize["declawed"] = o.Declawed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go new file mode 100644 index 0000000000..40f16e0f20 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" + "errors" +) +// Category struct for Category +type Category struct { + Id *int64 `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Category) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Category) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Category) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Category) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Category) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Category) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Category) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Category) SetName(v string) { + o.Name = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Category) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name == nil { + return nil, errors.New("Name is required and not nullable, but was not set on Category") + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go new file mode 100644 index 0000000000..942013150e --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// ClassModel Model for testing model with \"_class\" property +type ClassModel struct { + Class *string `json:"_class,omitempty"` + +} + +// GetClass returns the Class field if non-nil, zero value otherwise. +func (o *ClassModel) GetClass() string { + if o == nil || o.Class == nil { + var ret string + return ret + } + return *o.Class +} + +// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ClassModel) GetClassOk() (string, bool) { + if o == nil || o.Class == nil { + var ret string + return ret, false + } + return *o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *ClassModel) HasClass() bool { + if o != nil && o.Class != nil { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *ClassModel) SetClass(v string) { + o.Class = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o ClassModel) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Class != nil { + toSerialize["_class"] = o.Class + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go new file mode 100644 index 0000000000..926e0f9b15 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// Client struct for Client +type Client struct { + Client *string `json:"client,omitempty"` + +} + +// GetClient returns the Client field if non-nil, zero value otherwise. +func (o *Client) GetClient() string { + if o == nil || o.Client == nil { + var ret string + return ret + } + return *o.Client +} + +// GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Client) GetClientOk() (string, bool) { + if o == nil || o.Client == nil { + var ret string + return ret, false + } + return *o.Client, true +} + +// HasClient returns a boolean if a field has been set. +func (o *Client) HasClient() bool { + if o != nil && o.Client != nil { + return true + } + + return false +} + +// SetClient gets a reference to the given string and assigns it to the Client field. +func (o *Client) SetClient(v string) { + o.Client = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Client) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Client != nil { + toSerialize["client"] = o.Client + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go new file mode 100644 index 0000000000..d5e743b75a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go @@ -0,0 +1,143 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" + "errors" +) +// Dog struct for Dog +type Dog struct { + ClassName *string `json:"className,omitempty"` + + Color *string `json:"color,omitempty"` + + Breed *string `json:"breed,omitempty"` + +} + +// GetClassName returns the ClassName field if non-nil, zero value otherwise. +func (o *Dog) GetClassName() string { + if o == nil || o.ClassName == nil { + var ret string + return ret + } + return *o.ClassName +} + +// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Dog) GetClassNameOk() (string, bool) { + if o == nil || o.ClassName == nil { + var ret string + return ret, false + } + return *o.ClassName, true +} + +// HasClassName returns a boolean if a field has been set. +func (o *Dog) HasClassName() bool { + if o != nil && o.ClassName != nil { + return true + } + + return false +} + +// SetClassName gets a reference to the given string and assigns it to the ClassName field. +func (o *Dog) SetClassName(v string) { + o.ClassName = &v +} + +// GetColor returns the Color field if non-nil, zero value otherwise. +func (o *Dog) GetColor() string { + if o == nil || o.Color == nil { + var ret string + return ret + } + return *o.Color +} + +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Dog) GetColorOk() (string, bool) { + if o == nil || o.Color == nil { + var ret string + return ret, false + } + return *o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *Dog) HasColor() bool { + if o != nil && o.Color != nil { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *Dog) SetColor(v string) { + o.Color = &v +} + +// GetBreed returns the Breed field if non-nil, zero value otherwise. +func (o *Dog) GetBreed() string { + if o == nil || o.Breed == nil { + var ret string + return ret + } + return *o.Breed +} + +// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Dog) GetBreedOk() (string, bool) { + if o == nil || o.Breed == nil { + var ret string + return ret, false + } + return *o.Breed, true +} + +// HasBreed returns a boolean if a field has been set. +func (o *Dog) HasBreed() bool { + if o != nil && o.Breed != nil { + return true + } + + return false +} + +// SetBreed gets a reference to the given string and assigns it to the Breed field. +func (o *Dog) SetBreed(v string) { + o.Breed = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Dog) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ClassName == nil { + return nil, errors.New("ClassName is required and not nullable, but was not set on Dog") + } + if o.ClassName != nil { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + if o.Breed != nil { + toSerialize["breed"] = o.Breed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go new file mode 100644 index 0000000000..239229308c --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// DogAllOf struct for DogAllOf +type DogAllOf struct { + Breed *string `json:"breed,omitempty"` + +} + +// GetBreed returns the Breed field if non-nil, zero value otherwise. +func (o *DogAllOf) GetBreed() string { + if o == nil || o.Breed == nil { + var ret string + return ret + } + return *o.Breed +} + +// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *DogAllOf) GetBreedOk() (string, bool) { + if o == nil || o.Breed == nil { + var ret string + return ret, false + } + return *o.Breed, true +} + +// HasBreed returns a boolean if a field has been set. +func (o *DogAllOf) HasBreed() bool { + if o != nil && o.Breed != nil { + return true + } + + return false +} + +// SetBreed gets a reference to the given string and assigns it to the Breed field. +func (o *DogAllOf) SetBreed(v string) { + o.Breed = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o DogAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Breed != nil { + toSerialize["breed"] = o.Breed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go new file mode 100644 index 0000000000..4a06504b56 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go @@ -0,0 +1,101 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// EnumArrays struct for EnumArrays +type EnumArrays struct { + JustSymbol *string `json:"just_symbol,omitempty"` + + ArrayEnum *[]string `json:"array_enum,omitempty"` + +} + +// GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. +func (o *EnumArrays) GetJustSymbol() string { + if o == nil || o.JustSymbol == nil { + var ret string + return ret + } + return *o.JustSymbol +} + +// GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumArrays) GetJustSymbolOk() (string, bool) { + if o == nil || o.JustSymbol == nil { + var ret string + return ret, false + } + return *o.JustSymbol, true +} + +// HasJustSymbol returns a boolean if a field has been set. +func (o *EnumArrays) HasJustSymbol() bool { + if o != nil && o.JustSymbol != nil { + return true + } + + return false +} + +// SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field. +func (o *EnumArrays) SetJustSymbol(v string) { + o.JustSymbol = &v +} + +// GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. +func (o *EnumArrays) GetArrayEnum() []string { + if o == nil || o.ArrayEnum == nil { + var ret []string + return ret + } + return *o.ArrayEnum +} + +// GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) { + if o == nil || o.ArrayEnum == nil { + var ret []string + return ret, false + } + return *o.ArrayEnum, true +} + +// HasArrayEnum returns a boolean if a field has been set. +func (o *EnumArrays) HasArrayEnum() bool { + if o != nil && o.ArrayEnum != nil { + return true + } + + return false +} + +// SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field. +func (o *EnumArrays) SetArrayEnum(v []string) { + o.ArrayEnum = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o EnumArrays) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.JustSymbol != nil { + toSerialize["just_symbol"] = o.JustSymbol + } + if o.ArrayEnum != nil { + toSerialize["array_enum"] = o.ArrayEnum + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_class.go new file mode 100644 index 0000000000..6f7e93a986 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_class.go @@ -0,0 +1,21 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// EnumClass the model 'EnumClass' +type EnumClass string + +// List of EnumClass +const ( + ABC EnumClass = "_abc" + EFG EnumClass = "-efg" + XYZ EnumClass = "(xyz)" +) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go new file mode 100644 index 0000000000..5ed8bba1b7 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go @@ -0,0 +1,344 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" + "errors" +) +// EnumTest struct for EnumTest +type EnumTest struct { + EnumString *string `json:"enum_string,omitempty"` + + EnumStringRequired *string `json:"enum_string_required,omitempty"` + + EnumInteger *int32 `json:"enum_integer,omitempty"` + + EnumNumber *float64 `json:"enum_number,omitempty"` + + OuterEnum *OuterEnum `json:"outerEnum,omitempty"` + isExplicitNullOuterEnum bool `json:"-"` + OuterEnumInteger *OuterEnumInteger `json:"outerEnumInteger,omitempty"` + + OuterEnumDefaultValue *OuterEnumDefaultValue `json:"outerEnumDefaultValue,omitempty"` + + OuterEnumIntegerDefaultValue *OuterEnumIntegerDefaultValue `json:"outerEnumIntegerDefaultValue,omitempty"` + +} + +// GetEnumString returns the EnumString field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumString() string { + if o == nil || o.EnumString == nil { + var ret string + return ret + } + return *o.EnumString +} + +// GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumStringOk() (string, bool) { + if o == nil || o.EnumString == nil { + var ret string + return ret, false + } + return *o.EnumString, true +} + +// HasEnumString returns a boolean if a field has been set. +func (o *EnumTest) HasEnumString() bool { + if o != nil && o.EnumString != nil { + return true + } + + return false +} + +// SetEnumString gets a reference to the given string and assigns it to the EnumString field. +func (o *EnumTest) SetEnumString(v string) { + o.EnumString = &v +} + +// GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumStringRequired() string { + if o == nil || o.EnumStringRequired == nil { + var ret string + return ret + } + return *o.EnumStringRequired +} + +// GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumStringRequiredOk() (string, bool) { + if o == nil || o.EnumStringRequired == nil { + var ret string + return ret, false + } + return *o.EnumStringRequired, true +} + +// HasEnumStringRequired returns a boolean if a field has been set. +func (o *EnumTest) HasEnumStringRequired() bool { + if o != nil && o.EnumStringRequired != nil { + return true + } + + return false +} + +// SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field. +func (o *EnumTest) SetEnumStringRequired(v string) { + o.EnumStringRequired = &v +} + +// GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumInteger() int32 { + if o == nil || o.EnumInteger == nil { + var ret int32 + return ret + } + return *o.EnumInteger +} + +// GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumIntegerOk() (int32, bool) { + if o == nil || o.EnumInteger == nil { + var ret int32 + return ret, false + } + return *o.EnumInteger, true +} + +// HasEnumInteger returns a boolean if a field has been set. +func (o *EnumTest) HasEnumInteger() bool { + if o != nil && o.EnumInteger != nil { + return true + } + + return false +} + +// SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field. +func (o *EnumTest) SetEnumInteger(v int32) { + o.EnumInteger = &v +} + +// GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumNumber() float64 { + if o == nil || o.EnumNumber == nil { + var ret float64 + return ret + } + return *o.EnumNumber +} + +// GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumNumberOk() (float64, bool) { + if o == nil || o.EnumNumber == nil { + var ret float64 + return ret, false + } + return *o.EnumNumber, true +} + +// HasEnumNumber returns a boolean if a field has been set. +func (o *EnumTest) HasEnumNumber() bool { + if o != nil && o.EnumNumber != nil { + return true + } + + return false +} + +// SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field. +func (o *EnumTest) SetEnumNumber(v float64) { + o.EnumNumber = &v +} + +// GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. +func (o *EnumTest) GetOuterEnum() OuterEnum { + if o == nil || o.OuterEnum == nil { + var ret OuterEnum + return ret + } + return *o.OuterEnum +} + +// GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool) { + if o == nil || o.OuterEnum == nil { + var ret OuterEnum + return ret, false + } + return *o.OuterEnum, true +} + +// HasOuterEnum returns a boolean if a field has been set. +func (o *EnumTest) HasOuterEnum() bool { + if o != nil && o.OuterEnum != nil { + return true + } + + return false +} + +// SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field. +func (o *EnumTest) SetOuterEnum(v OuterEnum) { + o.OuterEnum = &v +} + +// SetOuterEnumExplicitNull (un)sets OuterEnum to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The OuterEnum value is set to nil even if false is passed +func (o *EnumTest) SetOuterEnumExplicitNull(b bool) { + o.OuterEnum = nil + o.isExplicitNullOuterEnum = b +} +// GetOuterEnumInteger returns the OuterEnumInteger field if non-nil, zero value otherwise. +func (o *EnumTest) GetOuterEnumInteger() OuterEnumInteger { + if o == nil || o.OuterEnumInteger == nil { + var ret OuterEnumInteger + return ret + } + return *o.OuterEnumInteger +} + +// GetOuterEnumIntegerOk returns a tuple with the OuterEnumInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetOuterEnumIntegerOk() (OuterEnumInteger, bool) { + if o == nil || o.OuterEnumInteger == nil { + var ret OuterEnumInteger + return ret, false + } + return *o.OuterEnumInteger, true +} + +// HasOuterEnumInteger returns a boolean if a field has been set. +func (o *EnumTest) HasOuterEnumInteger() bool { + if o != nil && o.OuterEnumInteger != nil { + return true + } + + return false +} + +// SetOuterEnumInteger gets a reference to the given OuterEnumInteger and assigns it to the OuterEnumInteger field. +func (o *EnumTest) SetOuterEnumInteger(v OuterEnumInteger) { + o.OuterEnumInteger = &v +} + +// GetOuterEnumDefaultValue returns the OuterEnumDefaultValue field if non-nil, zero value otherwise. +func (o *EnumTest) GetOuterEnumDefaultValue() OuterEnumDefaultValue { + if o == nil || o.OuterEnumDefaultValue == nil { + var ret OuterEnumDefaultValue + return ret + } + return *o.OuterEnumDefaultValue +} + +// GetOuterEnumDefaultValueOk returns a tuple with the OuterEnumDefaultValue field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetOuterEnumDefaultValueOk() (OuterEnumDefaultValue, bool) { + if o == nil || o.OuterEnumDefaultValue == nil { + var ret OuterEnumDefaultValue + return ret, false + } + return *o.OuterEnumDefaultValue, true +} + +// HasOuterEnumDefaultValue returns a boolean if a field has been set. +func (o *EnumTest) HasOuterEnumDefaultValue() bool { + if o != nil && o.OuterEnumDefaultValue != nil { + return true + } + + return false +} + +// SetOuterEnumDefaultValue gets a reference to the given OuterEnumDefaultValue and assigns it to the OuterEnumDefaultValue field. +func (o *EnumTest) SetOuterEnumDefaultValue(v OuterEnumDefaultValue) { + o.OuterEnumDefaultValue = &v +} + +// GetOuterEnumIntegerDefaultValue returns the OuterEnumIntegerDefaultValue field if non-nil, zero value otherwise. +func (o *EnumTest) GetOuterEnumIntegerDefaultValue() OuterEnumIntegerDefaultValue { + if o == nil || o.OuterEnumIntegerDefaultValue == nil { + var ret OuterEnumIntegerDefaultValue + return ret + } + return *o.OuterEnumIntegerDefaultValue +} + +// GetOuterEnumIntegerDefaultValueOk returns a tuple with the OuterEnumIntegerDefaultValue field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetOuterEnumIntegerDefaultValueOk() (OuterEnumIntegerDefaultValue, bool) { + if o == nil || o.OuterEnumIntegerDefaultValue == nil { + var ret OuterEnumIntegerDefaultValue + return ret, false + } + return *o.OuterEnumIntegerDefaultValue, true +} + +// HasOuterEnumIntegerDefaultValue returns a boolean if a field has been set. +func (o *EnumTest) HasOuterEnumIntegerDefaultValue() bool { + if o != nil && o.OuterEnumIntegerDefaultValue != nil { + return true + } + + return false +} + +// SetOuterEnumIntegerDefaultValue gets a reference to the given OuterEnumIntegerDefaultValue and assigns it to the OuterEnumIntegerDefaultValue field. +func (o *EnumTest) SetOuterEnumIntegerDefaultValue(v OuterEnumIntegerDefaultValue) { + o.OuterEnumIntegerDefaultValue = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o EnumTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.EnumString != nil { + toSerialize["enum_string"] = o.EnumString + } + if o.EnumStringRequired == nil { + return nil, errors.New("EnumStringRequired is required and not nullable, but was not set on EnumTest") + } + if o.EnumStringRequired != nil { + toSerialize["enum_string_required"] = o.EnumStringRequired + } + if o.EnumInteger != nil { + toSerialize["enum_integer"] = o.EnumInteger + } + if o.EnumNumber != nil { + toSerialize["enum_number"] = o.EnumNumber + } + if o.OuterEnum == nil { + if o.isExplicitNullOuterEnum { + toSerialize["outerEnum"] = o.OuterEnum + } + } else { + toSerialize["outerEnum"] = o.OuterEnum + } + if o.OuterEnumInteger != nil { + toSerialize["outerEnumInteger"] = o.OuterEnumInteger + } + if o.OuterEnumDefaultValue != nil { + toSerialize["outerEnumDefaultValue"] = o.OuterEnumDefaultValue + } + if o.OuterEnumIntegerDefaultValue != nil { + toSerialize["outerEnumIntegerDefaultValue"] = o.OuterEnumIntegerDefaultValue + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go new file mode 100644 index 0000000000..a39a447e2b --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go @@ -0,0 +1,64 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// File Must be named `File` for test. +type File struct { + // Test capitalization + SourceURI *string `json:"sourceURI,omitempty"` + +} + +// GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. +func (o *File) GetSourceURI() string { + if o == nil || o.SourceURI == nil { + var ret string + return ret + } + return *o.SourceURI +} + +// GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *File) GetSourceURIOk() (string, bool) { + if o == nil || o.SourceURI == nil { + var ret string + return ret, false + } + return *o.SourceURI, true +} + +// HasSourceURI returns a boolean if a field has been set. +func (o *File) HasSourceURI() bool { + if o != nil && o.SourceURI != nil { + return true + } + + return false +} + +// SetSourceURI gets a reference to the given string and assigns it to the SourceURI field. +func (o *File) SetSourceURI(v string) { + o.SourceURI = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o File) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SourceURI != nil { + toSerialize["sourceURI"] = o.SourceURI + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go new file mode 100644 index 0000000000..ce392ac89d --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go @@ -0,0 +1,101 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// FileSchemaTestClass struct for FileSchemaTestClass +type FileSchemaTestClass struct { + File *File `json:"file,omitempty"` + + Files *[]File `json:"files,omitempty"` + +} + +// GetFile returns the File field if non-nil, zero value otherwise. +func (o *FileSchemaTestClass) GetFile() File { + if o == nil || o.File == nil { + var ret File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FileSchemaTestClass) GetFileOk() (File, bool) { + if o == nil || o.File == nil { + var ret File + return ret, false + } + return *o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *FileSchemaTestClass) HasFile() bool { + if o != nil && o.File != nil { + return true + } + + return false +} + +// SetFile gets a reference to the given File and assigns it to the File field. +func (o *FileSchemaTestClass) SetFile(v File) { + o.File = &v +} + +// GetFiles returns the Files field if non-nil, zero value otherwise. +func (o *FileSchemaTestClass) GetFiles() []File { + if o == nil || o.Files == nil { + var ret []File + return ret + } + return *o.Files +} + +// GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) { + if o == nil || o.Files == nil { + var ret []File + return ret, false + } + return *o.Files, true +} + +// HasFiles returns a boolean if a field has been set. +func (o *FileSchemaTestClass) HasFiles() bool { + if o != nil && o.Files != nil { + return true + } + + return false +} + +// SetFiles gets a reference to the given []File and assigns it to the Files field. +func (o *FileSchemaTestClass) SetFiles(v []File) { + o.Files = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.File != nil { + toSerialize["file"] = o.File + } + if o.Files != nil { + toSerialize["files"] = o.Files + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go new file mode 100644 index 0000000000..ae61f7394b --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// Foo struct for Foo +type Foo struct { + Bar *string `json:"bar,omitempty"` + +} + +// GetBar returns the Bar field if non-nil, zero value otherwise. +func (o *Foo) GetBar() string { + if o == nil || o.Bar == nil { + var ret string + return ret + } + return *o.Bar +} + +// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Foo) GetBarOk() (string, bool) { + if o == nil || o.Bar == nil { + var ret string + return ret, false + } + return *o.Bar, true +} + +// HasBar returns a boolean if a field has been set. +func (o *Foo) HasBar() bool { + if o != nil && o.Bar != nil { + return true + } + + return false +} + +// SetBar gets a reference to the given string and assigns it to the Bar field. +func (o *Foo) SetBar(v string) { + o.Bar = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Foo) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Bar != nil { + toSerialize["bar"] = o.Bar + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go new file mode 100644 index 0000000000..a544db3136 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go @@ -0,0 +1,612 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "os" + "time" + "encoding/json" + "errors" +) +// FormatTest struct for FormatTest +type FormatTest struct { + Integer *int32 `json:"integer,omitempty"` + + Int32 *int32 `json:"int32,omitempty"` + + Int64 *int64 `json:"int64,omitempty"` + + Number *float32 `json:"number,omitempty"` + + Float *float32 `json:"float,omitempty"` + + Double *float64 `json:"double,omitempty"` + + String *string `json:"string,omitempty"` + + Byte *string `json:"byte,omitempty"` + + Binary **os.File `json:"binary,omitempty"` + + Date *string `json:"date,omitempty"` + + DateTime *time.Time `json:"dateTime,omitempty"` + + Uuid *string `json:"uuid,omitempty"` + + Password *string `json:"password,omitempty"` + + // A string that is a 10 digit number. Can have leading zeros. + PatternWithDigits *string `json:"pattern_with_digits,omitempty"` + + // A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + PatternWithDigitsAndDelimiter *string `json:"pattern_with_digits_and_delimiter,omitempty"` + +} + +// GetInteger returns the Integer field if non-nil, zero value otherwise. +func (o *FormatTest) GetInteger() int32 { + if o == nil || o.Integer == nil { + var ret int32 + return ret + } + return *o.Integer +} + +// GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetIntegerOk() (int32, bool) { + if o == nil || o.Integer == nil { + var ret int32 + return ret, false + } + return *o.Integer, true +} + +// HasInteger returns a boolean if a field has been set. +func (o *FormatTest) HasInteger() bool { + if o != nil && o.Integer != nil { + return true + } + + return false +} + +// SetInteger gets a reference to the given int32 and assigns it to the Integer field. +func (o *FormatTest) SetInteger(v int32) { + o.Integer = &v +} + +// GetInt32 returns the Int32 field if non-nil, zero value otherwise. +func (o *FormatTest) GetInt32() int32 { + if o == nil || o.Int32 == nil { + var ret int32 + return ret + } + return *o.Int32 +} + +// GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetInt32Ok() (int32, bool) { + if o == nil || o.Int32 == nil { + var ret int32 + return ret, false + } + return *o.Int32, true +} + +// HasInt32 returns a boolean if a field has been set. +func (o *FormatTest) HasInt32() bool { + if o != nil && o.Int32 != nil { + return true + } + + return false +} + +// SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. +func (o *FormatTest) SetInt32(v int32) { + o.Int32 = &v +} + +// GetInt64 returns the Int64 field if non-nil, zero value otherwise. +func (o *FormatTest) GetInt64() int64 { + if o == nil || o.Int64 == nil { + var ret int64 + return ret + } + return *o.Int64 +} + +// GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetInt64Ok() (int64, bool) { + if o == nil || o.Int64 == nil { + var ret int64 + return ret, false + } + return *o.Int64, true +} + +// HasInt64 returns a boolean if a field has been set. +func (o *FormatTest) HasInt64() bool { + if o != nil && o.Int64 != nil { + return true + } + + return false +} + +// SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. +func (o *FormatTest) SetInt64(v int64) { + o.Int64 = &v +} + +// GetNumber returns the Number field if non-nil, zero value otherwise. +func (o *FormatTest) GetNumber() float32 { + if o == nil || o.Number == nil { + var ret float32 + return ret + } + return *o.Number +} + +// GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetNumberOk() (float32, bool) { + if o == nil || o.Number == nil { + var ret float32 + return ret, false + } + return *o.Number, true +} + +// HasNumber returns a boolean if a field has been set. +func (o *FormatTest) HasNumber() bool { + if o != nil && o.Number != nil { + return true + } + + return false +} + +// SetNumber gets a reference to the given float32 and assigns it to the Number field. +func (o *FormatTest) SetNumber(v float32) { + o.Number = &v +} + +// GetFloat returns the Float field if non-nil, zero value otherwise. +func (o *FormatTest) GetFloat() float32 { + if o == nil || o.Float == nil { + var ret float32 + return ret + } + return *o.Float +} + +// GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetFloatOk() (float32, bool) { + if o == nil || o.Float == nil { + var ret float32 + return ret, false + } + return *o.Float, true +} + +// HasFloat returns a boolean if a field has been set. +func (o *FormatTest) HasFloat() bool { + if o != nil && o.Float != nil { + return true + } + + return false +} + +// SetFloat gets a reference to the given float32 and assigns it to the Float field. +func (o *FormatTest) SetFloat(v float32) { + o.Float = &v +} + +// GetDouble returns the Double field if non-nil, zero value otherwise. +func (o *FormatTest) GetDouble() float64 { + if o == nil || o.Double == nil { + var ret float64 + return ret + } + return *o.Double +} + +// GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDoubleOk() (float64, bool) { + if o == nil || o.Double == nil { + var ret float64 + return ret, false + } + return *o.Double, true +} + +// HasDouble returns a boolean if a field has been set. +func (o *FormatTest) HasDouble() bool { + if o != nil && o.Double != nil { + return true + } + + return false +} + +// SetDouble gets a reference to the given float64 and assigns it to the Double field. +func (o *FormatTest) SetDouble(v float64) { + o.Double = &v +} + +// GetString returns the String field if non-nil, zero value otherwise. +func (o *FormatTest) GetString() string { + if o == nil || o.String == nil { + var ret string + return ret + } + return *o.String +} + +// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetStringOk() (string, bool) { + if o == nil || o.String == nil { + var ret string + return ret, false + } + return *o.String, true +} + +// HasString returns a boolean if a field has been set. +func (o *FormatTest) HasString() bool { + if o != nil && o.String != nil { + return true + } + + return false +} + +// SetString gets a reference to the given string and assigns it to the String field. +func (o *FormatTest) SetString(v string) { + o.String = &v +} + +// GetByte returns the Byte field if non-nil, zero value otherwise. +func (o *FormatTest) GetByte() string { + if o == nil || o.Byte == nil { + var ret string + return ret + } + return *o.Byte +} + +// GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetByteOk() (string, bool) { + if o == nil || o.Byte == nil { + var ret string + return ret, false + } + return *o.Byte, true +} + +// HasByte returns a boolean if a field has been set. +func (o *FormatTest) HasByte() bool { + if o != nil && o.Byte != nil { + return true + } + + return false +} + +// SetByte gets a reference to the given string and assigns it to the Byte field. +func (o *FormatTest) SetByte(v string) { + o.Byte = &v +} + +// GetBinary returns the Binary field if non-nil, zero value otherwise. +func (o *FormatTest) GetBinary() *os.File { + if o == nil || o.Binary == nil { + var ret *os.File + return ret + } + return *o.Binary +} + +// GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetBinaryOk() (*os.File, bool) { + if o == nil || o.Binary == nil { + var ret *os.File + return ret, false + } + return *o.Binary, true +} + +// HasBinary returns a boolean if a field has been set. +func (o *FormatTest) HasBinary() bool { + if o != nil && o.Binary != nil { + return true + } + + return false +} + +// SetBinary gets a reference to the given *os.File and assigns it to the Binary field. +func (o *FormatTest) SetBinary(v *os.File) { + o.Binary = &v +} + +// GetDate returns the Date field if non-nil, zero value otherwise. +func (o *FormatTest) GetDate() string { + if o == nil || o.Date == nil { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDateOk() (string, bool) { + if o == nil || o.Date == nil { + var ret string + return ret, false + } + return *o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *FormatTest) HasDate() bool { + if o != nil && o.Date != nil { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *FormatTest) SetDate(v string) { + o.Date = &v +} + +// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +func (o *FormatTest) GetDateTime() time.Time { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret + } + return *o.DateTime +} + +// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDateTimeOk() (time.Time, bool) { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret, false + } + return *o.DateTime, true +} + +// HasDateTime returns a boolean if a field has been set. +func (o *FormatTest) HasDateTime() bool { + if o != nil && o.DateTime != nil { + return true + } + + return false +} + +// SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +func (o *FormatTest) SetDateTime(v time.Time) { + o.DateTime = &v +} + +// GetUuid returns the Uuid field if non-nil, zero value otherwise. +func (o *FormatTest) GetUuid() string { + if o == nil || o.Uuid == nil { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetUuidOk() (string, bool) { + if o == nil || o.Uuid == nil { + var ret string + return ret, false + } + return *o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *FormatTest) HasUuid() bool { + if o != nil && o.Uuid != nil { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *FormatTest) SetUuid(v string) { + o.Uuid = &v +} + +// GetPassword returns the Password field if non-nil, zero value otherwise. +func (o *FormatTest) GetPassword() string { + if o == nil || o.Password == nil { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetPasswordOk() (string, bool) { + if o == nil || o.Password == nil { + var ret string + return ret, false + } + return *o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *FormatTest) HasPassword() bool { + if o != nil && o.Password != nil { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *FormatTest) SetPassword(v string) { + o.Password = &v +} + +// GetPatternWithDigits returns the PatternWithDigits field if non-nil, zero value otherwise. +func (o *FormatTest) GetPatternWithDigits() string { + if o == nil || o.PatternWithDigits == nil { + var ret string + return ret + } + return *o.PatternWithDigits +} + +// GetPatternWithDigitsOk returns a tuple with the PatternWithDigits field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetPatternWithDigitsOk() (string, bool) { + if o == nil || o.PatternWithDigits == nil { + var ret string + return ret, false + } + return *o.PatternWithDigits, true +} + +// HasPatternWithDigits returns a boolean if a field has been set. +func (o *FormatTest) HasPatternWithDigits() bool { + if o != nil && o.PatternWithDigits != nil { + return true + } + + return false +} + +// SetPatternWithDigits gets a reference to the given string and assigns it to the PatternWithDigits field. +func (o *FormatTest) SetPatternWithDigits(v string) { + o.PatternWithDigits = &v +} + +// GetPatternWithDigitsAndDelimiter returns the PatternWithDigitsAndDelimiter field if non-nil, zero value otherwise. +func (o *FormatTest) GetPatternWithDigitsAndDelimiter() string { + if o == nil || o.PatternWithDigitsAndDelimiter == nil { + var ret string + return ret + } + return *o.PatternWithDigitsAndDelimiter +} + +// GetPatternWithDigitsAndDelimiterOk returns a tuple with the PatternWithDigitsAndDelimiter field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetPatternWithDigitsAndDelimiterOk() (string, bool) { + if o == nil || o.PatternWithDigitsAndDelimiter == nil { + var ret string + return ret, false + } + return *o.PatternWithDigitsAndDelimiter, true +} + +// HasPatternWithDigitsAndDelimiter returns a boolean if a field has been set. +func (o *FormatTest) HasPatternWithDigitsAndDelimiter() bool { + if o != nil && o.PatternWithDigitsAndDelimiter != nil { + return true + } + + return false +} + +// SetPatternWithDigitsAndDelimiter gets a reference to the given string and assigns it to the PatternWithDigitsAndDelimiter field. +func (o *FormatTest) SetPatternWithDigitsAndDelimiter(v string) { + o.PatternWithDigitsAndDelimiter = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o FormatTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Integer != nil { + toSerialize["integer"] = o.Integer + } + if o.Int32 != nil { + toSerialize["int32"] = o.Int32 + } + if o.Int64 != nil { + toSerialize["int64"] = o.Int64 + } + if o.Number == nil { + return nil, errors.New("Number is required and not nullable, but was not set on FormatTest") + } + if o.Number != nil { + toSerialize["number"] = o.Number + } + if o.Float != nil { + toSerialize["float"] = o.Float + } + if o.Double != nil { + toSerialize["double"] = o.Double + } + if o.String != nil { + toSerialize["string"] = o.String + } + if o.Byte == nil { + return nil, errors.New("Byte is required and not nullable, but was not set on FormatTest") + } + if o.Byte != nil { + toSerialize["byte"] = o.Byte + } + if o.Binary != nil { + toSerialize["binary"] = o.Binary + } + if o.Date == nil { + return nil, errors.New("Date is required and not nullable, but was not set on FormatTest") + } + if o.Date != nil { + toSerialize["date"] = o.Date + } + if o.DateTime != nil { + toSerialize["dateTime"] = o.DateTime + } + if o.Uuid != nil { + toSerialize["uuid"] = o.Uuid + } + if o.Password == nil { + return nil, errors.New("Password is required and not nullable, but was not set on FormatTest") + } + if o.Password != nil { + toSerialize["password"] = o.Password + } + if o.PatternWithDigits != nil { + toSerialize["pattern_with_digits"] = o.PatternWithDigits + } + if o.PatternWithDigitsAndDelimiter != nil { + toSerialize["pattern_with_digits_and_delimiter"] = o.PatternWithDigitsAndDelimiter + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go new file mode 100644 index 0000000000..708df84783 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go @@ -0,0 +1,101 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// HasOnlyReadOnly struct for HasOnlyReadOnly +type HasOnlyReadOnly struct { + Bar *string `json:"bar,omitempty"` + + Foo *string `json:"foo,omitempty"` + +} + +// GetBar returns the Bar field if non-nil, zero value otherwise. +func (o *HasOnlyReadOnly) GetBar() string { + if o == nil || o.Bar == nil { + var ret string + return ret + } + return *o.Bar +} + +// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *HasOnlyReadOnly) GetBarOk() (string, bool) { + if o == nil || o.Bar == nil { + var ret string + return ret, false + } + return *o.Bar, true +} + +// HasBar returns a boolean if a field has been set. +func (o *HasOnlyReadOnly) HasBar() bool { + if o != nil && o.Bar != nil { + return true + } + + return false +} + +// SetBar gets a reference to the given string and assigns it to the Bar field. +func (o *HasOnlyReadOnly) SetBar(v string) { + o.Bar = &v +} + +// GetFoo returns the Foo field if non-nil, zero value otherwise. +func (o *HasOnlyReadOnly) GetFoo() string { + if o == nil || o.Foo == nil { + var ret string + return ret + } + return *o.Foo +} + +// GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *HasOnlyReadOnly) GetFooOk() (string, bool) { + if o == nil || o.Foo == nil { + var ret string + return ret, false + } + return *o.Foo, true +} + +// HasFoo returns a boolean if a field has been set. +func (o *HasOnlyReadOnly) HasFoo() bool { + if o != nil && o.Foo != nil { + return true + } + + return false +} + +// SetFoo gets a reference to the given string and assigns it to the Foo field. +func (o *HasOnlyReadOnly) SetFoo(v string) { + o.Foo = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o HasOnlyReadOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Bar != nil { + toSerialize["bar"] = o.Bar + } + if o.Foo != nil { + toSerialize["foo"] = o.Foo + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go new file mode 100644 index 0000000000..6a83bf7914 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go @@ -0,0 +1,74 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// HealthCheckResult Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. +type HealthCheckResult struct { + NullableMessage *string `json:"NullableMessage,omitempty"` + isExplicitNullNullableMessage bool `json:"-"` +} + +// GetNullableMessage returns the NullableMessage field if non-nil, zero value otherwise. +func (o *HealthCheckResult) GetNullableMessage() string { + if o == nil || o.NullableMessage == nil { + var ret string + return ret + } + return *o.NullableMessage +} + +// GetNullableMessageOk returns a tuple with the NullableMessage field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckResult) GetNullableMessageOk() (string, bool) { + if o == nil || o.NullableMessage == nil { + var ret string + return ret, false + } + return *o.NullableMessage, true +} + +// HasNullableMessage returns a boolean if a field has been set. +func (o *HealthCheckResult) HasNullableMessage() bool { + if o != nil && o.NullableMessage != nil { + return true + } + + return false +} + +// SetNullableMessage gets a reference to the given string and assigns it to the NullableMessage field. +func (o *HealthCheckResult) SetNullableMessage(v string) { + o.NullableMessage = &v +} + +// SetNullableMessageExplicitNull (un)sets NullableMessage to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The NullableMessage value is set to nil even if false is passed +func (o *HealthCheckResult) SetNullableMessageExplicitNull(b bool) { + o.NullableMessage = nil + o.isExplicitNullNullableMessage = b +} + +// MarshalJSON returns the JSON representation of the model. +func (o HealthCheckResult) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.NullableMessage == nil { + if o.isExplicitNullNullableMessage { + toSerialize["NullableMessage"] = o.NullableMessage + } + } else { + toSerialize["NullableMessage"] = o.NullableMessage + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go new file mode 100644 index 0000000000..830295fd4b --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go @@ -0,0 +1,103 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// InlineObject struct for InlineObject +type InlineObject struct { + // Updated name of the pet + Name *string `json:"name,omitempty"` + + // Updated status of the pet + Status *string `json:"status,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *InlineObject) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *InlineObject) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *InlineObject) SetName(v string) { + o.Name = &v +} + +// GetStatus returns the Status field if non-nil, zero value otherwise. +func (o *InlineObject) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject) GetStatusOk() (string, bool) { + if o == nil || o.Status == nil { + var ret string + return ret, false + } + return *o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *InlineObject) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *InlineObject) SetStatus(v string) { + o.Status = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o InlineObject) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go new file mode 100644 index 0000000000..0dc45833a7 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go @@ -0,0 +1,104 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "os" + "encoding/json" +) +// InlineObject1 struct for InlineObject1 +type InlineObject1 struct { + // Additional data to pass to server + AdditionalMetadata *string `json:"additionalMetadata,omitempty"` + + // file to upload + File **os.File `json:"file,omitempty"` + +} + +// GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero value otherwise. +func (o *InlineObject1) GetAdditionalMetadata() string { + if o == nil || o.AdditionalMetadata == nil { + var ret string + return ret + } + return *o.AdditionalMetadata +} + +// GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject1) GetAdditionalMetadataOk() (string, bool) { + if o == nil || o.AdditionalMetadata == nil { + var ret string + return ret, false + } + return *o.AdditionalMetadata, true +} + +// HasAdditionalMetadata returns a boolean if a field has been set. +func (o *InlineObject1) HasAdditionalMetadata() bool { + if o != nil && o.AdditionalMetadata != nil { + return true + } + + return false +} + +// SetAdditionalMetadata gets a reference to the given string and assigns it to the AdditionalMetadata field. +func (o *InlineObject1) SetAdditionalMetadata(v string) { + o.AdditionalMetadata = &v +} + +// GetFile returns the File field if non-nil, zero value otherwise. +func (o *InlineObject1) GetFile() *os.File { + if o == nil || o.File == nil { + var ret *os.File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject1) GetFileOk() (*os.File, bool) { + if o == nil || o.File == nil { + var ret *os.File + return ret, false + } + return *o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *InlineObject1) HasFile() bool { + if o != nil && o.File != nil { + return true + } + + return false +} + +// SetFile gets a reference to the given *os.File and assigns it to the File field. +func (o *InlineObject1) SetFile(v *os.File) { + o.File = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o InlineObject1) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AdditionalMetadata != nil { + toSerialize["additionalMetadata"] = o.AdditionalMetadata + } + if o.File != nil { + toSerialize["file"] = o.File + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go new file mode 100644 index 0000000000..4b1bf9ec3a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go @@ -0,0 +1,103 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// InlineObject2 struct for InlineObject2 +type InlineObject2 struct { + // Form parameter enum test (string array) + EnumFormStringArray *[]string `json:"enum_form_string_array,omitempty"` + + // Form parameter enum test (string) + EnumFormString *string `json:"enum_form_string,omitempty"` + +} + +// GetEnumFormStringArray returns the EnumFormStringArray field if non-nil, zero value otherwise. +func (o *InlineObject2) GetEnumFormStringArray() []string { + if o == nil || o.EnumFormStringArray == nil { + var ret []string + return ret + } + return *o.EnumFormStringArray +} + +// GetEnumFormStringArrayOk returns a tuple with the EnumFormStringArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject2) GetEnumFormStringArrayOk() ([]string, bool) { + if o == nil || o.EnumFormStringArray == nil { + var ret []string + return ret, false + } + return *o.EnumFormStringArray, true +} + +// HasEnumFormStringArray returns a boolean if a field has been set. +func (o *InlineObject2) HasEnumFormStringArray() bool { + if o != nil && o.EnumFormStringArray != nil { + return true + } + + return false +} + +// SetEnumFormStringArray gets a reference to the given []string and assigns it to the EnumFormStringArray field. +func (o *InlineObject2) SetEnumFormStringArray(v []string) { + o.EnumFormStringArray = &v +} + +// GetEnumFormString returns the EnumFormString field if non-nil, zero value otherwise. +func (o *InlineObject2) GetEnumFormString() string { + if o == nil || o.EnumFormString == nil { + var ret string + return ret + } + return *o.EnumFormString +} + +// GetEnumFormStringOk returns a tuple with the EnumFormString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject2) GetEnumFormStringOk() (string, bool) { + if o == nil || o.EnumFormString == nil { + var ret string + return ret, false + } + return *o.EnumFormString, true +} + +// HasEnumFormString returns a boolean if a field has been set. +func (o *InlineObject2) HasEnumFormString() bool { + if o != nil && o.EnumFormString != nil { + return true + } + + return false +} + +// SetEnumFormString gets a reference to the given string and assigns it to the EnumFormString field. +func (o *InlineObject2) SetEnumFormString(v string) { + o.EnumFormString = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o InlineObject2) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.EnumFormStringArray != nil { + toSerialize["enum_form_string_array"] = o.EnumFormStringArray + } + if o.EnumFormString != nil { + toSerialize["enum_form_string"] = o.EnumFormString + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go new file mode 100644 index 0000000000..54dd573d90 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go @@ -0,0 +1,586 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "os" + "time" + "encoding/json" + "errors" +) +// InlineObject3 struct for InlineObject3 +type InlineObject3 struct { + // None + Integer *int32 `json:"integer,omitempty"` + + // None + Int32 *int32 `json:"int32,omitempty"` + + // None + Int64 *int64 `json:"int64,omitempty"` + + // None + Number *float32 `json:"number,omitempty"` + + // None + Float *float32 `json:"float,omitempty"` + + // None + Double *float64 `json:"double,omitempty"` + + // None + String *string `json:"string,omitempty"` + + // None + PatternWithoutDelimiter *string `json:"pattern_without_delimiter,omitempty"` + + // None + Byte *string `json:"byte,omitempty"` + + // None + Binary **os.File `json:"binary,omitempty"` + + // None + Date *string `json:"date,omitempty"` + + // None + DateTime *time.Time `json:"dateTime,omitempty"` + + // None + Password *string `json:"password,omitempty"` + + // None + Callback *string `json:"callback,omitempty"` + +} + +// GetInteger returns the Integer field if non-nil, zero value otherwise. +func (o *InlineObject3) GetInteger() int32 { + if o == nil || o.Integer == nil { + var ret int32 + return ret + } + return *o.Integer +} + +// GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetIntegerOk() (int32, bool) { + if o == nil || o.Integer == nil { + var ret int32 + return ret, false + } + return *o.Integer, true +} + +// HasInteger returns a boolean if a field has been set. +func (o *InlineObject3) HasInteger() bool { + if o != nil && o.Integer != nil { + return true + } + + return false +} + +// SetInteger gets a reference to the given int32 and assigns it to the Integer field. +func (o *InlineObject3) SetInteger(v int32) { + o.Integer = &v +} + +// GetInt32 returns the Int32 field if non-nil, zero value otherwise. +func (o *InlineObject3) GetInt32() int32 { + if o == nil || o.Int32 == nil { + var ret int32 + return ret + } + return *o.Int32 +} + +// GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetInt32Ok() (int32, bool) { + if o == nil || o.Int32 == nil { + var ret int32 + return ret, false + } + return *o.Int32, true +} + +// HasInt32 returns a boolean if a field has been set. +func (o *InlineObject3) HasInt32() bool { + if o != nil && o.Int32 != nil { + return true + } + + return false +} + +// SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. +func (o *InlineObject3) SetInt32(v int32) { + o.Int32 = &v +} + +// GetInt64 returns the Int64 field if non-nil, zero value otherwise. +func (o *InlineObject3) GetInt64() int64 { + if o == nil || o.Int64 == nil { + var ret int64 + return ret + } + return *o.Int64 +} + +// GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetInt64Ok() (int64, bool) { + if o == nil || o.Int64 == nil { + var ret int64 + return ret, false + } + return *o.Int64, true +} + +// HasInt64 returns a boolean if a field has been set. +func (o *InlineObject3) HasInt64() bool { + if o != nil && o.Int64 != nil { + return true + } + + return false +} + +// SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. +func (o *InlineObject3) SetInt64(v int64) { + o.Int64 = &v +} + +// GetNumber returns the Number field if non-nil, zero value otherwise. +func (o *InlineObject3) GetNumber() float32 { + if o == nil || o.Number == nil { + var ret float32 + return ret + } + return *o.Number +} + +// GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetNumberOk() (float32, bool) { + if o == nil || o.Number == nil { + var ret float32 + return ret, false + } + return *o.Number, true +} + +// HasNumber returns a boolean if a field has been set. +func (o *InlineObject3) HasNumber() bool { + if o != nil && o.Number != nil { + return true + } + + return false +} + +// SetNumber gets a reference to the given float32 and assigns it to the Number field. +func (o *InlineObject3) SetNumber(v float32) { + o.Number = &v +} + +// GetFloat returns the Float field if non-nil, zero value otherwise. +func (o *InlineObject3) GetFloat() float32 { + if o == nil || o.Float == nil { + var ret float32 + return ret + } + return *o.Float +} + +// GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetFloatOk() (float32, bool) { + if o == nil || o.Float == nil { + var ret float32 + return ret, false + } + return *o.Float, true +} + +// HasFloat returns a boolean if a field has been set. +func (o *InlineObject3) HasFloat() bool { + if o != nil && o.Float != nil { + return true + } + + return false +} + +// SetFloat gets a reference to the given float32 and assigns it to the Float field. +func (o *InlineObject3) SetFloat(v float32) { + o.Float = &v +} + +// GetDouble returns the Double field if non-nil, zero value otherwise. +func (o *InlineObject3) GetDouble() float64 { + if o == nil || o.Double == nil { + var ret float64 + return ret + } + return *o.Double +} + +// GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetDoubleOk() (float64, bool) { + if o == nil || o.Double == nil { + var ret float64 + return ret, false + } + return *o.Double, true +} + +// HasDouble returns a boolean if a field has been set. +func (o *InlineObject3) HasDouble() bool { + if o != nil && o.Double != nil { + return true + } + + return false +} + +// SetDouble gets a reference to the given float64 and assigns it to the Double field. +func (o *InlineObject3) SetDouble(v float64) { + o.Double = &v +} + +// GetString returns the String field if non-nil, zero value otherwise. +func (o *InlineObject3) GetString() string { + if o == nil || o.String == nil { + var ret string + return ret + } + return *o.String +} + +// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetStringOk() (string, bool) { + if o == nil || o.String == nil { + var ret string + return ret, false + } + return *o.String, true +} + +// HasString returns a boolean if a field has been set. +func (o *InlineObject3) HasString() bool { + if o != nil && o.String != nil { + return true + } + + return false +} + +// SetString gets a reference to the given string and assigns it to the String field. +func (o *InlineObject3) SetString(v string) { + o.String = &v +} + +// GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field if non-nil, zero value otherwise. +func (o *InlineObject3) GetPatternWithoutDelimiter() string { + if o == nil || o.PatternWithoutDelimiter == nil { + var ret string + return ret + } + return *o.PatternWithoutDelimiter +} + +// GetPatternWithoutDelimiterOk returns a tuple with the PatternWithoutDelimiter field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetPatternWithoutDelimiterOk() (string, bool) { + if o == nil || o.PatternWithoutDelimiter == nil { + var ret string + return ret, false + } + return *o.PatternWithoutDelimiter, true +} + +// HasPatternWithoutDelimiter returns a boolean if a field has been set. +func (o *InlineObject3) HasPatternWithoutDelimiter() bool { + if o != nil && o.PatternWithoutDelimiter != nil { + return true + } + + return false +} + +// SetPatternWithoutDelimiter gets a reference to the given string and assigns it to the PatternWithoutDelimiter field. +func (o *InlineObject3) SetPatternWithoutDelimiter(v string) { + o.PatternWithoutDelimiter = &v +} + +// GetByte returns the Byte field if non-nil, zero value otherwise. +func (o *InlineObject3) GetByte() string { + if o == nil || o.Byte == nil { + var ret string + return ret + } + return *o.Byte +} + +// GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetByteOk() (string, bool) { + if o == nil || o.Byte == nil { + var ret string + return ret, false + } + return *o.Byte, true +} + +// HasByte returns a boolean if a field has been set. +func (o *InlineObject3) HasByte() bool { + if o != nil && o.Byte != nil { + return true + } + + return false +} + +// SetByte gets a reference to the given string and assigns it to the Byte field. +func (o *InlineObject3) SetByte(v string) { + o.Byte = &v +} + +// GetBinary returns the Binary field if non-nil, zero value otherwise. +func (o *InlineObject3) GetBinary() *os.File { + if o == nil || o.Binary == nil { + var ret *os.File + return ret + } + return *o.Binary +} + +// GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetBinaryOk() (*os.File, bool) { + if o == nil || o.Binary == nil { + var ret *os.File + return ret, false + } + return *o.Binary, true +} + +// HasBinary returns a boolean if a field has been set. +func (o *InlineObject3) HasBinary() bool { + if o != nil && o.Binary != nil { + return true + } + + return false +} + +// SetBinary gets a reference to the given *os.File and assigns it to the Binary field. +func (o *InlineObject3) SetBinary(v *os.File) { + o.Binary = &v +} + +// GetDate returns the Date field if non-nil, zero value otherwise. +func (o *InlineObject3) GetDate() string { + if o == nil || o.Date == nil { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetDateOk() (string, bool) { + if o == nil || o.Date == nil { + var ret string + return ret, false + } + return *o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *InlineObject3) HasDate() bool { + if o != nil && o.Date != nil { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *InlineObject3) SetDate(v string) { + o.Date = &v +} + +// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +func (o *InlineObject3) GetDateTime() time.Time { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret + } + return *o.DateTime +} + +// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetDateTimeOk() (time.Time, bool) { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret, false + } + return *o.DateTime, true +} + +// HasDateTime returns a boolean if a field has been set. +func (o *InlineObject3) HasDateTime() bool { + if o != nil && o.DateTime != nil { + return true + } + + return false +} + +// SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +func (o *InlineObject3) SetDateTime(v time.Time) { + o.DateTime = &v +} + +// GetPassword returns the Password field if non-nil, zero value otherwise. +func (o *InlineObject3) GetPassword() string { + if o == nil || o.Password == nil { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetPasswordOk() (string, bool) { + if o == nil || o.Password == nil { + var ret string + return ret, false + } + return *o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *InlineObject3) HasPassword() bool { + if o != nil && o.Password != nil { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *InlineObject3) SetPassword(v string) { + o.Password = &v +} + +// GetCallback returns the Callback field if non-nil, zero value otherwise. +func (o *InlineObject3) GetCallback() string { + if o == nil || o.Callback == nil { + var ret string + return ret + } + return *o.Callback +} + +// GetCallbackOk returns a tuple with the Callback field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetCallbackOk() (string, bool) { + if o == nil || o.Callback == nil { + var ret string + return ret, false + } + return *o.Callback, true +} + +// HasCallback returns a boolean if a field has been set. +func (o *InlineObject3) HasCallback() bool { + if o != nil && o.Callback != nil { + return true + } + + return false +} + +// SetCallback gets a reference to the given string and assigns it to the Callback field. +func (o *InlineObject3) SetCallback(v string) { + o.Callback = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o InlineObject3) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Integer != nil { + toSerialize["integer"] = o.Integer + } + if o.Int32 != nil { + toSerialize["int32"] = o.Int32 + } + if o.Int64 != nil { + toSerialize["int64"] = o.Int64 + } + if o.Number == nil { + return nil, errors.New("Number is required and not nullable, but was not set on InlineObject3") + } + if o.Number != nil { + toSerialize["number"] = o.Number + } + if o.Float != nil { + toSerialize["float"] = o.Float + } + if o.Double == nil { + return nil, errors.New("Double is required and not nullable, but was not set on InlineObject3") + } + if o.Double != nil { + toSerialize["double"] = o.Double + } + if o.String != nil { + toSerialize["string"] = o.String + } + if o.PatternWithoutDelimiter == nil { + return nil, errors.New("PatternWithoutDelimiter is required and not nullable, but was not set on InlineObject3") + } + if o.PatternWithoutDelimiter != nil { + toSerialize["pattern_without_delimiter"] = o.PatternWithoutDelimiter + } + if o.Byte == nil { + return nil, errors.New("Byte is required and not nullable, but was not set on InlineObject3") + } + if o.Byte != nil { + toSerialize["byte"] = o.Byte + } + if o.Binary != nil { + toSerialize["binary"] = o.Binary + } + if o.Date != nil { + toSerialize["date"] = o.Date + } + if o.DateTime != nil { + toSerialize["dateTime"] = o.DateTime + } + if o.Password != nil { + toSerialize["password"] = o.Password + } + if o.Callback != nil { + toSerialize["callback"] = o.Callback + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go new file mode 100644 index 0000000000..761f535d07 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go @@ -0,0 +1,110 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" + "errors" +) +// InlineObject4 struct for InlineObject4 +type InlineObject4 struct { + // field1 + Param *string `json:"param,omitempty"` + + // field2 + Param2 *string `json:"param2,omitempty"` + +} + +// GetParam returns the Param field if non-nil, zero value otherwise. +func (o *InlineObject4) GetParam() string { + if o == nil || o.Param == nil { + var ret string + return ret + } + return *o.Param +} + +// GetParamOk returns a tuple with the Param field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject4) GetParamOk() (string, bool) { + if o == nil || o.Param == nil { + var ret string + return ret, false + } + return *o.Param, true +} + +// HasParam returns a boolean if a field has been set. +func (o *InlineObject4) HasParam() bool { + if o != nil && o.Param != nil { + return true + } + + return false +} + +// SetParam gets a reference to the given string and assigns it to the Param field. +func (o *InlineObject4) SetParam(v string) { + o.Param = &v +} + +// GetParam2 returns the Param2 field if non-nil, zero value otherwise. +func (o *InlineObject4) GetParam2() string { + if o == nil || o.Param2 == nil { + var ret string + return ret + } + return *o.Param2 +} + +// GetParam2Ok returns a tuple with the Param2 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject4) GetParam2Ok() (string, bool) { + if o == nil || o.Param2 == nil { + var ret string + return ret, false + } + return *o.Param2, true +} + +// HasParam2 returns a boolean if a field has been set. +func (o *InlineObject4) HasParam2() bool { + if o != nil && o.Param2 != nil { + return true + } + + return false +} + +// SetParam2 gets a reference to the given string and assigns it to the Param2 field. +func (o *InlineObject4) SetParam2(v string) { + o.Param2 = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o InlineObject4) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Param == nil { + return nil, errors.New("Param is required and not nullable, but was not set on InlineObject4") + } + if o.Param != nil { + toSerialize["param"] = o.Param + } + if o.Param2 == nil { + return nil, errors.New("Param2 is required and not nullable, but was not set on InlineObject4") + } + if o.Param2 != nil { + toSerialize["param2"] = o.Param2 + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go new file mode 100644 index 0000000000..3699a33df4 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go @@ -0,0 +1,108 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "os" + "encoding/json" + "errors" +) +// InlineObject5 struct for InlineObject5 +type InlineObject5 struct { + // Additional data to pass to server + AdditionalMetadata *string `json:"additionalMetadata,omitempty"` + + // file to upload + RequiredFile **os.File `json:"requiredFile,omitempty"` + +} + +// GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero value otherwise. +func (o *InlineObject5) GetAdditionalMetadata() string { + if o == nil || o.AdditionalMetadata == nil { + var ret string + return ret + } + return *o.AdditionalMetadata +} + +// GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject5) GetAdditionalMetadataOk() (string, bool) { + if o == nil || o.AdditionalMetadata == nil { + var ret string + return ret, false + } + return *o.AdditionalMetadata, true +} + +// HasAdditionalMetadata returns a boolean if a field has been set. +func (o *InlineObject5) HasAdditionalMetadata() bool { + if o != nil && o.AdditionalMetadata != nil { + return true + } + + return false +} + +// SetAdditionalMetadata gets a reference to the given string and assigns it to the AdditionalMetadata field. +func (o *InlineObject5) SetAdditionalMetadata(v string) { + o.AdditionalMetadata = &v +} + +// GetRequiredFile returns the RequiredFile field if non-nil, zero value otherwise. +func (o *InlineObject5) GetRequiredFile() *os.File { + if o == nil || o.RequiredFile == nil { + var ret *os.File + return ret + } + return *o.RequiredFile +} + +// GetRequiredFileOk returns a tuple with the RequiredFile field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineObject5) GetRequiredFileOk() (*os.File, bool) { + if o == nil || o.RequiredFile == nil { + var ret *os.File + return ret, false + } + return *o.RequiredFile, true +} + +// HasRequiredFile returns a boolean if a field has been set. +func (o *InlineObject5) HasRequiredFile() bool { + if o != nil && o.RequiredFile != nil { + return true + } + + return false +} + +// SetRequiredFile gets a reference to the given *os.File and assigns it to the RequiredFile field. +func (o *InlineObject5) SetRequiredFile(v *os.File) { + o.RequiredFile = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o InlineObject5) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AdditionalMetadata != nil { + toSerialize["additionalMetadata"] = o.AdditionalMetadata + } + if o.RequiredFile == nil { + return nil, errors.New("RequiredFile is required and not nullable, but was not set on InlineObject5") + } + if o.RequiredFile != nil { + toSerialize["requiredFile"] = o.RequiredFile + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go new file mode 100644 index 0000000000..024ad4f84e --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// InlineResponseDefault struct for InlineResponseDefault +type InlineResponseDefault struct { + String *Foo `json:"string,omitempty"` + +} + +// GetString returns the String field if non-nil, zero value otherwise. +func (o *InlineResponseDefault) GetString() Foo { + if o == nil || o.String == nil { + var ret Foo + return ret + } + return *o.String +} + +// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponseDefault) GetStringOk() (Foo, bool) { + if o == nil || o.String == nil { + var ret Foo + return ret, false + } + return *o.String, true +} + +// HasString returns a boolean if a field has been set. +func (o *InlineResponseDefault) HasString() bool { + if o != nil && o.String != nil { + return true + } + + return false +} + +// SetString gets a reference to the given Foo and assigns it to the String field. +func (o *InlineResponseDefault) SetString(v Foo) { + o.String = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o InlineResponseDefault) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.String != nil { + toSerialize["string"] = o.String + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go new file mode 100644 index 0000000000..efa6dfd86a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// List struct for List +type List struct { + Var123List *string `json:"123-list,omitempty"` + +} + +// GetVar123List returns the Var123List field if non-nil, zero value otherwise. +func (o *List) GetVar123List() string { + if o == nil || o.Var123List == nil { + var ret string + return ret + } + return *o.Var123List +} + +// GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *List) GetVar123ListOk() (string, bool) { + if o == nil || o.Var123List == nil { + var ret string + return ret, false + } + return *o.Var123List, true +} + +// HasVar123List returns a boolean if a field has been set. +func (o *List) HasVar123List() bool { + if o != nil && o.Var123List != nil { + return true + } + + return false +} + +// SetVar123List gets a reference to the given string and assigns it to the Var123List field. +func (o *List) SetVar123List(v string) { + o.Var123List = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o List) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Var123List != nil { + toSerialize["123-list"] = o.Var123List + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go new file mode 100644 index 0000000000..d934df451a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go @@ -0,0 +1,177 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// MapTest struct for MapTest +type MapTest struct { + MapMapOfString *map[string]map[string]string `json:"map_map_of_string,omitempty"` + + MapOfEnumString *map[string]string `json:"map_of_enum_string,omitempty"` + + DirectMap *map[string]bool `json:"direct_map,omitempty"` + + IndirectMap *map[string]bool `json:"indirect_map,omitempty"` + +} + +// GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise. +func (o *MapTest) GetMapMapOfString() map[string]map[string]string { + if o == nil || o.MapMapOfString == nil { + var ret map[string]map[string]string + return ret + } + return *o.MapMapOfString +} + +// GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool) { + if o == nil || o.MapMapOfString == nil { + var ret map[string]map[string]string + return ret, false + } + return *o.MapMapOfString, true +} + +// HasMapMapOfString returns a boolean if a field has been set. +func (o *MapTest) HasMapMapOfString() bool { + if o != nil && o.MapMapOfString != nil { + return true + } + + return false +} + +// SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field. +func (o *MapTest) SetMapMapOfString(v map[string]map[string]string) { + o.MapMapOfString = &v +} + +// GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise. +func (o *MapTest) GetMapOfEnumString() map[string]string { + if o == nil || o.MapOfEnumString == nil { + var ret map[string]string + return ret + } + return *o.MapOfEnumString +} + +// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool) { + if o == nil || o.MapOfEnumString == nil { + var ret map[string]string + return ret, false + } + return *o.MapOfEnumString, true +} + +// HasMapOfEnumString returns a boolean if a field has been set. +func (o *MapTest) HasMapOfEnumString() bool { + if o != nil && o.MapOfEnumString != nil { + return true + } + + return false +} + +// SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field. +func (o *MapTest) SetMapOfEnumString(v map[string]string) { + o.MapOfEnumString = &v +} + +// GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. +func (o *MapTest) GetDirectMap() map[string]bool { + if o == nil || o.DirectMap == nil { + var ret map[string]bool + return ret + } + return *o.DirectMap +} + +// GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetDirectMapOk() (map[string]bool, bool) { + if o == nil || o.DirectMap == nil { + var ret map[string]bool + return ret, false + } + return *o.DirectMap, true +} + +// HasDirectMap returns a boolean if a field has been set. +func (o *MapTest) HasDirectMap() bool { + if o != nil && o.DirectMap != nil { + return true + } + + return false +} + +// SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field. +func (o *MapTest) SetDirectMap(v map[string]bool) { + o.DirectMap = &v +} + +// GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. +func (o *MapTest) GetIndirectMap() map[string]bool { + if o == nil || o.IndirectMap == nil { + var ret map[string]bool + return ret + } + return *o.IndirectMap +} + +// GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool) { + if o == nil || o.IndirectMap == nil { + var ret map[string]bool + return ret, false + } + return *o.IndirectMap, true +} + +// HasIndirectMap returns a boolean if a field has been set. +func (o *MapTest) HasIndirectMap() bool { + if o != nil && o.IndirectMap != nil { + return true + } + + return false +} + +// SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field. +func (o *MapTest) SetIndirectMap(v map[string]bool) { + o.IndirectMap = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o MapTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MapMapOfString != nil { + toSerialize["map_map_of_string"] = o.MapMapOfString + } + if o.MapOfEnumString != nil { + toSerialize["map_of_enum_string"] = o.MapOfEnumString + } + if o.DirectMap != nil { + toSerialize["direct_map"] = o.DirectMap + } + if o.IndirectMap != nil { + toSerialize["indirect_map"] = o.IndirectMap + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go new file mode 100644 index 0000000000..d4756b2da4 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -0,0 +1,140 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" + "encoding/json" +) +// MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass +type MixedPropertiesAndAdditionalPropertiesClass struct { + Uuid *string `json:"uuid,omitempty"` + + DateTime *time.Time `json:"dateTime,omitempty"` + + Map *map[string]Animal `json:"map,omitempty"` + +} + +// GetUuid returns the Uuid field if non-nil, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { + if o == nil || o.Uuid == nil { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool) { + if o == nil || o.Uuid == nil { + var ret string + return ret, false + } + return *o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool { + if o != nil && o.Uuid != nil { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string) { + o.Uuid = &v +} + +// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret + } + return *o.DateTime +} + +// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool) { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret, false + } + return *o.DateTime, true +} + +// HasDateTime returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool { + if o != nil && o.DateTime != nil { + return true + } + + return false +} + +// SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time) { + o.DateTime = &v +} + +// GetMap returns the Map field if non-nil, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal { + if o == nil || o.Map == nil { + var ret map[string]Animal + return ret + } + return *o.Map +} + +// GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool) { + if o == nil || o.Map == nil { + var ret map[string]Animal + return ret, false + } + return *o.Map, true +} + +// HasMap returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool { + if o != nil && o.Map != nil { + return true + } + + return false +} + +// SetMap gets a reference to the given map[string]Animal and assigns it to the Map field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal) { + o.Map = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o MixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Uuid != nil { + toSerialize["uuid"] = o.Uuid + } + if o.DateTime != nil { + toSerialize["dateTime"] = o.DateTime + } + if o.Map != nil { + toSerialize["map"] = o.Map + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go new file mode 100644 index 0000000000..78990e5e97 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go @@ -0,0 +1,181 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" + "errors" +) +// Name Model for testing model name same as property name +type Name struct { + Name *int32 `json:"name,omitempty"` + + SnakeCase *int32 `json:"snake_case,omitempty"` + + Property *string `json:"property,omitempty"` + + Var123Number *int32 `json:"123Number,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Name) GetName() int32 { + if o == nil || o.Name == nil { + var ret int32 + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetNameOk() (int32, bool) { + if o == nil || o.Name == nil { + var ret int32 + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Name) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given int32 and assigns it to the Name field. +func (o *Name) SetName(v int32) { + o.Name = &v +} + +// GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. +func (o *Name) GetSnakeCase() int32 { + if o == nil || o.SnakeCase == nil { + var ret int32 + return ret + } + return *o.SnakeCase +} + +// GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetSnakeCaseOk() (int32, bool) { + if o == nil || o.SnakeCase == nil { + var ret int32 + return ret, false + } + return *o.SnakeCase, true +} + +// HasSnakeCase returns a boolean if a field has been set. +func (o *Name) HasSnakeCase() bool { + if o != nil && o.SnakeCase != nil { + return true + } + + return false +} + +// SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field. +func (o *Name) SetSnakeCase(v int32) { + o.SnakeCase = &v +} + +// GetProperty returns the Property field if non-nil, zero value otherwise. +func (o *Name) GetProperty() string { + if o == nil || o.Property == nil { + var ret string + return ret + } + return *o.Property +} + +// GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetPropertyOk() (string, bool) { + if o == nil || o.Property == nil { + var ret string + return ret, false + } + return *o.Property, true +} + +// HasProperty returns a boolean if a field has been set. +func (o *Name) HasProperty() bool { + if o != nil && o.Property != nil { + return true + } + + return false +} + +// SetProperty gets a reference to the given string and assigns it to the Property field. +func (o *Name) SetProperty(v string) { + o.Property = &v +} + +// GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. +func (o *Name) GetVar123Number() int32 { + if o == nil || o.Var123Number == nil { + var ret int32 + return ret + } + return *o.Var123Number +} + +// GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetVar123NumberOk() (int32, bool) { + if o == nil || o.Var123Number == nil { + var ret int32 + return ret, false + } + return *o.Var123Number, true +} + +// HasVar123Number returns a boolean if a field has been set. +func (o *Name) HasVar123Number() bool { + if o != nil && o.Var123Number != nil { + return true + } + + return false +} + +// SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field. +func (o *Name) SetVar123Number(v int32) { + o.Var123Number = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Name) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name == nil { + return nil, errors.New("Name is required and not nullable, but was not set on Name") + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.SnakeCase != nil { + toSerialize["snake_case"] = o.SnakeCase + } + if o.Property != nil { + toSerialize["property"] = o.Property + } + if o.Var123Number != nil { + toSerialize["123Number"] = o.Var123Number + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go new file mode 100644 index 0000000000..88b3d27a7d --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go @@ -0,0 +1,592 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" + "encoding/json" +) +// NullableClass struct for NullableClass +type NullableClass struct { + IntegerProp *int32 `json:"integer_prop,omitempty"` + isExplicitNullIntegerProp bool `json:"-"` + NumberProp *float32 `json:"number_prop,omitempty"` + isExplicitNullNumberProp bool `json:"-"` + BooleanProp *bool `json:"boolean_prop,omitempty"` + isExplicitNullBooleanProp bool `json:"-"` + StringProp *string `json:"string_prop,omitempty"` + isExplicitNullStringProp bool `json:"-"` + DateProp *string `json:"date_prop,omitempty"` + isExplicitNullDateProp bool `json:"-"` + DatetimeProp *time.Time `json:"datetime_prop,omitempty"` + isExplicitNullDatetimeProp bool `json:"-"` + ArrayNullableProp *[]map[string]interface{} `json:"array_nullable_prop,omitempty"` + isExplicitNullArrayNullableProp bool `json:"-"` + ArrayAndItemsNullableProp *[]map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"` + isExplicitNullArrayAndItemsNullableProp bool `json:"-"` + ArrayItemsNullable *[]map[string]interface{} `json:"array_items_nullable,omitempty"` + + ObjectNullableProp *map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"` + isExplicitNullObjectNullableProp bool `json:"-"` + ObjectAndItemsNullableProp *map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"` + isExplicitNullObjectAndItemsNullableProp bool `json:"-"` + ObjectItemsNullable *map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` + +} + +// GetIntegerProp returns the IntegerProp field if non-nil, zero value otherwise. +func (o *NullableClass) GetIntegerProp() int32 { + if o == nil || o.IntegerProp == nil { + var ret int32 + return ret + } + return *o.IntegerProp +} + +// GetIntegerPropOk returns a tuple with the IntegerProp field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetIntegerPropOk() (int32, bool) { + if o == nil || o.IntegerProp == nil { + var ret int32 + return ret, false + } + return *o.IntegerProp, true +} + +// HasIntegerProp returns a boolean if a field has been set. +func (o *NullableClass) HasIntegerProp() bool { + if o != nil && o.IntegerProp != nil { + return true + } + + return false +} + +// SetIntegerProp gets a reference to the given int32 and assigns it to the IntegerProp field. +func (o *NullableClass) SetIntegerProp(v int32) { + o.IntegerProp = &v +} + +// SetIntegerPropExplicitNull (un)sets IntegerProp to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The IntegerProp value is set to nil even if false is passed +func (o *NullableClass) SetIntegerPropExplicitNull(b bool) { + o.IntegerProp = nil + o.isExplicitNullIntegerProp = b +} +// GetNumberProp returns the NumberProp field if non-nil, zero value otherwise. +func (o *NullableClass) GetNumberProp() float32 { + if o == nil || o.NumberProp == nil { + var ret float32 + return ret + } + return *o.NumberProp +} + +// GetNumberPropOk returns a tuple with the NumberProp field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetNumberPropOk() (float32, bool) { + if o == nil || o.NumberProp == nil { + var ret float32 + return ret, false + } + return *o.NumberProp, true +} + +// HasNumberProp returns a boolean if a field has been set. +func (o *NullableClass) HasNumberProp() bool { + if o != nil && o.NumberProp != nil { + return true + } + + return false +} + +// SetNumberProp gets a reference to the given float32 and assigns it to the NumberProp field. +func (o *NullableClass) SetNumberProp(v float32) { + o.NumberProp = &v +} + +// SetNumberPropExplicitNull (un)sets NumberProp to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The NumberProp value is set to nil even if false is passed +func (o *NullableClass) SetNumberPropExplicitNull(b bool) { + o.NumberProp = nil + o.isExplicitNullNumberProp = b +} +// GetBooleanProp returns the BooleanProp field if non-nil, zero value otherwise. +func (o *NullableClass) GetBooleanProp() bool { + if o == nil || o.BooleanProp == nil { + var ret bool + return ret + } + return *o.BooleanProp +} + +// GetBooleanPropOk returns a tuple with the BooleanProp field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetBooleanPropOk() (bool, bool) { + if o == nil || o.BooleanProp == nil { + var ret bool + return ret, false + } + return *o.BooleanProp, true +} + +// HasBooleanProp returns a boolean if a field has been set. +func (o *NullableClass) HasBooleanProp() bool { + if o != nil && o.BooleanProp != nil { + return true + } + + return false +} + +// SetBooleanProp gets a reference to the given bool and assigns it to the BooleanProp field. +func (o *NullableClass) SetBooleanProp(v bool) { + o.BooleanProp = &v +} + +// SetBooleanPropExplicitNull (un)sets BooleanProp to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The BooleanProp value is set to nil even if false is passed +func (o *NullableClass) SetBooleanPropExplicitNull(b bool) { + o.BooleanProp = nil + o.isExplicitNullBooleanProp = b +} +// GetStringProp returns the StringProp field if non-nil, zero value otherwise. +func (o *NullableClass) GetStringProp() string { + if o == nil || o.StringProp == nil { + var ret string + return ret + } + return *o.StringProp +} + +// GetStringPropOk returns a tuple with the StringProp field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetStringPropOk() (string, bool) { + if o == nil || o.StringProp == nil { + var ret string + return ret, false + } + return *o.StringProp, true +} + +// HasStringProp returns a boolean if a field has been set. +func (o *NullableClass) HasStringProp() bool { + if o != nil && o.StringProp != nil { + return true + } + + return false +} + +// SetStringProp gets a reference to the given string and assigns it to the StringProp field. +func (o *NullableClass) SetStringProp(v string) { + o.StringProp = &v +} + +// SetStringPropExplicitNull (un)sets StringProp to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The StringProp value is set to nil even if false is passed +func (o *NullableClass) SetStringPropExplicitNull(b bool) { + o.StringProp = nil + o.isExplicitNullStringProp = b +} +// GetDateProp returns the DateProp field if non-nil, zero value otherwise. +func (o *NullableClass) GetDateProp() string { + if o == nil || o.DateProp == nil { + var ret string + return ret + } + return *o.DateProp +} + +// GetDatePropOk returns a tuple with the DateProp field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetDatePropOk() (string, bool) { + if o == nil || o.DateProp == nil { + var ret string + return ret, false + } + return *o.DateProp, true +} + +// HasDateProp returns a boolean if a field has been set. +func (o *NullableClass) HasDateProp() bool { + if o != nil && o.DateProp != nil { + return true + } + + return false +} + +// SetDateProp gets a reference to the given string and assigns it to the DateProp field. +func (o *NullableClass) SetDateProp(v string) { + o.DateProp = &v +} + +// SetDatePropExplicitNull (un)sets DateProp to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The DateProp value is set to nil even if false is passed +func (o *NullableClass) SetDatePropExplicitNull(b bool) { + o.DateProp = nil + o.isExplicitNullDateProp = b +} +// GetDatetimeProp returns the DatetimeProp field if non-nil, zero value otherwise. +func (o *NullableClass) GetDatetimeProp() time.Time { + if o == nil || o.DatetimeProp == nil { + var ret time.Time + return ret + } + return *o.DatetimeProp +} + +// GetDatetimePropOk returns a tuple with the DatetimeProp field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetDatetimePropOk() (time.Time, bool) { + if o == nil || o.DatetimeProp == nil { + var ret time.Time + return ret, false + } + return *o.DatetimeProp, true +} + +// HasDatetimeProp returns a boolean if a field has been set. +func (o *NullableClass) HasDatetimeProp() bool { + if o != nil && o.DatetimeProp != nil { + return true + } + + return false +} + +// SetDatetimeProp gets a reference to the given time.Time and assigns it to the DatetimeProp field. +func (o *NullableClass) SetDatetimeProp(v time.Time) { + o.DatetimeProp = &v +} + +// SetDatetimePropExplicitNull (un)sets DatetimeProp to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The DatetimeProp value is set to nil even if false is passed +func (o *NullableClass) SetDatetimePropExplicitNull(b bool) { + o.DatetimeProp = nil + o.isExplicitNullDatetimeProp = b +} +// GetArrayNullableProp returns the ArrayNullableProp field if non-nil, zero value otherwise. +func (o *NullableClass) GetArrayNullableProp() []map[string]interface{} { + if o == nil || o.ArrayNullableProp == nil { + var ret []map[string]interface{} + return ret + } + return *o.ArrayNullableProp +} + +// GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetArrayNullablePropOk() ([]map[string]interface{}, bool) { + if o == nil || o.ArrayNullableProp == nil { + var ret []map[string]interface{} + return ret, false + } + return *o.ArrayNullableProp, true +} + +// HasArrayNullableProp returns a boolean if a field has been set. +func (o *NullableClass) HasArrayNullableProp() bool { + if o != nil && o.ArrayNullableProp != nil { + return true + } + + return false +} + +// SetArrayNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayNullableProp field. +func (o *NullableClass) SetArrayNullableProp(v []map[string]interface{}) { + o.ArrayNullableProp = &v +} + +// SetArrayNullablePropExplicitNull (un)sets ArrayNullableProp to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The ArrayNullableProp value is set to nil even if false is passed +func (o *NullableClass) SetArrayNullablePropExplicitNull(b bool) { + o.ArrayNullableProp = nil + o.isExplicitNullArrayNullableProp = b +} +// GetArrayAndItemsNullableProp returns the ArrayAndItemsNullableProp field if non-nil, zero value otherwise. +func (o *NullableClass) GetArrayAndItemsNullableProp() []map[string]interface{} { + if o == nil || o.ArrayAndItemsNullableProp == nil { + var ret []map[string]interface{} + return ret + } + return *o.ArrayAndItemsNullableProp +} + +// GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetArrayAndItemsNullablePropOk() ([]map[string]interface{}, bool) { + if o == nil || o.ArrayAndItemsNullableProp == nil { + var ret []map[string]interface{} + return ret, false + } + return *o.ArrayAndItemsNullableProp, true +} + +// HasArrayAndItemsNullableProp returns a boolean if a field has been set. +func (o *NullableClass) HasArrayAndItemsNullableProp() bool { + if o != nil && o.ArrayAndItemsNullableProp != nil { + return true + } + + return false +} + +// SetArrayAndItemsNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayAndItemsNullableProp field. +func (o *NullableClass) SetArrayAndItemsNullableProp(v []map[string]interface{}) { + o.ArrayAndItemsNullableProp = &v +} + +// SetArrayAndItemsNullablePropExplicitNull (un)sets ArrayAndItemsNullableProp to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The ArrayAndItemsNullableProp value is set to nil even if false is passed +func (o *NullableClass) SetArrayAndItemsNullablePropExplicitNull(b bool) { + o.ArrayAndItemsNullableProp = nil + o.isExplicitNullArrayAndItemsNullableProp = b +} +// GetArrayItemsNullable returns the ArrayItemsNullable field if non-nil, zero value otherwise. +func (o *NullableClass) GetArrayItemsNullable() []map[string]interface{} { + if o == nil || o.ArrayItemsNullable == nil { + var ret []map[string]interface{} + return ret + } + return *o.ArrayItemsNullable +} + +// GetArrayItemsNullableOk returns a tuple with the ArrayItemsNullable field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetArrayItemsNullableOk() ([]map[string]interface{}, bool) { + if o == nil || o.ArrayItemsNullable == nil { + var ret []map[string]interface{} + return ret, false + } + return *o.ArrayItemsNullable, true +} + +// HasArrayItemsNullable returns a boolean if a field has been set. +func (o *NullableClass) HasArrayItemsNullable() bool { + if o != nil && o.ArrayItemsNullable != nil { + return true + } + + return false +} + +// SetArrayItemsNullable gets a reference to the given []map[string]interface{} and assigns it to the ArrayItemsNullable field. +func (o *NullableClass) SetArrayItemsNullable(v []map[string]interface{}) { + o.ArrayItemsNullable = &v +} + +// GetObjectNullableProp returns the ObjectNullableProp field if non-nil, zero value otherwise. +func (o *NullableClass) GetObjectNullableProp() map[string]map[string]interface{} { + if o == nil || o.ObjectNullableProp == nil { + var ret map[string]map[string]interface{} + return ret + } + return *o.ObjectNullableProp +} + +// GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetObjectNullablePropOk() (map[string]map[string]interface{}, bool) { + if o == nil || o.ObjectNullableProp == nil { + var ret map[string]map[string]interface{} + return ret, false + } + return *o.ObjectNullableProp, true +} + +// HasObjectNullableProp returns a boolean if a field has been set. +func (o *NullableClass) HasObjectNullableProp() bool { + if o != nil && o.ObjectNullableProp != nil { + return true + } + + return false +} + +// SetObjectNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectNullableProp field. +func (o *NullableClass) SetObjectNullableProp(v map[string]map[string]interface{}) { + o.ObjectNullableProp = &v +} + +// SetObjectNullablePropExplicitNull (un)sets ObjectNullableProp to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The ObjectNullableProp value is set to nil even if false is passed +func (o *NullableClass) SetObjectNullablePropExplicitNull(b bool) { + o.ObjectNullableProp = nil + o.isExplicitNullObjectNullableProp = b +} +// GetObjectAndItemsNullableProp returns the ObjectAndItemsNullableProp field if non-nil, zero value otherwise. +func (o *NullableClass) GetObjectAndItemsNullableProp() map[string]map[string]interface{} { + if o == nil || o.ObjectAndItemsNullableProp == nil { + var ret map[string]map[string]interface{} + return ret + } + return *o.ObjectAndItemsNullableProp +} + +// GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetObjectAndItemsNullablePropOk() (map[string]map[string]interface{}, bool) { + if o == nil || o.ObjectAndItemsNullableProp == nil { + var ret map[string]map[string]interface{} + return ret, false + } + return *o.ObjectAndItemsNullableProp, true +} + +// HasObjectAndItemsNullableProp returns a boolean if a field has been set. +func (o *NullableClass) HasObjectAndItemsNullableProp() bool { + if o != nil && o.ObjectAndItemsNullableProp != nil { + return true + } + + return false +} + +// SetObjectAndItemsNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectAndItemsNullableProp field. +func (o *NullableClass) SetObjectAndItemsNullableProp(v map[string]map[string]interface{}) { + o.ObjectAndItemsNullableProp = &v +} + +// SetObjectAndItemsNullablePropExplicitNull (un)sets ObjectAndItemsNullableProp to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The ObjectAndItemsNullableProp value is set to nil even if false is passed +func (o *NullableClass) SetObjectAndItemsNullablePropExplicitNull(b bool) { + o.ObjectAndItemsNullableProp = nil + o.isExplicitNullObjectAndItemsNullableProp = b +} +// GetObjectItemsNullable returns the ObjectItemsNullable field if non-nil, zero value otherwise. +func (o *NullableClass) GetObjectItemsNullable() map[string]map[string]interface{} { + if o == nil || o.ObjectItemsNullable == nil { + var ret map[string]map[string]interface{} + return ret + } + return *o.ObjectItemsNullable +} + +// GetObjectItemsNullableOk returns a tuple with the ObjectItemsNullable field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NullableClass) GetObjectItemsNullableOk() (map[string]map[string]interface{}, bool) { + if o == nil || o.ObjectItemsNullable == nil { + var ret map[string]map[string]interface{} + return ret, false + } + return *o.ObjectItemsNullable, true +} + +// HasObjectItemsNullable returns a boolean if a field has been set. +func (o *NullableClass) HasObjectItemsNullable() bool { + if o != nil && o.ObjectItemsNullable != nil { + return true + } + + return false +} + +// SetObjectItemsNullable gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectItemsNullable field. +func (o *NullableClass) SetObjectItemsNullable(v map[string]map[string]interface{}) { + o.ObjectItemsNullable = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o NullableClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.IntegerProp == nil { + if o.isExplicitNullIntegerProp { + toSerialize["integer_prop"] = o.IntegerProp + } + } else { + toSerialize["integer_prop"] = o.IntegerProp + } + if o.NumberProp == nil { + if o.isExplicitNullNumberProp { + toSerialize["number_prop"] = o.NumberProp + } + } else { + toSerialize["number_prop"] = o.NumberProp + } + if o.BooleanProp == nil { + if o.isExplicitNullBooleanProp { + toSerialize["boolean_prop"] = o.BooleanProp + } + } else { + toSerialize["boolean_prop"] = o.BooleanProp + } + if o.StringProp == nil { + if o.isExplicitNullStringProp { + toSerialize["string_prop"] = o.StringProp + } + } else { + toSerialize["string_prop"] = o.StringProp + } + if o.DateProp == nil { + if o.isExplicitNullDateProp { + toSerialize["date_prop"] = o.DateProp + } + } else { + toSerialize["date_prop"] = o.DateProp + } + if o.DatetimeProp == nil { + if o.isExplicitNullDatetimeProp { + toSerialize["datetime_prop"] = o.DatetimeProp + } + } else { + toSerialize["datetime_prop"] = o.DatetimeProp + } + if o.ArrayNullableProp == nil { + if o.isExplicitNullArrayNullableProp { + toSerialize["array_nullable_prop"] = o.ArrayNullableProp + } + } else { + toSerialize["array_nullable_prop"] = o.ArrayNullableProp + } + if o.ArrayAndItemsNullableProp == nil { + if o.isExplicitNullArrayAndItemsNullableProp { + toSerialize["array_and_items_nullable_prop"] = o.ArrayAndItemsNullableProp + } + } else { + toSerialize["array_and_items_nullable_prop"] = o.ArrayAndItemsNullableProp + } + if o.ArrayItemsNullable != nil { + toSerialize["array_items_nullable"] = o.ArrayItemsNullable + } + if o.ObjectNullableProp == nil { + if o.isExplicitNullObjectNullableProp { + toSerialize["object_nullable_prop"] = o.ObjectNullableProp + } + } else { + toSerialize["object_nullable_prop"] = o.ObjectNullableProp + } + if o.ObjectAndItemsNullableProp == nil { + if o.isExplicitNullObjectAndItemsNullableProp { + toSerialize["object_and_items_nullable_prop"] = o.ObjectAndItemsNullableProp + } + } else { + toSerialize["object_and_items_nullable_prop"] = o.ObjectAndItemsNullableProp + } + if o.ObjectItemsNullable != nil { + toSerialize["object_items_nullable"] = o.ObjectItemsNullable + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go new file mode 100644 index 0000000000..5e6f7c74d9 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// NumberOnly struct for NumberOnly +type NumberOnly struct { + JustNumber *float32 `json:"JustNumber,omitempty"` + +} + +// GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. +func (o *NumberOnly) GetJustNumber() float32 { + if o == nil || o.JustNumber == nil { + var ret float32 + return ret + } + return *o.JustNumber +} + +// GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NumberOnly) GetJustNumberOk() (float32, bool) { + if o == nil || o.JustNumber == nil { + var ret float32 + return ret, false + } + return *o.JustNumber, true +} + +// HasJustNumber returns a boolean if a field has been set. +func (o *NumberOnly) HasJustNumber() bool { + if o != nil && o.JustNumber != nil { + return true + } + + return false +} + +// SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field. +func (o *NumberOnly) SetJustNumber(v float32) { + o.JustNumber = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o NumberOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.JustNumber != nil { + toSerialize["JustNumber"] = o.JustNumber + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go new file mode 100644 index 0000000000..a05ac01a88 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go @@ -0,0 +1,255 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" + "encoding/json" +) +// Order struct for Order +type Order struct { + Id *int64 `json:"id,omitempty"` + + PetId *int64 `json:"petId,omitempty"` + + Quantity *int32 `json:"quantity,omitempty"` + + ShipDate *time.Time `json:"shipDate,omitempty"` + + // Order Status + Status *string `json:"status,omitempty"` + + Complete *bool `json:"complete,omitempty"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Order) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Order) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Order) SetId(v int64) { + o.Id = &v +} + +// GetPetId returns the PetId field if non-nil, zero value otherwise. +func (o *Order) GetPetId() int64 { + if o == nil || o.PetId == nil { + var ret int64 + return ret + } + return *o.PetId +} + +// GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetPetIdOk() (int64, bool) { + if o == nil || o.PetId == nil { + var ret int64 + return ret, false + } + return *o.PetId, true +} + +// HasPetId returns a boolean if a field has been set. +func (o *Order) HasPetId() bool { + if o != nil && o.PetId != nil { + return true + } + + return false +} + +// SetPetId gets a reference to the given int64 and assigns it to the PetId field. +func (o *Order) SetPetId(v int64) { + o.PetId = &v +} + +// GetQuantity returns the Quantity field if non-nil, zero value otherwise. +func (o *Order) GetQuantity() int32 { + if o == nil || o.Quantity == nil { + var ret int32 + return ret + } + return *o.Quantity +} + +// GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetQuantityOk() (int32, bool) { + if o == nil || o.Quantity == nil { + var ret int32 + return ret, false + } + return *o.Quantity, true +} + +// HasQuantity returns a boolean if a field has been set. +func (o *Order) HasQuantity() bool { + if o != nil && o.Quantity != nil { + return true + } + + return false +} + +// SetQuantity gets a reference to the given int32 and assigns it to the Quantity field. +func (o *Order) SetQuantity(v int32) { + o.Quantity = &v +} + +// GetShipDate returns the ShipDate field if non-nil, zero value otherwise. +func (o *Order) GetShipDate() time.Time { + if o == nil || o.ShipDate == nil { + var ret time.Time + return ret + } + return *o.ShipDate +} + +// GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetShipDateOk() (time.Time, bool) { + if o == nil || o.ShipDate == nil { + var ret time.Time + return ret, false + } + return *o.ShipDate, true +} + +// HasShipDate returns a boolean if a field has been set. +func (o *Order) HasShipDate() bool { + if o != nil && o.ShipDate != nil { + return true + } + + return false +} + +// SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field. +func (o *Order) SetShipDate(v time.Time) { + o.ShipDate = &v +} + +// GetStatus returns the Status field if non-nil, zero value otherwise. +func (o *Order) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetStatusOk() (string, bool) { + if o == nil || o.Status == nil { + var ret string + return ret, false + } + return *o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Order) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Order) SetStatus(v string) { + o.Status = &v +} + +// GetComplete returns the Complete field if non-nil, zero value otherwise. +func (o *Order) GetComplete() bool { + if o == nil || o.Complete == nil { + var ret bool + return ret + } + return *o.Complete +} + +// GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetCompleteOk() (bool, bool) { + if o == nil || o.Complete == nil { + var ret bool + return ret, false + } + return *o.Complete, true +} + +// HasComplete returns a boolean if a field has been set. +func (o *Order) HasComplete() bool { + if o != nil && o.Complete != nil { + return true + } + + return false +} + +// SetComplete gets a reference to the given bool and assigns it to the Complete field. +func (o *Order) SetComplete(v bool) { + o.Complete = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Order) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.PetId != nil { + toSerialize["petId"] = o.PetId + } + if o.Quantity != nil { + toSerialize["quantity"] = o.Quantity + } + if o.ShipDate != nil { + toSerialize["shipDate"] = o.ShipDate + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Complete != nil { + toSerialize["complete"] = o.Complete + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go new file mode 100644 index 0000000000..83c5d661eb --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go @@ -0,0 +1,139 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// OuterComposite struct for OuterComposite +type OuterComposite struct { + MyNumber *float32 `json:"my_number,omitempty"` + + MyString *string `json:"my_string,omitempty"` + + MyBoolean *bool `json:"my_boolean,omitempty"` + +} + +// GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. +func (o *OuterComposite) GetMyNumber() float32 { + if o == nil || o.MyNumber == nil { + var ret float32 + return ret + } + return *o.MyNumber +} + +// GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *OuterComposite) GetMyNumberOk() (float32, bool) { + if o == nil || o.MyNumber == nil { + var ret float32 + return ret, false + } + return *o.MyNumber, true +} + +// HasMyNumber returns a boolean if a field has been set. +func (o *OuterComposite) HasMyNumber() bool { + if o != nil && o.MyNumber != nil { + return true + } + + return false +} + +// SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field. +func (o *OuterComposite) SetMyNumber(v float32) { + o.MyNumber = &v +} + +// GetMyString returns the MyString field if non-nil, zero value otherwise. +func (o *OuterComposite) GetMyString() string { + if o == nil || o.MyString == nil { + var ret string + return ret + } + return *o.MyString +} + +// GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *OuterComposite) GetMyStringOk() (string, bool) { + if o == nil || o.MyString == nil { + var ret string + return ret, false + } + return *o.MyString, true +} + +// HasMyString returns a boolean if a field has been set. +func (o *OuterComposite) HasMyString() bool { + if o != nil && o.MyString != nil { + return true + } + + return false +} + +// SetMyString gets a reference to the given string and assigns it to the MyString field. +func (o *OuterComposite) SetMyString(v string) { + o.MyString = &v +} + +// GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. +func (o *OuterComposite) GetMyBoolean() bool { + if o == nil || o.MyBoolean == nil { + var ret bool + return ret + } + return *o.MyBoolean +} + +// GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *OuterComposite) GetMyBooleanOk() (bool, bool) { + if o == nil || o.MyBoolean == nil { + var ret bool + return ret, false + } + return *o.MyBoolean, true +} + +// HasMyBoolean returns a boolean if a field has been set. +func (o *OuterComposite) HasMyBoolean() bool { + if o != nil && o.MyBoolean != nil { + return true + } + + return false +} + +// SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field. +func (o *OuterComposite) SetMyBoolean(v bool) { + o.MyBoolean = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o OuterComposite) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MyNumber != nil { + toSerialize["my_number"] = o.MyNumber + } + if o.MyString != nil { + toSerialize["my_string"] = o.MyString + } + if o.MyBoolean != nil { + toSerialize["my_boolean"] = o.MyBoolean + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum.go new file mode 100644 index 0000000000..e8299a160e --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum.go @@ -0,0 +1,21 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// OuterEnum the model 'OuterEnum' +type OuterEnum string + +// List of OuterEnum +const ( + PLACED OuterEnum = "placed" + APPROVED OuterEnum = "approved" + DELIVERED OuterEnum = "delivered" +) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_default_value.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_default_value.go new file mode 100644 index 0000000000..d5f8a9a76f --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_default_value.go @@ -0,0 +1,21 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// OuterEnumDefaultValue the model 'OuterEnumDefaultValue' +type OuterEnumDefaultValue string + +// List of OuterEnumDefaultValue +const ( + PLACED OuterEnumDefaultValue = "placed" + APPROVED OuterEnumDefaultValue = "approved" + DELIVERED OuterEnumDefaultValue = "delivered" +) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer.go new file mode 100644 index 0000000000..2bdaee5014 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer.go @@ -0,0 +1,21 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// OuterEnumInteger the model 'OuterEnumInteger' +type OuterEnumInteger int32 + +// List of OuterEnumInteger +const ( + _0 OuterEnumInteger = 0 + _1 OuterEnumInteger = 1 + _2 OuterEnumInteger = 2 +) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer_default_value.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer_default_value.go new file mode 100644 index 0000000000..492dcc08bd --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer_default_value.go @@ -0,0 +1,21 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// OuterEnumIntegerDefaultValue the model 'OuterEnumIntegerDefaultValue' +type OuterEnumIntegerDefaultValue int32 + +// List of OuterEnumIntegerDefaultValue +const ( + _0 OuterEnumIntegerDefaultValue = 0 + _1 OuterEnumIntegerDefaultValue = 1 + _2 OuterEnumIntegerDefaultValue = 2 +) + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go new file mode 100644 index 0000000000..1c7cde3b15 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go @@ -0,0 +1,261 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" + "errors" +) +// Pet struct for Pet +type Pet struct { + Id *int64 `json:"id,omitempty"` + + Category *Category `json:"category,omitempty"` + + Name *string `json:"name,omitempty"` + + PhotoUrls *[]string `json:"photoUrls,omitempty"` + + Tags *[]Tag `json:"tags,omitempty"` + + // pet status in the store + Status *string `json:"status,omitempty"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Pet) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Pet) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Pet) SetId(v int64) { + o.Id = &v +} + +// GetCategory returns the Category field if non-nil, zero value otherwise. +func (o *Pet) GetCategory() Category { + if o == nil || o.Category == nil { + var ret Category + return ret + } + return *o.Category +} + +// GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetCategoryOk() (Category, bool) { + if o == nil || o.Category == nil { + var ret Category + return ret, false + } + return *o.Category, true +} + +// HasCategory returns a boolean if a field has been set. +func (o *Pet) HasCategory() bool { + if o != nil && o.Category != nil { + return true + } + + return false +} + +// SetCategory gets a reference to the given Category and assigns it to the Category field. +func (o *Pet) SetCategory(v Category) { + o.Category = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Pet) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Pet) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Pet) SetName(v string) { + o.Name = &v +} + +// GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. +func (o *Pet) GetPhotoUrls() []string { + if o == nil || o.PhotoUrls == nil { + var ret []string + return ret + } + return *o.PhotoUrls +} + +// GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetPhotoUrlsOk() ([]string, bool) { + if o == nil || o.PhotoUrls == nil { + var ret []string + return ret, false + } + return *o.PhotoUrls, true +} + +// HasPhotoUrls returns a boolean if a field has been set. +func (o *Pet) HasPhotoUrls() bool { + if o != nil && o.PhotoUrls != nil { + return true + } + + return false +} + +// SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field. +func (o *Pet) SetPhotoUrls(v []string) { + o.PhotoUrls = &v +} + +// GetTags returns the Tags field if non-nil, zero value otherwise. +func (o *Pet) GetTags() []Tag { + if o == nil || o.Tags == nil { + var ret []Tag + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetTagsOk() ([]Tag, bool) { + if o == nil || o.Tags == nil { + var ret []Tag + return ret, false + } + return *o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *Pet) HasTags() bool { + if o != nil && o.Tags != nil { + return true + } + + return false +} + +// SetTags gets a reference to the given []Tag and assigns it to the Tags field. +func (o *Pet) SetTags(v []Tag) { + o.Tags = &v +} + +// GetStatus returns the Status field if non-nil, zero value otherwise. +func (o *Pet) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetStatusOk() (string, bool) { + if o == nil || o.Status == nil { + var ret string + return ret, false + } + return *o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Pet) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Pet) SetStatus(v string) { + o.Status = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Pet) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Category != nil { + toSerialize["category"] = o.Category + } + if o.Name == nil { + return nil, errors.New("Name is required and not nullable, but was not set on Pet") + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.PhotoUrls == nil { + return nil, errors.New("PhotoUrls is required and not nullable, but was not set on Pet") + } + if o.PhotoUrls != nil { + toSerialize["photoUrls"] = o.PhotoUrls + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go new file mode 100644 index 0000000000..3035cc15e5 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go @@ -0,0 +1,101 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// ReadOnlyFirst struct for ReadOnlyFirst +type ReadOnlyFirst struct { + Bar *string `json:"bar,omitempty"` + + Baz *string `json:"baz,omitempty"` + +} + +// GetBar returns the Bar field if non-nil, zero value otherwise. +func (o *ReadOnlyFirst) GetBar() string { + if o == nil || o.Bar == nil { + var ret string + return ret + } + return *o.Bar +} + +// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ReadOnlyFirst) GetBarOk() (string, bool) { + if o == nil || o.Bar == nil { + var ret string + return ret, false + } + return *o.Bar, true +} + +// HasBar returns a boolean if a field has been set. +func (o *ReadOnlyFirst) HasBar() bool { + if o != nil && o.Bar != nil { + return true + } + + return false +} + +// SetBar gets a reference to the given string and assigns it to the Bar field. +func (o *ReadOnlyFirst) SetBar(v string) { + o.Bar = &v +} + +// GetBaz returns the Baz field if non-nil, zero value otherwise. +func (o *ReadOnlyFirst) GetBaz() string { + if o == nil || o.Baz == nil { + var ret string + return ret + } + return *o.Baz +} + +// GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ReadOnlyFirst) GetBazOk() (string, bool) { + if o == nil || o.Baz == nil { + var ret string + return ret, false + } + return *o.Baz, true +} + +// HasBaz returns a boolean if a field has been set. +func (o *ReadOnlyFirst) HasBaz() bool { + if o != nil && o.Baz != nil { + return true + } + + return false +} + +// SetBaz gets a reference to the given string and assigns it to the Baz field. +func (o *ReadOnlyFirst) SetBaz(v string) { + o.Baz = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o ReadOnlyFirst) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Bar != nil { + toSerialize["bar"] = o.Bar + } + if o.Baz != nil { + toSerialize["baz"] = o.Baz + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go new file mode 100644 index 0000000000..fcf674e31c --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// Return Model for testing reserved words +type Return struct { + Return *int32 `json:"return,omitempty"` + +} + +// GetReturn returns the Return field if non-nil, zero value otherwise. +func (o *Return) GetReturn() int32 { + if o == nil || o.Return == nil { + var ret int32 + return ret + } + return *o.Return +} + +// GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Return) GetReturnOk() (int32, bool) { + if o == nil || o.Return == nil { + var ret int32 + return ret, false + } + return *o.Return, true +} + +// HasReturn returns a boolean if a field has been set. +func (o *Return) HasReturn() bool { + if o != nil && o.Return != nil { + return true + } + + return false +} + +// SetReturn gets a reference to the given int32 and assigns it to the Return field. +func (o *Return) SetReturn(v int32) { + o.Return = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Return) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Return != nil { + toSerialize["return"] = o.Return + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go new file mode 100644 index 0000000000..c75f4762e8 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go @@ -0,0 +1,101 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// Tag struct for Tag +type Tag struct { + Id *int64 `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Tag) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Tag) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Tag) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Tag) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Tag) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Tag) SetName(v string) { + o.Name = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o Tag) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go new file mode 100644 index 0000000000..b07841354b --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go @@ -0,0 +1,330 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "encoding/json" +) +// User struct for User +type User struct { + Id *int64 `json:"id,omitempty"` + + Username *string `json:"username,omitempty"` + + FirstName *string `json:"firstName,omitempty"` + + LastName *string `json:"lastName,omitempty"` + + Email *string `json:"email,omitempty"` + + Password *string `json:"password,omitempty"` + + Phone *string `json:"phone,omitempty"` + + // User Status + UserStatus *int32 `json:"userStatus,omitempty"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *User) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *User) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *User) SetId(v int64) { + o.Id = &v +} + +// GetUsername returns the Username field if non-nil, zero value otherwise. +func (o *User) GetUsername() string { + if o == nil || o.Username == nil { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUsernameOk() (string, bool) { + if o == nil || o.Username == nil { + var ret string + return ret, false + } + return *o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *User) HasUsername() bool { + if o != nil && o.Username != nil { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *User) SetUsername(v string) { + o.Username = &v +} + +// GetFirstName returns the FirstName field if non-nil, zero value otherwise. +func (o *User) GetFirstName() string { + if o == nil || o.FirstName == nil { + var ret string + return ret + } + return *o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetFirstNameOk() (string, bool) { + if o == nil || o.FirstName == nil { + var ret string + return ret, false + } + return *o.FirstName, true +} + +// HasFirstName returns a boolean if a field has been set. +func (o *User) HasFirstName() bool { + if o != nil && o.FirstName != nil { + return true + } + + return false +} + +// SetFirstName gets a reference to the given string and assigns it to the FirstName field. +func (o *User) SetFirstName(v string) { + o.FirstName = &v +} + +// GetLastName returns the LastName field if non-nil, zero value otherwise. +func (o *User) GetLastName() string { + if o == nil || o.LastName == nil { + var ret string + return ret + } + return *o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastNameOk() (string, bool) { + if o == nil || o.LastName == nil { + var ret string + return ret, false + } + return *o.LastName, true +} + +// HasLastName returns a boolean if a field has been set. +func (o *User) HasLastName() bool { + if o != nil && o.LastName != nil { + return true + } + + return false +} + +// SetLastName gets a reference to the given string and assigns it to the LastName field. +func (o *User) SetLastName(v string) { + o.LastName = &v +} + +// GetEmail returns the Email field if non-nil, zero value otherwise. +func (o *User) GetEmail() string { + if o == nil || o.Email == nil { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetEmailOk() (string, bool) { + if o == nil || o.Email == nil { + var ret string + return ret, false + } + return *o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *User) HasEmail() bool { + if o != nil && o.Email != nil { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *User) SetEmail(v string) { + o.Email = &v +} + +// GetPassword returns the Password field if non-nil, zero value otherwise. +func (o *User) GetPassword() string { + if o == nil || o.Password == nil { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordOk() (string, bool) { + if o == nil || o.Password == nil { + var ret string + return ret, false + } + return *o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *User) HasPassword() bool { + if o != nil && o.Password != nil { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *User) SetPassword(v string) { + o.Password = &v +} + +// GetPhone returns the Phone field if non-nil, zero value otherwise. +func (o *User) GetPhone() string { + if o == nil || o.Phone == nil { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPhoneOk() (string, bool) { + if o == nil || o.Phone == nil { + var ret string + return ret, false + } + return *o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *User) HasPhone() bool { + if o != nil && o.Phone != nil { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *User) SetPhone(v string) { + o.Phone = &v +} + +// GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. +func (o *User) GetUserStatus() int32 { + if o == nil || o.UserStatus == nil { + var ret int32 + return ret + } + return *o.UserStatus +} + +// GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUserStatusOk() (int32, bool) { + if o == nil || o.UserStatus == nil { + var ret int32 + return ret, false + } + return *o.UserStatus, true +} + +// HasUserStatus returns a boolean if a field has been set. +func (o *User) HasUserStatus() bool { + if o != nil && o.UserStatus != nil { + return true + } + + return false +} + +// SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field. +func (o *User) SetUserStatus(v int32) { + o.UserStatus = &v +} + + +// MarshalJSON returns the JSON representation of the model. +func (o User) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Username != nil { + toSerialize["username"] = o.Username + } + if o.FirstName != nil { + toSerialize["firstName"] = o.FirstName + } + if o.LastName != nil { + toSerialize["lastName"] = o.LastName + } + if o.Email != nil { + toSerialize["email"] = o.Email + } + if o.Password != nil { + toSerialize["password"] = o.Password + } + if o.Phone != nil { + toSerialize["phone"] = o.Phone + } + if o.UserStatus != nil { + toSerialize["userStatus"] = o.UserStatus + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/response.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/response.go new file mode 100644 index 0000000000..77346c8c1e --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/response.go @@ -0,0 +1,46 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResonse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/utils.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/utils.go new file mode 100644 index 0000000000..f5916b755a --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/utils.go @@ -0,0 +1,39 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import "time" + +// PtrBool is a helper routine that returns a pointer to given integer value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat is a helper routine that returns a pointer to given float value. +func PtrFloat(v float32) *float32 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } \ No newline at end of file diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go index ea8783779c..4325ac24ee 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go @@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_default.go b/samples/openapi3/client/petstore/go/go-petstore/api_default.go index f3b325dbd4..8bdd8baefc 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_default.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_default.go @@ -84,7 +84,6 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 0 { var v InlineResponseDefault err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -92,8 +91,6 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go index 7035339127..90b0090b2b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go @@ -95,7 +95,6 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -193,7 +192,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -295,7 +293,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -393,7 +390,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -491,7 +487,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -717,7 +712,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go index d98adc2972..e8fa7e3fd9 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go @@ -108,7 +108,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go index d32003b6c4..9ee468bc78 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go @@ -692,7 +692,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -798,7 +797,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_store.go b/samples/openapi3/client/petstore/go/go-petstore/api_store.go index 654f5e89aa..b1080ac6d3 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_store.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_store.go @@ -174,7 +174,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md index 9c6ce64e29..fb674f202e 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## Call123TestSpecialTags > Client Call123TestSpecialTags(ctx, client) + To test special tags To test special tags and operation ID starting with number diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md index 4fd0ab9872..daf779c8e3 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description > InlineResponseDefault FooGet(ctx, ) + ### Required Parameters This endpoint does not need any parameter. diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md index 0c11da8d77..3634a8771e 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md @@ -24,6 +24,7 @@ Method | HTTP request | Description ## FakeHealthGet > HealthCheckResult FakeHealthGet(ctx, ) + Health check endpoint ### Required Parameters @@ -53,6 +54,7 @@ No authorization required > bool FakeOuterBooleanSerialize(ctx, optional) + Test serialization of outer boolean types ### Required Parameters @@ -95,6 +97,7 @@ No authorization required > OuterComposite FakeOuterCompositeSerialize(ctx, optional) + Test serialization of object with outer number type ### Required Parameters @@ -137,6 +140,7 @@ No authorization required > float32 FakeOuterNumberSerialize(ctx, optional) + Test serialization of outer number types ### Required Parameters @@ -179,6 +183,7 @@ No authorization required > string FakeOuterStringSerialize(ctx, optional) + Test serialization of outer string types ### Required Parameters @@ -221,6 +226,7 @@ No authorization required > TestBodyWithFileSchema(ctx, fileSchemaTestClass) + For this test, the body for this request much reference a schema named `File`. ### Required Parameters @@ -254,6 +260,7 @@ No authorization required > TestBodyWithQueryParams(ctx, query, user) + ### Required Parameters @@ -284,6 +291,7 @@ No authorization required ## TestClientModel > Client TestClientModel(ctx, client) + To test \"client\" model To test \"client\" model @@ -317,6 +325,7 @@ No authorization required ## TestEndpointParameters > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -376,6 +385,7 @@ Name | Type | Description | Notes ## TestEnumParameters > TestEnumParameters(ctx, optional) + To test enum parameters To test enum parameters @@ -425,6 +435,7 @@ No authorization required ## TestGroupParameters > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) + Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -475,6 +486,7 @@ Name | Type | Description | Notes ## TestInlineAdditionalProperties > TestInlineAdditionalProperties(ctx, requestBody) + test inline additionalProperties ### Required Parameters @@ -506,6 +518,7 @@ No authorization required ## TestJsonFormData > TestJsonFormData(ctx, param, param2) + test json serialization of form data ### Required Parameters @@ -540,6 +553,7 @@ No authorization required > TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) + To test the collection format in query parameters ### Required Parameters diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md index 5bf7b3bcc9..b070326cc3 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## TestClassname > Client TestClassname(ctx, client) + To test class name in snake case To test class name in snake case diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md index 9e2f495735..3b6ff48ab9 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Name.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Name.md index 453e54d985..3e91109a16 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Name.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **int32** | | -**SnakeCase** | **int32** | | [optional] +**SnakeCase** | **int32** | | [optional] [readonly] **Property** | **string** | | [optional] -**Var123Number** | **int32** | | [optional] +**Var123Number** | **int32** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md index c4f37589f0..8118df7009 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description ## AddPet > AddPet(ctx, pet) + Add a new pet to the store ### Required Parameters @@ -50,6 +51,7 @@ Name | Type | Description | Notes ## DeletePet > DeletePet(ctx, petId, optional) + Deletes a pet ### Required Parameters @@ -92,6 +94,7 @@ Name | Type | Description | Notes ## FindPetsByStatus > []Pet FindPetsByStatus(ctx, status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -125,6 +128,7 @@ Name | Type | Description | Notes ## FindPetsByTags > []Pet FindPetsByTags(ctx, tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -158,6 +162,7 @@ Name | Type | Description | Notes ## GetPetById > Pet GetPetById(ctx, petId) + Find pet by ID Returns a single pet @@ -191,6 +196,7 @@ Name | Type | Description | Notes ## UpdatePet > UpdatePet(ctx, pet) + Update an existing pet ### Required Parameters @@ -222,6 +228,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm > UpdatePetWithForm(ctx, petId, optional) + Updates a pet in the store with form data ### Required Parameters @@ -265,6 +272,7 @@ Name | Type | Description | Notes ## UploadFile > ApiResponse UploadFile(ctx, petId, optional) + uploads an image ### Required Parameters @@ -308,6 +316,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) + uploads an image (required) ### Required Parameters diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md index 3fee799f29..a86828404e 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md index c7f9bbcee0..c24d87bbfd 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description ## DeleteOrder > DeleteOrder(ctx, orderId) + Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -47,6 +48,7 @@ No authorization required ## GetInventory > map[string]int32 GetInventory(ctx, ) + Returns pet inventories by status Returns a map of status codes to quantities @@ -76,6 +78,7 @@ This endpoint does not need any parameter. ## GetOrderById > Order GetOrderById(ctx, orderId) + Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -109,6 +112,7 @@ No authorization required ## PlaceOrder > Order PlaceOrder(ctx, order) + Place an order for a pet ### Required Parameters diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md index 6c443592e5..01d05d555c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description ## CreateUser > CreateUser(ctx, user) + Create user This can only be done by the logged in user. @@ -51,6 +52,7 @@ No authorization required ## CreateUsersWithArrayInput > CreateUsersWithArrayInput(ctx, user) + Creates list of users with given input array ### Required Parameters @@ -82,6 +84,7 @@ No authorization required ## CreateUsersWithListInput > CreateUsersWithListInput(ctx, user) + Creates list of users with given input array ### Required Parameters @@ -113,6 +116,7 @@ No authorization required ## DeleteUser > DeleteUser(ctx, username) + Delete user This can only be done by the logged in user. @@ -146,6 +150,7 @@ No authorization required ## GetUserByName > User GetUserByName(ctx, username) + Get user by user name ### Required Parameters @@ -177,6 +182,7 @@ No authorization required ## LoginUser > string LoginUser(ctx, username, password) + Logs user into the system ### Required Parameters @@ -209,6 +215,7 @@ No authorization required ## LogoutUser > LogoutUser(ctx, ) + Logs out current logged in user session ### Required Parameters @@ -236,6 +243,7 @@ No authorization required ## UpdateUser > UpdateUser(ctx, username, user) + Updated user This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/go/go-petstore/go.mod b/samples/openapi3/client/petstore/go/go-petstore/go.mod index 199809ed70..c7c2a426e7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/go.mod +++ b/samples/openapi3/client/petstore/go/go-petstore/go.mod @@ -1,6 +1,8 @@ module github.com/GIT_USER_ID/GIT_REPO_ID +go 1.13 + require ( - github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 + golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a ) diff --git a/samples/openapi3/client/petstore/go/go-petstore/go.sum b/samples/openapi3/client/petstore/go/go-petstore/go.sum index e3c16fef3a..97b347238f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/go.sum +++ b/samples/openapi3/client/petstore/go/go-petstore/go.sum @@ -1,11 +1,15 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_outer_enum_integer.go b/samples/openapi3/client/petstore/go/go-petstore/model_outer_enum_integer.go index 406d2aa670..bae14df0f7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_outer_enum_integer.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_outer_enum_integer.go @@ -13,7 +13,7 @@ type OuterEnumInteger int32 // List of OuterEnumInteger const ( - _0 OuterEnumInteger = "0" - _1 OuterEnumInteger = "1" - _2 OuterEnumInteger = "2" + _0 OuterEnumInteger = 0 + _1 OuterEnumInteger = 1 + _2 OuterEnumInteger = 2 ) diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_outer_enum_integer_default_value.go b/samples/openapi3/client/petstore/go/go-petstore/model_outer_enum_integer_default_value.go index 3a6b54a261..b882d7aee2 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_outer_enum_integer_default_value.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_outer_enum_integer_default_value.go @@ -13,7 +13,7 @@ type OuterEnumIntegerDefaultValue int32 // List of OuterEnumIntegerDefaultValue const ( - _0 OuterEnumIntegerDefaultValue = "0" - _1 OuterEnumIntegerDefaultValue = "1" - _2 OuterEnumIntegerDefaultValue = "2" + _0 OuterEnumIntegerDefaultValue = 0 + _1 OuterEnumIntegerDefaultValue = 1 + _2 OuterEnumIntegerDefaultValue = 2 ) diff --git a/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION b/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION index d99e7162d0..0e97bd19ef 100644 --- a/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +4.1.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/AdditionalPropertiesClass.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/AdditionalPropertiesClass.kt index 4367965e2d..fe775011a9 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/AdditionalPropertiesClass.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/AdditionalPropertiesClass.kt @@ -28,4 +28,9 @@ data class AdditionalPropertiesClass ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Animal.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Animal.kt index ba590f165b..188e1ddc70 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Animal.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Animal.kt @@ -28,4 +28,9 @@ data class Animal ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 22773e6505..6df7feef3d 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -31,4 +31,9 @@ data class ApiResponse ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfArrayOfNumberOnly.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfArrayOfNumberOnly.kt index 5c9048466e..7a302b510f 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfArrayOfNumberOnly.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfArrayOfNumberOnly.kt @@ -25,4 +25,9 @@ data class ArrayOfArrayOfNumberOnly ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfNumberOnly.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfNumberOnly.kt index 214ef4b0cf..f8b5404b7e 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfNumberOnly.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfNumberOnly.kt @@ -25,4 +25,9 @@ data class ArrayOfNumberOnly ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayTest.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayTest.kt index d406e97bf7..1831ecc889 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayTest.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayTest.kt @@ -32,4 +32,9 @@ data class ArrayTest ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Capitalization.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Capitalization.kt index c9153d08cc..c478ffe918 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Capitalization.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Capitalization.kt @@ -41,4 +41,9 @@ data class Capitalization ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Cat.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Cat.kt index 05c1647fb7..48c9727de0 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Cat.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Cat.kt @@ -31,4 +31,9 @@ data class Cat ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt index c4cb55cb62..37bc7add21 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt @@ -25,4 +25,9 @@ data class CatAllOf ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt index f3280e75d4..61dc86df21 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -28,4 +28,9 @@ data class Category ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ClassModel.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ClassModel.kt index 7580a49224..17228f01f4 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ClassModel.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ClassModel.kt @@ -25,4 +25,9 @@ data class ClassModel ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Client.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Client.kt index 09324d61a0..c0f91b21a9 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Client.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Client.kt @@ -25,4 +25,9 @@ data class Client ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Dog.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Dog.kt index 54a2bb6fea..22414a0efd 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Dog.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Dog.kt @@ -31,4 +31,9 @@ data class Dog ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt index 6085540ff7..086ee4c6a0 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt @@ -25,4 +25,9 @@ data class DogAllOf ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumArrays.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumArrays.kt index 79b1a4c101..c0e6c30e55 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumArrays.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumArrays.kt @@ -29,6 +29,10 @@ data class EnumArrays ( : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } + /** * diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumTest.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumTest.kt index 52ea113cc9..53b05926f1 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumTest.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumTest.kt @@ -51,6 +51,10 @@ data class EnumTest ( : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } + /** * diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FileSchemaTestClass.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FileSchemaTestClass.kt index ab39639e0c..7deb80853b 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FileSchemaTestClass.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FileSchemaTestClass.kt @@ -28,4 +28,9 @@ data class FileSchemaTestClass ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Foo.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Foo.kt index 0dd32c21af..57925fce83 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Foo.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Foo.kt @@ -25,4 +25,9 @@ data class Foo ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt index e746da485f..2b587f520d 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt @@ -69,4 +69,9 @@ data class FormatTest ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt index 04eef4d206..949cb4e5b8 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt @@ -28,4 +28,9 @@ data class HasOnlyReadOnly ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt index ce497df1fc..57c37e9dc6 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt @@ -25,4 +25,9 @@ data class HealthCheckResult ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject.kt index f2f290f408..9168926168 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject.kt @@ -30,4 +30,9 @@ data class InlineObject ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject1.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject1.kt index ea1e3ae241..7e996c6a4f 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject1.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject1.kt @@ -30,4 +30,9 @@ data class InlineObject1 ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject2.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject2.kt index ec48e39edf..16b100cac2 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject2.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject2.kt @@ -31,6 +31,10 @@ data class InlineObject2 ( : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } + /** * Form parameter enum test (string array) diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject3.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject3.kt index b2725c7fc1..aacdc7583f 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject3.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject3.kt @@ -78,4 +78,9 @@ data class InlineObject3 ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject4.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject4.kt index f6776d3b7f..58674757a7 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject4.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject4.kt @@ -30,4 +30,9 @@ data class InlineObject4 ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject5.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject5.kt index 0497fa03e6..0c7c601bd7 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject5.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject5.kt @@ -30,4 +30,9 @@ data class InlineObject5 ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt index b09c724605..de26c4e00b 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt @@ -26,4 +26,9 @@ data class InlineResponseDefault ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt index 43f321eabc..c24ed15dea 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt @@ -16,13 +16,18 @@ import com.squareup.moshi.Json import java.io.Serializable /** * - * @param ``123minusList`` + * @param `123minusList` */ data class List ( @Json(name = "123-list") - val ``123minusList``: kotlin.String? = null + val `123minusList`: kotlin.String? = null ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MapTest.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MapTest.kt index bf1aa56a15..d877a29bfd 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MapTest.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MapTest.kt @@ -35,6 +35,10 @@ data class MapTest ( : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } + /** * diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MixedPropertiesAndAdditionalPropertiesClass.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MixedPropertiesAndAdditionalPropertiesClass.kt index 1551efc4c2..21d8a09810 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MixedPropertiesAndAdditionalPropertiesClass.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MixedPropertiesAndAdditionalPropertiesClass.kt @@ -32,4 +32,9 @@ data class MixedPropertiesAndAdditionalPropertiesClass ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Model200Response.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Model200Response.kt index bb07187522..542405de96 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Model200Response.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Model200Response.kt @@ -28,4 +28,9 @@ data class Model200Response ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Name.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Name.kt index 1362bd97c1..99df32389a 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Name.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Name.kt @@ -19,7 +19,7 @@ import java.io.Serializable * @param name * @param snakeCase * @param property - * @param ``123number`` + * @param `123number` */ data class Name ( @@ -30,8 +30,13 @@ data class Name ( @Json(name = "property") val property: kotlin.String? = null, @Json(name = "123Number") - val ``123number``: kotlin.Int? = null + val `123number`: kotlin.Int? = null ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NullableClass.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NullableClass.kt index 7bfd1d97c1..afc8d24463 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NullableClass.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NullableClass.kt @@ -58,4 +58,9 @@ data class NullableClass ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NumberOnly.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NumberOnly.kt index d14ad1907e..15c8dfdcf5 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NumberOnly.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NumberOnly.kt @@ -25,4 +25,9 @@ data class NumberOnly ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt index 07459585e9..db8d8a57bd 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -42,6 +42,10 @@ data class Order ( : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } + /** * Order Status diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/OuterComposite.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/OuterComposite.kt index 21565c2cff..2d2fd9b1c6 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/OuterComposite.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/OuterComposite.kt @@ -31,4 +31,9 @@ data class OuterComposite ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt index 23abc63ce3..f687d44901 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -44,6 +44,10 @@ data class Pet ( : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } + /** * pet status in the store diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ReadOnlyFirst.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ReadOnlyFirst.kt index 325a4c5ffd..7265237f9b 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ReadOnlyFirst.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ReadOnlyFirst.kt @@ -28,4 +28,9 @@ data class ReadOnlyFirst ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Return.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Return.kt index 6670a26a8f..4ee2459c1c 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Return.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Return.kt @@ -16,13 +16,18 @@ import com.squareup.moshi.Json import java.io.Serializable /** * Model for testing reserved words - * @param ``return`` + * @param `return` */ data class Return ( @Json(name = "return") - val ``return``: kotlin.Int? = null + val `return`: kotlin.Int? = null ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt index 2bcfeb506e..b6161bcfd6 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt @@ -25,4 +25,9 @@ data class SpecialModelname ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt index 7596c7d495..13667abe03 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -28,4 +28,9 @@ data class Tag ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt index d6bd140f13..4443da984d 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt @@ -47,4 +47,9 @@ data class User ( ) : Serializable +{ + companion object { + private const val serialVersionUID: Long = 123 + } +} diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/HasOnlyReadOnly.md index 573e7cd2f1..3f4d729d56 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **string** | | [optional] -**foo** | **string** | | [optional] +**bar** | **string** | | [optional] [readonly] +**foo** | **string** | | [optional] [readonly] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/Name.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/Name.md index d6839ec136..a501f9bb0d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/Name.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **int** | | -**snake_case** | **int** | | [optional] +**snake_case** | **int** | | [optional] [readonly] **property** | **string** | | [optional] -**_123_number** | **int** | | [optional] +**_123_number** | **int** | | [optional] [readonly] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/ReadOnlyFirst.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/ReadOnlyFirst.md index d9bd8bdf90..40bf46c3ed 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **string** | | [optional] +**bar** | **string** | | [optional] [readonly] **baz** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md index 44ad450b52..f731a42eab 100644 --- a/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] -**foo** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] +**foo** | **str** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Name.md b/samples/openapi3/client/petstore/python/docs/Name.md index 542da3f047..17dc7a38fe 100644 --- a/samples/openapi3/client/petstore/python/docs/Name.md +++ b/samples/openapi3/client/petstore/python/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **int** | | -**snake_case** | **int** | | [optional] +**snake_case** | **int** | | [optional] [readonly] **_property** | **str** | | [optional] -**_123_number** | **int** | | [optional] +**_123_number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md index 93fed253d0..6bc1447c1d 100644 --- a/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] **baz** | **str** | | [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/python/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py index 07cf6defd8..6f3925c1ab 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py @@ -103,8 +103,8 @@ class AnotherFakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in local_var_params or - local_var_params['client'] is None): + if self.api_client.client_side_validation and ('client' not in local_var_params or # noqa: E501 + local_var_params['client'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `client` when calling `call_123_test_special_tags`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index bd4e6f6c3e..b4247c90c7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -633,8 +633,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'file_schema_test_class' is set - if ('file_schema_test_class' not in local_var_params or - local_var_params['file_schema_test_class'] is None): + if self.api_client.client_side_validation and ('file_schema_test_class' not in local_var_params or # noqa: E501 + local_var_params['file_schema_test_class'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `file_schema_test_class` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -741,12 +741,12 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in local_var_params or - local_var_params['query'] is None): + if self.api_client.client_side_validation and ('query' not in local_var_params or # noqa: E501 + local_var_params['query'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -754,7 +754,7 @@ class FakeApi(object): path_params = {} query_params = [] - if 'query' in local_var_params: + if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -855,8 +855,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in local_var_params or - local_var_params['client'] is None): + if self.api_client.client_side_validation and ('client' not in local_var_params or # noqa: E501 + local_var_params['client'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -993,49 +993,49 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in local_var_params or - local_var_params['number'] is None): + if self.api_client.client_side_validation and ('number' not in local_var_params or # noqa: E501 + local_var_params['number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in local_var_params or - local_var_params['double'] is None): + if self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 + local_var_params['double'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in local_var_params or - local_var_params['pattern_without_delimiter'] is None): + if self.api_client.client_side_validation and ('pattern_without_delimiter' not in local_var_params or # noqa: E501 + local_var_params['pattern_without_delimiter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in local_var_params or - local_var_params['byte'] is None): + if self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 + local_var_params['byte'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ApiValueError("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(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if self.api_client.client_side_validation and 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ApiValueError("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 + if self.api_client.client_side_validation and 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ApiValueError("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(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if self.api_client.client_side_validation and 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ApiValueError("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): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) > 64): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) < 10): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) < 10): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -1186,14 +1186,14 @@ class FakeApi(object): path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params: + if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'multi' # noqa: E501 - if 'enum_query_string' in local_var_params: + if 'enum_query_string' in local_var_params and local_var_params['enum_query_string'] is not None: # noqa: E501 query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in local_var_params: + if 'enum_query_integer' in local_var_params and local_var_params['enum_query_integer'] is not None: # noqa: E501 query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in local_var_params: + if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} @@ -1312,16 +1312,16 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - if ('required_string_group' not in local_var_params or - local_var_params['required_string_group'] is None): + if self.api_client.client_side_validation and ('required_string_group' not in local_var_params or # noqa: E501 + local_var_params['required_string_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_string_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_boolean_group' is set - if ('required_boolean_group' not in local_var_params or - local_var_params['required_boolean_group'] is None): + if self.api_client.client_side_validation and ('required_boolean_group' not in local_var_params or # noqa: E501 + local_var_params['required_boolean_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_boolean_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_int64_group' is set - if ('required_int64_group' not in local_var_params or - local_var_params['required_int64_group'] is None): + if self.api_client.client_side_validation and ('required_int64_group' not in local_var_params or # noqa: E501 + local_var_params['required_int64_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501 collection_formats = {} @@ -1329,13 +1329,13 @@ class FakeApi(object): path_params = {} query_params = [] - if 'required_string_group' in local_var_params: + if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 query_params.append(('required_string_group', local_var_params['required_string_group'])) # noqa: E501 - if 'required_int64_group' in local_var_params: + if 'required_int64_group' in local_var_params and local_var_params['required_int64_group'] is not None: # noqa: E501 query_params.append(('required_int64_group', local_var_params['required_int64_group'])) # noqa: E501 - if 'string_group' in local_var_params: + if 'string_group' in local_var_params and local_var_params['string_group'] is not None: # noqa: E501 query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 - if 'int64_group' in local_var_params: + if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = {} @@ -1432,8 +1432,8 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'request_body' is set - if ('request_body' not in local_var_params or - local_var_params['request_body'] is None): + if self.api_client.client_side_validation and ('request_body' not in local_var_params or # noqa: E501 + local_var_params['request_body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1540,12 +1540,12 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in local_var_params or - local_var_params['param2'] is None): + if self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 + local_var_params['param2'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1662,24 +1662,24 @@ class FakeApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - if ('pipe' not in local_var_params or - local_var_params['pipe'] is None): + if self.api_client.client_side_validation and ('pipe' not in local_var_params or # noqa: E501 + local_var_params['pipe'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pipe` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'ioutil' is set - if ('ioutil' not in local_var_params or - local_var_params['ioutil'] is None): + if self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 + local_var_params['ioutil'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ioutil` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'http' is set - if ('http' not in local_var_params or - local_var_params['http'] is None): + if self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 + local_var_params['http'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `http` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'url' is set - if ('url' not in local_var_params or - local_var_params['url'] is None): + if self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 + local_var_params['url'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `url` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'context' is set - if ('context' not in local_var_params or - local_var_params['context'] is None): + if self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 + local_var_params['context'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} @@ -1687,19 +1687,19 @@ class FakeApi(object): path_params = {} query_params = [] - if 'pipe' in local_var_params: + if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 query_params.append(('pipe', local_var_params['pipe'])) # noqa: E501 collection_formats['pipe'] = 'multi' # noqa: E501 - if 'ioutil' in local_var_params: + if 'ioutil' in local_var_params and local_var_params['ioutil'] is not None: # noqa: E501 query_params.append(('ioutil', local_var_params['ioutil'])) # noqa: E501 collection_formats['ioutil'] = 'csv' # noqa: E501 - if 'http' in local_var_params: + if 'http' in local_var_params and local_var_params['http'] is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'space' # noqa: E501 - if 'url' in local_var_params: + if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 query_params.append(('url', local_var_params['url'])) # noqa: E501 collection_formats['url'] = 'csv' # noqa: E501 - if 'context' in local_var_params: + if 'context' in local_var_params and local_var_params['context'] is not None: # noqa: E501 query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py index 8446a6d399..a01b9a7de5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py @@ -103,8 +103,8 @@ class FakeClassnameTags123Api(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in local_var_params or - local_var_params['client'] is None): + if self.api_client.client_side_validation and ('client' not in local_var_params or # noqa: E501 + local_var_params['client'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py index 60987d9715..af535ad119 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py @@ -107,8 +107,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet' is set - if ('pet' not in local_var_params or - local_var_params['pet'] is None): + if self.api_client.client_side_validation and ('pet' not in local_var_params or # noqa: E501 + local_var_params['pet'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -216,8 +216,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -322,8 +322,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in local_var_params or - local_var_params['status'] is None): + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -331,7 +331,7 @@ class PetApi(object): path_params = {} query_params = [] - if 'status' in local_var_params: + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -431,8 +431,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in local_var_params or - local_var_params['tags'] is None): + if self.api_client.client_side_validation and ('tags' not in local_var_params or # noqa: E501 + local_var_params['tags'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -440,7 +440,7 @@ class PetApi(object): path_params = {} query_params = [] - if 'tags' in local_var_params: + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 @@ -540,8 +540,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -652,8 +652,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet' is set - if ('pet' not in local_var_params or - local_var_params['pet'] is None): + if self.api_client.client_side_validation and ('pet' not in local_var_params or # noqa: E501 + local_var_params['pet'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -763,8 +763,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -877,8 +877,8 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -995,12 +995,12 @@ class PetApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'required_file' is set - if ('required_file' not in local_var_params or - local_var_params['required_file'] is None): + if self.api_client.client_side_validation and ('required_file' not in local_var_params or # noqa: E501 + local_var_params['required_file'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py index 944ea66190..7ad607fdf3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py @@ -103,8 +103,8 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -307,13 +307,13 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} @@ -417,8 +417,8 @@ class StoreApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order' is set - if ('order' not in local_var_params or - local_var_params['order'] is None): + if self.api_client.client_side_validation and ('order' not in local_var_params or # noqa: E501 + local_var_params['order'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py index 5e8125477f..eb2663b756 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py @@ -103,8 +103,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -209,8 +209,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -315,8 +315,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -423,8 +423,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -525,8 +525,8 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -633,12 +633,12 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in local_var_params or - local_var_params['password'] is None): + if self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 + local_var_params['password'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -646,9 +646,9 @@ class UserApi(object): path_params = {} query_params = [] - if 'username' in local_var_params: + if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params: + if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} @@ -843,12 +843,12 @@ class UserApi(object): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index df3a9815aa..f9c494a76c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -77,6 +77,7 @@ class ApiClient(object): self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation def __del__(self): if self._pool: @@ -372,10 +373,8 @@ class ApiClient(object): return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/configuration.py b/samples/openapi3/client/petstore/python/petstore_api/configuration.py index 499d3870a5..d03bd91e19 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/configuration.py +++ b/samples/openapi3/client/petstore/python/petstore_api/configuration.py @@ -138,6 +138,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py index 17cd6af679..9da151ae82 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class AdditionalPropertiesClass(object): 'map_of_map_property': 'map_of_map_property' } - def __init__(self, map_property=None, map_of_map_property=None): # noqa: E501 + def __init__(self, map_property=None, map_of_map_property=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_property = None self._map_of_map_property = None @@ -131,8 +136,11 @@ class AdditionalPropertiesClass(object): if not isinstance(other, AdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python/petstore_api/models/animal.py index 552ef0e832..65cef1a608 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/animal.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Animal(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class Animal(object): 'Cat': 'Cat' } - def __init__(self, class_name=None, color='red'): # noqa: E501 + def __init__(self, class_name=None, color='red', local_vars_configuration=None): # noqa: E501 """Animal - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._class_name = None self._color = None @@ -74,7 +79,7 @@ class Animal(object): :param class_name: The class_name of this Animal. # noqa: E501 :type: str """ - if class_name is None: + if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501 raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501 self._class_name = class_name @@ -143,8 +148,11 @@ class Animal(object): if not isinstance(other, Animal): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Animal): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py index 190c3df345..24e80d02ae 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ApiResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ApiResponse(object): 'message': 'message' } - def __init__(self, code=None, type=None, message=None): # noqa: E501 + def __init__(self, code=None, type=None, message=None, local_vars_configuration=None): # noqa: E501 """ApiResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._code = None self._type = None @@ -157,8 +162,11 @@ class ApiResponse(object): if not isinstance(other, ApiResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ApiResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py index ebf9642980..1f65445207 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayOfArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfArrayOfNumberOnly(object): 'array_array_number': 'ArrayArrayNumber' } - def __init__(self, array_array_number=None): # noqa: E501 + def __init__(self, array_array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_array_number = None self.discriminator = None @@ -105,8 +110,11 @@ class ArrayOfArrayOfNumberOnly(object): if not isinstance(other, ArrayOfArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py index 8e1837c46b..27ba1f58e3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfNumberOnly(object): 'array_number': 'ArrayNumber' } - def __init__(self, array_number=None): # noqa: E501 + def __init__(self, array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_number = None self.discriminator = None @@ -105,8 +110,11 @@ class ArrayOfNumberOnly(object): if not isinstance(other, ArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py index f548fef3ee..f34a372f6f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ArrayTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ArrayTest(object): 'array_array_of_model': 'array_array_of_model' } - def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501 + def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None, local_vars_configuration=None): # noqa: E501 """ArrayTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_of_string = None self._array_array_of_integer = None @@ -157,8 +162,11 @@ class ArrayTest(object): if not isinstance(other, ArrayTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py index 0da6b77e84..cef34c5f6d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Capitalization(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Capitalization(object): 'att_name': 'ATT_NAME' } - def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501 + def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None, local_vars_configuration=None): # noqa: E501 """Capitalization - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._small_camel = None self._capital_camel = None @@ -237,8 +242,11 @@ class Capitalization(object): if not isinstance(other, Capitalization): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Capitalization): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python/petstore_api/models/cat.py index 216e512353..e39c1c8250 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/cat.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Cat(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Cat(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """Cat - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ class Cat(object): if not isinstance(other, Cat): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Cat): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py index 3c90df84ec..7e90fab934 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class CatAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class CatAllOf(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """CatAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ class CatAllOf(object): if not isinstance(other, CatAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CatAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/category.py b/samples/openapi3/client/petstore/python/petstore_api/models/category.py index 0e23c409e5..b47c148953 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/category.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/category.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Category(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Category(object): 'name': 'name' } - def __init__(self, id=None, name='default-name'): # noqa: E501 + def __init__(self, id=None, name='default-name', local_vars_configuration=None): # noqa: E501 """Category - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -90,7 +95,7 @@ class Category(object): :param name: The name of this Category. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -132,8 +137,11 @@ class Category(object): if not isinstance(other, Category): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Category): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py index 88562beff8..ef6060ffa7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ClassModel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ClassModel(object): '_class': '_class' } - def __init__(self, _class=None): # noqa: E501 + def __init__(self, _class=None, local_vars_configuration=None): # noqa: E501 """ClassModel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__class = None self.discriminator = None @@ -105,8 +110,11 @@ class ClassModel(object): if not isinstance(other, ClassModel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassModel): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/client.py b/samples/openapi3/client/petstore/python/petstore_api/models/client.py index b7083fd9bd..ee5dbf1c43 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/client.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Client(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Client(object): 'client': 'client' } - def __init__(self, client=None): # noqa: E501 + def __init__(self, client=None, local_vars_configuration=None): # noqa: E501 """Client - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._client = None self.discriminator = None @@ -105,8 +110,11 @@ class Client(object): if not isinstance(other, Client): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Client): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python/petstore_api/models/dog.py index c325cb252c..eacb63eedb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/dog.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Dog(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Dog(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """Dog - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ class Dog(object): if not isinstance(other, Dog): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Dog): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py index b6328b0558..48e0485570 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class DogAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class DogAllOf(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """DogAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ class DogAllOf(object): if not isinstance(other, DogAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, DogAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py index 00aa21d04d..819ff32215 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumArrays(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class EnumArrays(object): 'array_enum': 'array_enum' } - def __init__(self, just_symbol=None, array_enum=None): # noqa: E501 + def __init__(self, just_symbol=None, array_enum=None, local_vars_configuration=None): # noqa: E501 """EnumArrays - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_symbol = None self._array_enum = None @@ -71,7 +76,7 @@ class EnumArrays(object): :type: str """ allowed_values = [">=", "$"] # noqa: E501 - if just_symbol not in allowed_values: + if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501 .format(just_symbol, allowed_values) @@ -98,7 +103,8 @@ class EnumArrays(object): :type: list[str] """ allowed_values = ["fish", "crab"] # noqa: E501 - if not set(array_enum).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(array_enum).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 @@ -144,8 +150,11 @@ class EnumArrays(object): if not isinstance(other, EnumArrays): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumArrays): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py index 3c1aa27975..8bc6275786 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class EnumClass(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """EnumClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class EnumClass(object): if not isinstance(other, EnumClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py index 07b17fe5da..24ed1b462d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class EnumTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -52,8 +54,11 @@ class EnumTest(object): 'outer_enum_integer_default_value': 'outerEnumIntegerDefaultValue' } - def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, outer_enum_integer=None, outer_enum_default_value=None, outer_enum_integer_default_value=None): # noqa: E501 + def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, outer_enum_integer=None, outer_enum_default_value=None, outer_enum_integer_default_value=None, local_vars_configuration=None): # noqa: E501 """EnumTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._enum_string = None self._enum_string_required = None @@ -99,7 +104,7 @@ class EnumTest(object): :type: str """ allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501 .format(enum_string, allowed_values) @@ -125,10 +130,10 @@ class EnumTest(object): :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 :type: str """ - if enum_string_required is None: + if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501 raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string_required not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string_required not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501 .format(enum_string_required, allowed_values) @@ -155,7 +160,7 @@ class EnumTest(object): :type: int """ allowed_values = [1, -1] # noqa: E501 - if enum_integer not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501 .format(enum_integer, allowed_values) @@ -182,7 +187,7 @@ class EnumTest(object): :type: float """ allowed_values = [1.1, -1.2] # noqa: E501 - if enum_number not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501 .format(enum_number, allowed_values) @@ -311,8 +316,11 @@ class EnumTest(object): if not isinstance(other, EnumTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/file.py b/samples/openapi3/client/petstore/python/petstore_api/models/file.py index 475f86b799..282df2957e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/file.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class File(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class File(object): 'source_uri': 'sourceURI' } - def __init__(self, source_uri=None): # noqa: E501 + def __init__(self, source_uri=None, local_vars_configuration=None): # noqa: E501 """File - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._source_uri = None self.discriminator = None @@ -107,8 +112,11 @@ class File(object): if not isinstance(other, File): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, File): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py index 9f3b5bdc17..de7f865b47 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class FileSchemaTestClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class FileSchemaTestClass(object): 'files': 'files' } - def __init__(self, file=None, files=None): # noqa: E501 + def __init__(self, file=None, files=None, local_vars_configuration=None): # noqa: E501 """FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._file = None self._files = None @@ -131,8 +136,11 @@ class FileSchemaTestClass(object): if not isinstance(other, FileSchemaTestClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FileSchemaTestClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python/petstore_api/models/foo.py index 4368815952..0a98b8837c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/foo.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/foo.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Foo(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Foo(object): 'bar': 'bar' } - def __init__(self, bar='bar'): # noqa: E501 + def __init__(self, bar='bar', local_vars_configuration=None): # noqa: E501 """Foo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self.discriminator = None @@ -105,8 +110,11 @@ class Foo(object): if not isinstance(other, Foo): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Foo): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py index 005e00cdff..60e64039be 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class FormatTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -66,8 +68,11 @@ class FormatTest(object): 'pattern_with_digits_and_delimiter': 'pattern_with_digits_and_delimiter' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, pattern_with_digits=None, pattern_with_digits_and_delimiter=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, pattern_with_digits=None, pattern_with_digits_and_delimiter=None, local_vars_configuration=None): # noqa: E501 """FormatTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer = None self._int32 = None @@ -131,9 +136,11 @@ class FormatTest(object): :param integer: The integer of this FormatTest. # noqa: E501 :type: int """ - if integer is not None and integer > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer > 100): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501 - if integer is not None and integer < 10: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer < 10): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501 self._integer = integer @@ -156,9 +163,11 @@ class FormatTest(object): :param int32: The int32 of this FormatTest. # noqa: E501 :type: int """ - if int32 is not None and int32 > 200: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 > 200): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501 - if int32 is not None and int32 < 20: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 < 20): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501 self._int32 = int32 @@ -202,11 +211,13 @@ class FormatTest(object): :param number: The number of this FormatTest. # noqa: E501 :type: float """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - if number is not None and number > 543.2: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number > 543.2): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501 - if number is not None and number < 32.1: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number < 32.1): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501 self._number = number @@ -229,9 +240,11 @@ class FormatTest(object): :param float: The float of this FormatTest. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float > 987.6): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 - if float is not None and float < 54.3: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float < 54.3): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501 self._float = float @@ -254,9 +267,11 @@ class FormatTest(object): :param double: The double of this FormatTest. # noqa: E501 :type: float """ - if double is not None and double > 123.4: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double > 123.4): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501 - if double is not None and double < 67.8: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double < 67.8): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501 self._double = double @@ -279,7 +294,8 @@ class FormatTest(object): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + 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 @@ -302,7 +318,7 @@ class FormatTest(object): :param byte: The byte of this FormatTest. # noqa: E501 :type: str """ - if byte is None: + if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501 raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 self._byte = byte @@ -346,7 +362,7 @@ class FormatTest(object): :param date: The date of this FormatTest. # noqa: E501 :type: date """ - if date is None: + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 self._date = date @@ -411,11 +427,13 @@ class FormatTest(object): :param password: The password of this FormatTest. # noqa: E501 :type: str """ - if password is None: + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - if password is not None and len(password) > 64: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 64): raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501 - if password is not None and len(password) < 10: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 10): raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501 self._password = password @@ -440,7 +458,8 @@ class FormatTest(object): :param pattern_with_digits: The pattern_with_digits of this FormatTest. # noqa: E501 :type: str """ - if pattern_with_digits is not None and not re.search(r'^\d{10}$', pattern_with_digits): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + pattern_with_digits is not None and not re.search(r'^\d{10}$', pattern_with_digits)): # noqa: E501 raise ValueError(r"Invalid value for `pattern_with_digits`, must be a follow pattern or equal to `/^\d{10}$/`") # noqa: E501 self._pattern_with_digits = pattern_with_digits @@ -465,7 +484,8 @@ class FormatTest(object): :param pattern_with_digits_and_delimiter: The pattern_with_digits_and_delimiter of this FormatTest. # noqa: E501 :type: str """ - if pattern_with_digits_and_delimiter is not None and not re.search(r'^image_\d{1,3}$', pattern_with_digits_and_delimiter, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + pattern_with_digits_and_delimiter is not None and not re.search(r'^image_\d{1,3}$', pattern_with_digits_and_delimiter, flags=re.IGNORECASE)): # noqa: E501 raise ValueError(r"Invalid value for `pattern_with_digits_and_delimiter`, must be a follow pattern or equal to `/^image_\d{1,3}$/i`") # noqa: E501 self._pattern_with_digits_and_delimiter = pattern_with_digits_and_delimiter @@ -507,8 +527,11 @@ class FormatTest(object): if not isinstance(other, FormatTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FormatTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py index 7c8d921a2d..5fc2f8a9eb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class HasOnlyReadOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class HasOnlyReadOnly(object): 'foo': 'foo' } - def __init__(self, bar=None, foo=None): # noqa: E501 + def __init__(self, bar=None, foo=None, local_vars_configuration=None): # noqa: E501 """HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._foo = None @@ -131,8 +136,11 @@ class HasOnlyReadOnly(object): if not isinstance(other, HasOnlyReadOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, HasOnlyReadOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py index c7051c31c5..7c62a43ef7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class HealthCheckResult(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class HealthCheckResult(object): 'nullable_message': 'NullableMessage' } - def __init__(self, nullable_message=None): # noqa: E501 + def __init__(self, nullable_message=None, local_vars_configuration=None): # noqa: E501 """HealthCheckResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._nullable_message = None self.discriminator = None @@ -104,8 +109,11 @@ class HealthCheckResult(object): if not isinstance(other, HealthCheckResult): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, HealthCheckResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py index 39eba7c59a..0ac70b16a3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class InlineObject(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class InlineObject(object): 'status': 'status' } - def __init__(self, name=None, status=None): # noqa: E501 + def __init__(self, name=None, status=None, local_vars_configuration=None): # noqa: E501 """InlineObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._status = None @@ -135,8 +140,11 @@ class InlineObject(object): if not isinstance(other, InlineObject): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py index b354a352a5..300af445d0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class InlineObject1(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class InlineObject1(object): 'file': 'file' } - def __init__(self, additional_metadata=None, file=None): # noqa: E501 + def __init__(self, additional_metadata=None, file=None, local_vars_configuration=None): # noqa: E501 """InlineObject1 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._additional_metadata = None self._file = None @@ -135,8 +140,11 @@ class InlineObject1(object): if not isinstance(other, InlineObject1): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject1): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py index 88032d774a..f904d0a24d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class InlineObject2(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class InlineObject2(object): 'enum_form_string': 'enum_form_string' } - def __init__(self, enum_form_string_array=None, enum_form_string='-efg'): # noqa: E501 + def __init__(self, enum_form_string_array=None, enum_form_string='-efg', local_vars_configuration=None): # noqa: E501 """InlineObject2 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._enum_form_string_array = None self._enum_form_string = None @@ -73,7 +78,8 @@ class InlineObject2(object): :type: list[str] """ allowed_values = [">", "$"] # noqa: E501 - if not set(enum_form_string_array).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(enum_form_string_array).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `enum_form_string_array` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(enum_form_string_array) - set(allowed_values))), # noqa: E501 @@ -103,7 +109,7 @@ class InlineObject2(object): :type: str """ allowed_values = ["_abc", "-efg", "(xyz)"] # noqa: E501 - if enum_form_string not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_form_string not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_form_string` ({0}), must be one of {1}" # noqa: E501 .format(enum_form_string, allowed_values) @@ -148,8 +154,11 @@ class InlineObject2(object): if not isinstance(other, InlineObject2): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject2): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py index 843136bf6b..9870a922b2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class InlineObject3(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -64,8 +66,11 @@ class InlineObject3(object): 'callback': 'callback' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, pattern_without_delimiter=None, byte=None, binary=None, date=None, date_time=None, password=None, callback=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, pattern_without_delimiter=None, byte=None, binary=None, date=None, date_time=None, password=None, callback=None, local_vars_configuration=None): # noqa: E501 """InlineObject3 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer = None self._int32 = None @@ -128,9 +133,11 @@ class InlineObject3(object): :param integer: The integer of this InlineObject3. # noqa: E501 :type: int """ - if integer is not None and integer > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer > 100): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501 - if integer is not None and integer < 10: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer < 10): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501 self._integer = integer @@ -155,9 +162,11 @@ class InlineObject3(object): :param int32: The int32 of this InlineObject3. # noqa: E501 :type: int """ - if int32 is not None and int32 > 200: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 > 200): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501 - if int32 is not None and int32 < 20: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 < 20): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501 self._int32 = int32 @@ -205,11 +214,13 @@ class InlineObject3(object): :param number: The number of this InlineObject3. # noqa: E501 :type: float """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - if number is not None and number > 543.2: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number > 543.2): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501 - if number is not None and number < 32.1: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number < 32.1): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501 self._number = number @@ -234,7 +245,8 @@ class InlineObject3(object): :param float: The float of this InlineObject3. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float > 987.6): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 self._float = float @@ -259,11 +271,13 @@ class InlineObject3(object): :param double: The double of this InlineObject3. # noqa: E501 :type: float """ - if double is None: + if self.local_vars_configuration.client_side_validation and double is None: # noqa: E501 raise ValueError("Invalid value for `double`, must not be `None`") # noqa: E501 - if double is not None and double > 123.4: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double > 123.4): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501 - if double is not None and double < 67.8: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double < 67.8): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501 self._double = double @@ -288,7 +302,8 @@ class InlineObject3(object): :param string: The string of this InlineObject3. # noqa: E501 :type: str """ - if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + 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 @@ -313,9 +328,10 @@ class InlineObject3(object): :param pattern_without_delimiter: The pattern_without_delimiter of this InlineObject3. # noqa: E501 :type: str """ - if pattern_without_delimiter is None: + if self.local_vars_configuration.client_side_validation and pattern_without_delimiter is None: # noqa: E501 raise ValueError("Invalid value for `pattern_without_delimiter`, must not be `None`") # noqa: E501 - if pattern_without_delimiter is not None and not re.search(r'^[A-Z].*', pattern_without_delimiter): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + pattern_without_delimiter is not None and not re.search(r'^[A-Z].*', pattern_without_delimiter)): # noqa: E501 raise ValueError(r"Invalid value for `pattern_without_delimiter`, must be a follow pattern or equal to `/^[A-Z].*/`") # noqa: E501 self._pattern_without_delimiter = pattern_without_delimiter @@ -340,7 +356,7 @@ class InlineObject3(object): :param byte: The byte of this InlineObject3. # noqa: E501 :type: str """ - if byte is None: + if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501 raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 self._byte = byte @@ -434,9 +450,11 @@ class InlineObject3(object): :param password: The password of this InlineObject3. # noqa: E501 :type: str """ - if password is not None and len(password) > 64: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 64): raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501 - if password is not None and len(password) < 10: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 10): raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501 self._password = password @@ -501,8 +519,11 @@ class InlineObject3(object): if not isinstance(other, InlineObject3): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject3): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py index 4b81711192..a4ecb978d0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class InlineObject4(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class InlineObject4(object): 'param2': 'param2' } - def __init__(self, param=None, param2=None): # noqa: E501 + def __init__(self, param=None, param2=None, local_vars_configuration=None): # noqa: E501 """InlineObject4 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._param = None self._param2 = None @@ -70,7 +75,7 @@ class InlineObject4(object): :param param: The param of this InlineObject4. # noqa: E501 :type: str """ - if param is None: + if self.local_vars_configuration.client_side_validation and param is None: # noqa: E501 raise ValueError("Invalid value for `param`, must not be `None`") # noqa: E501 self._param = param @@ -95,7 +100,7 @@ class InlineObject4(object): :param param2: The param2 of this InlineObject4. # noqa: E501 :type: str """ - if param2 is None: + if self.local_vars_configuration.client_side_validation and param2 is None: # noqa: E501 raise ValueError("Invalid value for `param2`, must not be `None`") # noqa: E501 self._param2 = param2 @@ -137,8 +142,11 @@ class InlineObject4(object): if not isinstance(other, InlineObject4): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject4): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py index bdc63b3ab2..2badeb2274 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class InlineObject5(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class InlineObject5(object): 'required_file': 'requiredFile' } - def __init__(self, additional_metadata=None, required_file=None): # noqa: E501 + def __init__(self, additional_metadata=None, required_file=None, local_vars_configuration=None): # noqa: E501 """InlineObject5 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._additional_metadata = None self._required_file = None @@ -94,7 +99,7 @@ class InlineObject5(object): :param required_file: The required_file of this InlineObject5. # noqa: E501 :type: file """ - if required_file is None: + if self.local_vars_configuration.client_side_validation and required_file is None: # noqa: E501 raise ValueError("Invalid value for `required_file`, must not be `None`") # noqa: E501 self._required_file = required_file @@ -136,8 +141,11 @@ class InlineObject5(object): if not isinstance(other, InlineObject5): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject5): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py index 434ebdfb08..3904d39c9c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class InlineResponseDefault(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class InlineResponseDefault(object): 'string': 'string' } - def __init__(self, string=None): # noqa: E501 + def __init__(self, string=None, local_vars_configuration=None): # noqa: E501 """InlineResponseDefault - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string = None self.discriminator = None @@ -105,8 +110,11 @@ class InlineResponseDefault(object): if not isinstance(other, InlineResponseDefault): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineResponseDefault): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/list.py b/samples/openapi3/client/petstore/python/petstore_api/models/list.py index 74fc3719aa..d58d13e90f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/list.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/list.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class List(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class List(object): '_123_list': '123-list' } - def __init__(self, _123_list=None): # noqa: E501 + def __init__(self, _123_list=None, local_vars_configuration=None): # noqa: E501 """List - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__123_list = None self.discriminator = None @@ -105,8 +110,11 @@ class List(object): if not isinstance(other, List): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, List): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py index cdfb936529..f0cfba5073 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class MapTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class MapTest(object): 'indirect_map': 'indirect_map' } - def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501 + def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None, local_vars_configuration=None): # noqa: E501 """MapTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_map_of_string = None self._map_of_enum_string = None @@ -102,7 +107,8 @@ class MapTest(object): :type: dict(str, str) """ allowed_values = ["UPPER", "lower"] # noqa: E501 - if not set(map_of_enum_string.keys()).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 @@ -190,8 +196,11 @@ class MapTest(object): if not isinstance(other, MapTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MapTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py index 41a916eac1..5da34f8830 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class MixedPropertiesAndAdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): 'map': 'map' } - def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501 + def __init__(self, uuid=None, date_time=None, map=None, local_vars_configuration=None): # noqa: E501 """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._uuid = None self._date_time = None @@ -157,8 +162,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py index 563b82b593..841ce1f18f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Model200Response(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Model200Response(object): '_class': 'class' } - def __init__(self, name=None, _class=None): # noqa: E501 + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 """Model200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.__class = None @@ -131,8 +136,11 @@ class Model200Response(object): if not isinstance(other, Model200Response): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Model200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py index 0980120159..fdd8d72314 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ModelReturn(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ModelReturn(object): '_return': 'return' } - def __init__(self, _return=None): # noqa: E501 + def __init__(self, _return=None, local_vars_configuration=None): # noqa: E501 """ModelReturn - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__return = None self.discriminator = None @@ -105,8 +110,11 @@ class ModelReturn(object): if not isinstance(other, ModelReturn): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ModelReturn): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/name.py b/samples/openapi3/client/petstore/python/petstore_api/models/name.py index 43014d0fb6..bb2c1fbd73 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/name.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Name(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class Name(object): '_123_number': '123Number' } - def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501 + def __init__(self, name=None, snake_case=None, _property=None, _123_number=None, local_vars_configuration=None): # noqa: E501 """Name - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._snake_case = None @@ -79,7 +84,7 @@ class Name(object): :param name: The name of this Name. # noqa: E501 :type: int """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -184,8 +189,11 @@ class Name(object): if not isinstance(other, Name): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Name): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py index b589850f45..b81eb554e9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class NullableClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -60,8 +62,11 @@ class NullableClass(object): 'object_items_nullable': 'object_items_nullable' } - def __init__(self, integer_prop=None, number_prop=None, boolean_prop=None, string_prop=None, date_prop=None, datetime_prop=None, array_nullable_prop=None, array_and_items_nullable_prop=None, array_items_nullable=None, object_nullable_prop=None, object_and_items_nullable_prop=None, object_items_nullable=None): # noqa: E501 + def __init__(self, integer_prop=None, number_prop=None, boolean_prop=None, string_prop=None, date_prop=None, datetime_prop=None, array_nullable_prop=None, array_and_items_nullable_prop=None, array_items_nullable=None, object_nullable_prop=None, object_and_items_nullable_prop=None, object_items_nullable=None, local_vars_configuration=None): # noqa: E501 """NullableClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer_prop = None self._number_prop = None @@ -381,8 +386,11 @@ class NullableClass(object): if not isinstance(other, NullableClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NullableClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py index b6f3d1c1b6..99b2424852 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class NumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class NumberOnly(object): 'just_number': 'JustNumber' } - def __init__(self, just_number=None): # noqa: E501 + def __init__(self, just_number=None, local_vars_configuration=None): # noqa: E501 """NumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_number = None self.discriminator = None @@ -105,8 +110,11 @@ class NumberOnly(object): if not isinstance(other, NumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/order.py b/samples/openapi3/client/petstore/python/petstore_api/models/order.py index 8b64e3a358..8c863cce8f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/order.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Order(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Order(object): 'complete': 'complete' } - def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501 + def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False, local_vars_configuration=None): # noqa: E501 """Order - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._pet_id = None @@ -177,7 +182,7 @@ class Order(object): :type: str """ allowed_values = ["placed", "approved", "delivered"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -243,8 +248,11 @@ class Order(object): if not isinstance(other, Order): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Order): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py index dccd67055b..c11859114a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterComposite(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class OuterComposite(object): 'my_boolean': 'my_boolean' } - def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501 + def __init__(self, my_number=None, my_string=None, my_boolean=None, local_vars_configuration=None): # noqa: E501 """OuterComposite - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._my_number = None self._my_string = None @@ -157,8 +162,11 @@ class OuterComposite(object): if not isinstance(other, OuterComposite): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterComposite): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py index a6697a0b15..8fbfeb7aae 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterEnum(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnum(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnum - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class OuterEnum(object): if not isinstance(other, OuterEnum): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnum): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_default_value.py index 30824a6587..881edd1384 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_default_value.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterEnumDefaultValue(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnumDefaultValue(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnumDefaultValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class OuterEnumDefaultValue(object): if not isinstance(other, OuterEnumDefaultValue): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnumDefaultValue): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer.py index 59edabdd20..8e6d0c44b0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterEnumInteger(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnumInteger(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnumInteger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class OuterEnumInteger(object): if not isinstance(other, OuterEnumInteger): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnumInteger): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py index 488fd986ef..943ad3b596 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class OuterEnumIntegerDefaultValue(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnumIntegerDefaultValue(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnumIntegerDefaultValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ class OuterEnumIntegerDefaultValue(object): if not isinstance(other, OuterEnumIntegerDefaultValue): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnumIntegerDefaultValue): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python/petstore_api/models/pet.py index 870608e17a..edbf73f531 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/pet.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Pet(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Pet(object): 'status': 'status' } - def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501 + def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, local_vars_configuration=None): # noqa: E501 """Pet - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._category = None @@ -130,7 +135,7 @@ class Pet(object): :param name: The name of this Pet. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -153,7 +158,7 @@ class Pet(object): :param photo_urls: The photo_urls of this Pet. # noqa: E501 :type: list[str] """ - if photo_urls is None: + if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501 raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501 self._photo_urls = photo_urls @@ -200,7 +205,7 @@ class Pet(object): :type: str """ allowed_values = ["available", "pending", "sold"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -245,8 +250,11 @@ class Pet(object): if not isinstance(other, Pet): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Pet): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py index 3dfb7c7f62..a84679e98d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class ReadOnlyFirst(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class ReadOnlyFirst(object): 'baz': 'baz' } - def __init__(self, bar=None, baz=None): # noqa: E501 + def __init__(self, bar=None, baz=None, local_vars_configuration=None): # noqa: E501 """ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._baz = None @@ -131,8 +136,11 @@ class ReadOnlyFirst(object): if not isinstance(other, ReadOnlyFirst): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ReadOnlyFirst): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py index 2fd6378fcd..396e75bcee 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class SpecialModelName(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class SpecialModelName(object): 'special_property_name': '$special[property.name]' } - def __init__(self, special_property_name=None): # noqa: E501 + def __init__(self, special_property_name=None, local_vars_configuration=None): # noqa: E501 """SpecialModelName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._special_property_name = None self.discriminator = None @@ -105,8 +110,11 @@ class SpecialModelName(object): if not isinstance(other, SpecialModelName): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SpecialModelName): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python/petstore_api/models/tag.py index cb9c22d9f5..d6137fdd47 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/tag.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/tag.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class Tag(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Tag(object): 'name': 'name' } - def __init__(self, id=None, name=None): # noqa: E501 + def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501 """Tag - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -131,8 +136,11 @@ class Tag(object): if not isinstance(other, Tag): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Tag): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/user.py b/samples/openapi3/client/petstore/python/petstore_api/models/user.py index f46f5165df..de88bda4cd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/user.py @@ -15,6 +15,8 @@ import re # noqa: F401 import six +from petstore_api.configuration import Configuration + class User(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -52,8 +54,11 @@ class User(object): 'user_status': 'userStatus' } - def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501 + def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None, local_vars_configuration=None): # noqa: E501 """User - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._username = None @@ -289,8 +294,11 @@ class User(object): if not isinstance(other, User): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, User): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/ruby-faraday/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/ruby-faraday/docs/HasOnlyReadOnly.md index eb82d6b113..a15219a9c7 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/ruby-faraday/docs/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] ## Code Sample diff --git a/samples/openapi3/client/petstore/ruby-faraday/docs/Name.md b/samples/openapi3/client/petstore/ruby-faraday/docs/Name.md index bf4f381fe8..17cdbbd356 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/docs/Name.md +++ b/samples/openapi3/client/petstore/ruby-faraday/docs/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snake_case** | **Integer** | | [optional] +**snake_case** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123_number** | **Integer** | | [optional] +**_123_number** | **Integer** | | [optional] [readonly] ## Code Sample diff --git a/samples/openapi3/client/petstore/ruby-faraday/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/ruby-faraday/docs/ReadOnlyFirst.md index af6644b78a..f8f76a463a 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/ruby-faraday/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] ## Code Sample diff --git a/samples/openapi3/client/petstore/ruby/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/ruby/docs/HasOnlyReadOnly.md index eb82d6b113..a15219a9c7 100644 --- a/samples/openapi3/client/petstore/ruby/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/ruby/docs/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] ## Code Sample diff --git a/samples/openapi3/client/petstore/ruby/docs/Name.md b/samples/openapi3/client/petstore/ruby/docs/Name.md index bf4f381fe8..17cdbbd356 100644 --- a/samples/openapi3/client/petstore/ruby/docs/Name.md +++ b/samples/openapi3/client/petstore/ruby/docs/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Integer** | | -**snake_case** | **Integer** | | [optional] +**snake_case** | **Integer** | | [optional] [readonly] **property** | **String** | | [optional] -**_123_number** | **Integer** | | [optional] +**_123_number** | **Integer** | | [optional] [readonly] ## Code Sample diff --git a/samples/openapi3/client/petstore/ruby/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/ruby/docs/ReadOnlyFirst.md index af6644b78a..f8f76a463a 100644 --- a/samples/openapi3/client/petstore/ruby/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/ruby/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] ## Code Sample diff --git a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION index 2f81801b79..c3a2c7076f 100644 --- a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION +++ b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.1-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION index afa6365606..c3a2c7076f 100644 --- a/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/go-api-server/go/README.md b/samples/openapi3/server/petstore/go-api-server/README.md similarity index 100% rename from samples/openapi3/server/petstore/go-api-server/go/README.md rename to samples/openapi3/server/petstore/go-api-server/README.md diff --git a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml index 2cd94b385f..c5e930efc5 100644 --- a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml @@ -130,7 +130,8 @@ paths: /pet/findByTags: get: deprecated: true - description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - description: Tags to filter by @@ -350,7 +351,8 @@ paths: - store /store/order/{order_id}: delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted @@ -370,7 +372,8 @@ paths: tags: - store get: - description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -604,7 +607,6 @@ paths: name: required_string_group required: true schema: - format: int32 type: integer style: form - description: Required Boolean in group parameters @@ -630,7 +632,6 @@ paths: name: string_group required: false schema: - format: int32 type: integer style: form - description: Boolean in group parameters @@ -803,7 +804,6 @@ paths: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -1045,7 +1045,8 @@ paths: - $another-fake? /fake/body-with-file-schema: put: - description: For this test, the body for this request much reference a schema named `File`. + description: For this test, the body for this request much reference a schema + named `File`. operationId: testBodyWithFileSchema requestBody: content: @@ -1058,6 +1059,61 @@ paths: description: Success tags: - fake + /fake/test-query-paramters: + put: + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - explode: true + in: query + name: pipe + required: true + schema: + items: + type: string + type: array + style: form + - explode: false + in: query + name: ioutil + required: true + schema: + items: + type: string + type: array + style: form + - explode: false + in: query + name: http + required: true + schema: + items: + type: string + type: array + style: spaceDelimited + - explode: false + in: query + name: url + required: true + schema: + items: + type: string + type: array + style: form + - explode: true + in: query + name: context + required: true + schema: + items: + type: string + type: array + style: form + responses: + 200: + description: Success + tags: + - fake /fake/{petId}/uploadImageWithRequiredFile: post: operationId: uploadFileWithRequiredFile @@ -1368,7 +1424,6 @@ components: property: type: string 123Number: - format: int32 readOnly: true type: integer required: @@ -1393,17 +1448,11 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - properties: - breed: - type: string - type: object + - $ref: '#/components/schemas/Dog_allOf' Cat: allOf: - $ref: '#/components/schemas/Animal' - - properties: - declawed: - type: boolean - type: object + - $ref: '#/components/schemas/Cat_allOf' Animal: discriminator: propertyName: className @@ -1423,7 +1472,6 @@ components: format_test: properties: integer: - format: int32 maximum: 100 minimum: 10 type: integer @@ -1478,7 +1526,8 @@ components: pattern: ^\d{10}$ type: string pattern_with_digits_and_delimiter: - description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. pattern: /^image_\d{1,3}$/i type: string required: @@ -1625,6 +1674,7 @@ components: indirect_map: additionalProperties: type: boolean + type: object type: object ArrayTest: properties: @@ -1687,13 +1737,13 @@ components: - placed - approved - delivered + nullable: true type: string OuterEnumInteger: enum: - 0 - 1 - 2 - format: int32 type: integer OuterEnumDefaultValue: default: placed @@ -1708,7 +1758,6 @@ components: - 0 - 1 - 2 - format: int32 type: integer OuterComposite: example: @@ -1734,6 +1783,7 @@ components: StringBooleanMap: additionalProperties: type: boolean + type: object FileSchemaTestClass: example: file: @@ -1766,7 +1816,8 @@ components: xml: name: $special[model.name] HealthCheckResult: - description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. example: NullableMessage: NullableMessage properties: @@ -1774,6 +1825,64 @@ components: nullable: true type: string type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object inline_response_default: example: string: @@ -1824,7 +1933,6 @@ components: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -1917,6 +2025,14 @@ components: required: - requiredFile type: object + Dog_allOf: + properties: + breed: + type: string + Cat_allOf: + properties: + declawed: + type: boolean securitySchemes: petstore_auth: flows: diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_fake.go b/samples/openapi3/server/petstore/go-api-server/go/api_fake.go index 6ac1fa4355..07ebda735b 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/api_fake.go +++ b/samples/openapi3/server/petstore/go-api-server/go/api_fake.go @@ -90,3 +90,9 @@ func TestJsonFormData(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") w.WriteHeader(http.StatusOK) } + +// TestQueryParameterCollectionFormat - +func TestQueryParameterCollectionFormat(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_cat_all_of.go b/samples/openapi3/server/petstore/go-api-server/go/model_cat_all_of.go new file mode 100644 index 0000000000..312c33895f --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/model_cat_all_of.go @@ -0,0 +1,15 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +type CatAllOf struct { + + Declawed bool `json:"declawed,omitempty"` +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_dog_all_of.go b/samples/openapi3/server/petstore/go-api-server/go/model_dog_all_of.go new file mode 100644 index 0000000000..a36b96b1a0 --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/model_dog_all_of.go @@ -0,0 +1,15 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +type DogAllOf struct { + + Breed string `json:"breed,omitempty"` +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_enum_test_.go b/samples/openapi3/server/petstore/go-api-server/go/model_enum_test_.go index 01b52e667f..7822fd4e9d 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_enum_test_.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_enum_test_.go @@ -19,7 +19,7 @@ type EnumTest struct { EnumNumber float64 `json:"enum_number,omitempty"` - OuterEnum OuterEnum `json:"outerEnum,omitempty"` + OuterEnum *OuterEnum `json:"outerEnum,omitempty"` OuterEnumInteger OuterEnumInteger `json:"outerEnumInteger,omitempty"` diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_nullable_class.go b/samples/openapi3/server/petstore/go-api-server/go/model_nullable_class.go new file mode 100644 index 0000000000..ba2aa1f86c --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/model_nullable_class.go @@ -0,0 +1,41 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +import ( + "time" +) + +type NullableClass struct { + + IntegerProp *int32 `json:"integer_prop,omitempty"` + + NumberProp *float32 `json:"number_prop,omitempty"` + + BooleanProp *bool `json:"boolean_prop,omitempty"` + + StringProp *string `json:"string_prop,omitempty"` + + DateProp *string `json:"date_prop,omitempty"` + + DatetimeProp *time.Time `json:"datetime_prop,omitempty"` + + ArrayNullableProp *[]map[string]interface{} `json:"array_nullable_prop,omitempty"` + + ArrayAndItemsNullableProp *[]map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"` + + ArrayItemsNullable []map[string]interface{} `json:"array_items_nullable,omitempty"` + + ObjectNullableProp *map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"` + + ObjectAndItemsNullableProp *map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"` + + ObjectItemsNullable map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer.go b/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer.go index de39696684..f14b13342a 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer.go @@ -13,7 +13,7 @@ type OuterEnumInteger int32 // List of OuterEnumInteger const ( - _0 OuterEnumInteger = "0" - _1 OuterEnumInteger = "1" - _2 OuterEnumInteger = "2" + _0 OuterEnumInteger = 0 + _1 OuterEnumInteger = 1 + _2 OuterEnumInteger = 2 ) diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer_default_value.go b/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer_default_value.go index 2e4dc213ea..94b4bb2077 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer_default_value.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer_default_value.go @@ -13,7 +13,7 @@ type OuterEnumIntegerDefaultValue int32 // List of OuterEnumIntegerDefaultValue const ( - _0 OuterEnumIntegerDefaultValue = "0" - _1 OuterEnumIntegerDefaultValue = "1" - _2 OuterEnumIntegerDefaultValue = "2" + _0 OuterEnumIntegerDefaultValue = 0 + _1 OuterEnumIntegerDefaultValue = 1 + _2 OuterEnumIntegerDefaultValue = 2 ) diff --git a/samples/openapi3/server/petstore/go-api-server/go/routers.go b/samples/openapi3/server/petstore/go-api-server/go/routers.go index 215c2ba072..616ae81843 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/routers.go +++ b/samples/openapi3/server/petstore/go-api-server/go/routers.go @@ -160,6 +160,13 @@ var routes = Routes{ TestJsonFormData, }, + { + "TestQueryParameterCollectionFormat", + strings.ToUpper("Put"), + "/v2/fake/test-query-paramters", + TestQueryParameterCollectionFormat, + }, + { "TestClassname", strings.ToUpper("Patch"), diff --git a/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION index afa6365606..c3a2c7076f 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml index 2cd94b385f..c5e930efc5 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml @@ -130,7 +130,8 @@ paths: /pet/findByTags: get: deprecated: true - description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - description: Tags to filter by @@ -350,7 +351,8 @@ paths: - store /store/order/{order_id}: delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted @@ -370,7 +372,8 @@ paths: tags: - store get: - description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -604,7 +607,6 @@ paths: name: required_string_group required: true schema: - format: int32 type: integer style: form - description: Required Boolean in group parameters @@ -630,7 +632,6 @@ paths: name: string_group required: false schema: - format: int32 type: integer style: form - description: Boolean in group parameters @@ -803,7 +804,6 @@ paths: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -1045,7 +1045,8 @@ paths: - $another-fake? /fake/body-with-file-schema: put: - description: For this test, the body for this request much reference a schema named `File`. + description: For this test, the body for this request much reference a schema + named `File`. operationId: testBodyWithFileSchema requestBody: content: @@ -1058,6 +1059,61 @@ paths: description: Success tags: - fake + /fake/test-query-paramters: + put: + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - explode: true + in: query + name: pipe + required: true + schema: + items: + type: string + type: array + style: form + - explode: false + in: query + name: ioutil + required: true + schema: + items: + type: string + type: array + style: form + - explode: false + in: query + name: http + required: true + schema: + items: + type: string + type: array + style: spaceDelimited + - explode: false + in: query + name: url + required: true + schema: + items: + type: string + type: array + style: form + - explode: true + in: query + name: context + required: true + schema: + items: + type: string + type: array + style: form + responses: + 200: + description: Success + tags: + - fake /fake/{petId}/uploadImageWithRequiredFile: post: operationId: uploadFileWithRequiredFile @@ -1368,7 +1424,6 @@ components: property: type: string 123Number: - format: int32 readOnly: true type: integer required: @@ -1393,17 +1448,11 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - properties: - breed: - type: string - type: object + - $ref: '#/components/schemas/Dog_allOf' Cat: allOf: - $ref: '#/components/schemas/Animal' - - properties: - declawed: - type: boolean - type: object + - $ref: '#/components/schemas/Cat_allOf' Animal: discriminator: propertyName: className @@ -1423,7 +1472,6 @@ components: format_test: properties: integer: - format: int32 maximum: 100 minimum: 10 type: integer @@ -1478,7 +1526,8 @@ components: pattern: ^\d{10}$ type: string pattern_with_digits_and_delimiter: - description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. pattern: /^image_\d{1,3}$/i type: string required: @@ -1625,6 +1674,7 @@ components: indirect_map: additionalProperties: type: boolean + type: object type: object ArrayTest: properties: @@ -1687,13 +1737,13 @@ components: - placed - approved - delivered + nullable: true type: string OuterEnumInteger: enum: - 0 - 1 - 2 - format: int32 type: integer OuterEnumDefaultValue: default: placed @@ -1708,7 +1758,6 @@ components: - 0 - 1 - 2 - format: int32 type: integer OuterComposite: example: @@ -1734,6 +1783,7 @@ components: StringBooleanMap: additionalProperties: type: boolean + type: object FileSchemaTestClass: example: file: @@ -1766,7 +1816,8 @@ components: xml: name: $special[model.name] HealthCheckResult: - description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. example: NullableMessage: NullableMessage properties: @@ -1774,6 +1825,64 @@ components: nullable: true type: string type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object inline_response_default: example: string: @@ -1824,7 +1933,6 @@ components: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -1917,6 +2025,14 @@ components: required: - requiredFile type: object + Dog_allOf: + properties: + breed: + type: string + Cat_allOf: + properties: + declawed: + type: boolean securitySchemes: petstore_auth: flows: diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go index ec2f170ad5..17107d021c 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go @@ -79,3 +79,8 @@ func TestInlineAdditionalProperties(c *gin.Context) { func TestJsonFormData(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } + +// TestQueryParameterCollectionFormat - +func TestQueryParameterCollectionFormat(c *gin.Context) { + c.JSON(http.StatusOK, gin.H{}) +} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat_all_of.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat_all_of.go new file mode 100644 index 0000000000..312c33895f --- /dev/null +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat_all_of.go @@ -0,0 +1,15 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +type CatAllOf struct { + + Declawed bool `json:"declawed,omitempty"` +} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog_all_of.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog_all_of.go new file mode 100644 index 0000000000..a36b96b1a0 --- /dev/null +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog_all_of.go @@ -0,0 +1,15 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +type DogAllOf struct { + + Breed string `json:"breed,omitempty"` +} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_test_.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_test_.go index 01b52e667f..7822fd4e9d 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_test_.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_test_.go @@ -19,7 +19,7 @@ type EnumTest struct { EnumNumber float64 `json:"enum_number,omitempty"` - OuterEnum OuterEnum `json:"outerEnum,omitempty"` + OuterEnum *OuterEnum `json:"outerEnum,omitempty"` OuterEnumInteger OuterEnumInteger `json:"outerEnumInteger,omitempty"` diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_nullable_class.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_nullable_class.go new file mode 100644 index 0000000000..ba2aa1f86c --- /dev/null +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_nullable_class.go @@ -0,0 +1,41 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +import ( + "time" +) + +type NullableClass struct { + + IntegerProp *int32 `json:"integer_prop,omitempty"` + + NumberProp *float32 `json:"number_prop,omitempty"` + + BooleanProp *bool `json:"boolean_prop,omitempty"` + + StringProp *string `json:"string_prop,omitempty"` + + DateProp *string `json:"date_prop,omitempty"` + + DatetimeProp *time.Time `json:"datetime_prop,omitempty"` + + ArrayNullableProp *[]map[string]interface{} `json:"array_nullable_prop,omitempty"` + + ArrayAndItemsNullableProp *[]map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"` + + ArrayItemsNullable []map[string]interface{} `json:"array_items_nullable,omitempty"` + + ObjectNullableProp *map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"` + + ObjectAndItemsNullableProp *map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"` + + ObjectItemsNullable map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` +} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer.go index de39696684..f14b13342a 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer.go @@ -13,7 +13,7 @@ type OuterEnumInteger int32 // List of OuterEnumInteger const ( - _0 OuterEnumInteger = "0" - _1 OuterEnumInteger = "1" - _2 OuterEnumInteger = "2" + _0 OuterEnumInteger = 0 + _1 OuterEnumInteger = 1 + _2 OuterEnumInteger = 2 ) diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer_default_value.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer_default_value.go index 2e4dc213ea..94b4bb2077 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer_default_value.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer_default_value.go @@ -13,7 +13,7 @@ type OuterEnumIntegerDefaultValue int32 // List of OuterEnumIntegerDefaultValue const ( - _0 OuterEnumIntegerDefaultValue = "0" - _1 OuterEnumIntegerDefaultValue = "1" - _2 OuterEnumIntegerDefaultValue = "2" + _0 OuterEnumIntegerDefaultValue = 0 + _1 OuterEnumIntegerDefaultValue = 1 + _2 OuterEnumIntegerDefaultValue = 2 ) diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go b/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go index fd73305ca4..4d05d282f9 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go @@ -11,7 +11,6 @@ package petstoreserver import ( "net/http" - "strings" "github.com/gin-gonic/gin" ) @@ -36,13 +35,13 @@ func NewRouter() *gin.Engine { router := gin.Default() for _, route := range routes { switch route.Method { - case "GET": + case http.MethodGet: router.GET(route.Pattern, route.HandlerFunc) - case "POST": + case http.MethodPost: router.POST(route.Pattern, route.HandlerFunc) - case "PUT": + case http.MethodPut: router.PUT(route.Pattern, route.HandlerFunc) - case "DELETE": + case http.MethodDelete: router.DELETE(route.Pattern, route.HandlerFunc) } } @@ -58,266 +57,273 @@ func Index(c *gin.Context) { var routes = Routes{ { "Index", - "GET", + http.MethodGet, "/v2/", Index, }, { "Call123TestSpecialTags", - strings.ToUpper("Patch"), + http.MethodPatch, "/v2/another-fake/dummy", Call123TestSpecialTags, }, { "FooGet", - strings.ToUpper("Get"), + http.MethodGet, "/v2/foo", FooGet, }, { "FakeHealthGet", - strings.ToUpper("Get"), + http.MethodGet, "/v2/fake/health", FakeHealthGet, }, { "FakeOuterBooleanSerialize", - strings.ToUpper("Post"), + http.MethodPost, "/v2/fake/outer/boolean", FakeOuterBooleanSerialize, }, { "FakeOuterCompositeSerialize", - strings.ToUpper("Post"), + http.MethodPost, "/v2/fake/outer/composite", FakeOuterCompositeSerialize, }, { "FakeOuterNumberSerialize", - strings.ToUpper("Post"), + http.MethodPost, "/v2/fake/outer/number", FakeOuterNumberSerialize, }, { "FakeOuterStringSerialize", - strings.ToUpper("Post"), + http.MethodPost, "/v2/fake/outer/string", FakeOuterStringSerialize, }, { "TestBodyWithFileSchema", - strings.ToUpper("Put"), + http.MethodPut, "/v2/fake/body-with-file-schema", TestBodyWithFileSchema, }, { "TestBodyWithQueryParams", - strings.ToUpper("Put"), + http.MethodPut, "/v2/fake/body-with-query-params", TestBodyWithQueryParams, }, { "TestClientModel", - strings.ToUpper("Patch"), + http.MethodPatch, "/v2/fake", TestClientModel, }, { "TestEndpointParameters", - strings.ToUpper("Post"), + http.MethodPost, "/v2/fake", TestEndpointParameters, }, { "TestEnumParameters", - strings.ToUpper("Get"), + http.MethodGet, "/v2/fake", TestEnumParameters, }, { "TestGroupParameters", - strings.ToUpper("Delete"), + http.MethodDelete, "/v2/fake", TestGroupParameters, }, { "TestInlineAdditionalProperties", - strings.ToUpper("Post"), + http.MethodPost, "/v2/fake/inline-additionalProperties", TestInlineAdditionalProperties, }, { "TestJsonFormData", - strings.ToUpper("Get"), + http.MethodGet, "/v2/fake/jsonFormData", TestJsonFormData, }, + { + "TestQueryParameterCollectionFormat", + http.MethodPut, + "/v2/fake/test-query-paramters", + TestQueryParameterCollectionFormat, + }, + { "TestClassname", - strings.ToUpper("Patch"), + http.MethodPatch, "/v2/fake_classname_test", TestClassname, }, { "AddPet", - strings.ToUpper("Post"), + http.MethodPost, "/v2/pet", AddPet, }, { "DeletePet", - strings.ToUpper("Delete"), + http.MethodDelete, "/v2/pet/:petId", DeletePet, }, { "FindPetsByStatus", - strings.ToUpper("Get"), + http.MethodGet, "/v2/pet/findByStatus", FindPetsByStatus, }, { "FindPetsByTags", - strings.ToUpper("Get"), + http.MethodGet, "/v2/pet/findByTags", FindPetsByTags, }, { "GetPetById", - strings.ToUpper("Get"), + http.MethodGet, "/v2/pet/:petId", GetPetById, }, { "UpdatePet", - strings.ToUpper("Put"), + http.MethodPut, "/v2/pet", UpdatePet, }, { "UpdatePetWithForm", - strings.ToUpper("Post"), + http.MethodPost, "/v2/pet/:petId", UpdatePetWithForm, }, { "UploadFile", - strings.ToUpper("Post"), + http.MethodPost, "/v2/pet/:petId/uploadImage", UploadFile, }, { "UploadFileWithRequiredFile", - strings.ToUpper("Post"), + http.MethodPost, "/v2/fake/:petId/uploadImageWithRequiredFile", UploadFileWithRequiredFile, }, { "DeleteOrder", - strings.ToUpper("Delete"), + http.MethodDelete, "/v2/store/order/:order_id", DeleteOrder, }, { "GetInventory", - strings.ToUpper("Get"), + http.MethodGet, "/v2/store/inventory", GetInventory, }, { "GetOrderById", - strings.ToUpper("Get"), + http.MethodGet, "/v2/store/order/:order_id", GetOrderById, }, { "PlaceOrder", - strings.ToUpper("Post"), + http.MethodPost, "/v2/store/order", PlaceOrder, }, { "CreateUser", - strings.ToUpper("Post"), + http.MethodPost, "/v2/user", CreateUser, }, { "CreateUsersWithArrayInput", - strings.ToUpper("Post"), + http.MethodPost, "/v2/user/createWithArray", CreateUsersWithArrayInput, }, { "CreateUsersWithListInput", - strings.ToUpper("Post"), + http.MethodPost, "/v2/user/createWithList", CreateUsersWithListInput, }, { "DeleteUser", - strings.ToUpper("Delete"), + http.MethodDelete, "/v2/user/:username", DeleteUser, }, { "GetUserByName", - strings.ToUpper("Get"), + http.MethodGet, "/v2/user/:username", GetUserByName, }, { "LoginUser", - strings.ToUpper("Get"), + http.MethodGet, "/v2/user/login", LoginUser, }, { "LogoutUser", - strings.ToUpper("Get"), + http.MethodGet, "/v2/user/logout", LogoutUser, }, { "UpdateUser", - strings.ToUpper("Put"), + http.MethodPut, "/v2/user/:username", UpdateUser, }, diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index 06b5019af3..0e97bd19ef 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.1.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/build.gradle.kts b/samples/openapi3/server/petstore/kotlin-springboot-reactive/build.gradle.kts index f62d3f33c8..f4561be14b 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/build.gradle.kts +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/build.gradle.kts @@ -43,9 +43,11 @@ dependencies { compile("com.fasterxml.jackson.dataformat:jackson-dataformat-xml") compile("com.fasterxml.jackson.module:jackson-module-kotlin") + testCompile("org.jetbrains.kotlin:kotlin-test-junit5") testCompile("org.springframework.boot:spring-boot-starter-test") { exclude(module = "junit") } + testCompile("org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion") } repositories { diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml b/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml index 1932017d4b..b0a954d470 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml @@ -96,6 +96,12 @@ swagger-annotations 1.5.21 + + + com.google.code.findbugs + jsr305 + 3.0.2 + com.fasterxml.jackson.dataformat jackson-dataformat-yaml @@ -117,6 +123,12 @@ javax.validation validation-api + + org.jetbrains.kotlin + kotlin-test-junit5 + 1.3.31 + test + diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt index 29de43b1a0..c0aeae1a41 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -45,142 +45,141 @@ import kotlin.collections.Map class PetApiController(@Autowired(required = true) val service: PetApiService) { @ApiOperation( - value = "Add a new pet to the store", - nickname = "addPet", - notes = "", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 405, message = "Invalid input")]) + value = [ApiResponse(code = 405, message = "Invalid input")]) @RequestMapping( - value = ["/pet"], - consumes = ["application/json", "application/xml"], - method = [RequestMethod.POST]) + value = ["/pet"], + consumes = ["application/json", "application/xml"], + method = [RequestMethod.POST]) suspend fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet ): ResponseEntity { - return ResponseEntity(service.addPet(pet), HttpStatus.OK) + return ResponseEntity(service.addPet(pet), HttpStatus.valueOf(405)) } @ApiOperation( - value = "Deletes a pet", - nickname = "deletePet", - notes = "", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 400, message = "Invalid pet value")]) + value = [ApiResponse(code = 400, message = "Invalid pet value")]) @RequestMapping( - value = ["/pet/{petId}"], - method = [RequestMethod.DELETE]) - suspend fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: String? + value = ["/pet/{petId}"], + method = [RequestMethod.DELETE]) + suspend fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: kotlin.String? ): ResponseEntity { - return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.OK) + return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.valueOf(400)) } @ApiOperation( - value = "Finds Pets by status", - nickname = "findPetsByStatus", - notes = "Multiple status values can be provided with comma separated strings", - response = Pet::class, - responseContainer = "List", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet::class, + responseContainer = "List", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")]) + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")]) @RequestMapping( - value = ["/pet/findByStatus"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) - fun 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) status: List + value = ["/pet/findByStatus"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + fun 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) status: kotlin.collections.List ): ResponseEntity> { - return ResponseEntity(service.findPetsByStatus(status), HttpStatus.OK) + return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Finds Pets by tags", - nickname = "findPetsByTags", - notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - response = Pet::class, - responseContainer = "List", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet::class, + responseContainer = "List", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) @RequestMapping( - value = ["/pet/findByTags"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) - fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: List -,@ApiParam(value = "Maximum number of items to return") @Valid @RequestParam(value = "maxCount", required = false) maxCount: Int? + value = ["/pet/findByTags"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List ): ResponseEntity> { - return ResponseEntity(service.findPetsByTags(tags, maxCount), HttpStatus.OK) + return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Find pet by ID", - nickname = "getPetById", - notes = "Returns a single pet", - response = Pet::class, - authorizations = [Authorization(value = "api_key")]) + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet::class, + authorizations = [Authorization(value = "api_key")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")]) + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")]) @RequestMapping( - value = ["/pet/{petId}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) - suspend fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: Long + value = ["/pet/{petId}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: kotlin.Long ): ResponseEntity { - return ResponseEntity(service.getPetById(petId), HttpStatus.OK) + return ResponseEntity(service.getPetById(petId), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Update an existing pet", - nickname = "updatePet", - notes = "", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")]) + value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")]) @RequestMapping( - value = ["/pet"], - consumes = ["application/json", "application/xml"], - method = [RequestMethod.PUT]) + value = ["/pet"], + consumes = ["application/json", "application/xml"], + method = [RequestMethod.PUT]) suspend fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet ): ResponseEntity { - return ResponseEntity(service.updatePet(pet), HttpStatus.OK) + return ResponseEntity(service.updatePet(pet), HttpStatus.valueOf(400)) } @ApiOperation( - value = "Updates a pet in the store with form data", - nickname = "updatePetWithForm", - notes = "", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 405, message = "Invalid input")]) + value = [ApiResponse(code = 405, message = "Invalid input")]) @RequestMapping( - value = ["/pet/{petId}"], - consumes = ["application/x-www-form-urlencoded"], - method = [RequestMethod.POST]) - suspend fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: String? -,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: String? + value = ["/pet/{petId}"], + consumes = ["application/x-www-form-urlencoded"], + method = [RequestMethod.POST]) + suspend fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: kotlin.String? +,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: kotlin.String? ): ResponseEntity { - return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.OK) + return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @ApiOperation( - value = "uploads an image", - nickname = "uploadFile", - notes = "", - response = ModelApiResponse::class, - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse::class, + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)]) + value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)]) @RequestMapping( - value = ["/pet/{petId}/uploadImage"], - produces = ["application/json"], - consumes = ["multipart/form-data"], - method = [RequestMethod.POST]) - suspend fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: Long -,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String? + value = ["/pet/{petId}/uploadImage"], + produces = ["application/json"], + consumes = ["multipart/form-data"], + method = [RequestMethod.POST]) + suspend fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: kotlin.Long +,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? ): ResponseEntity { - return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.OK) + return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt index 2bd53b2a56..033bd517c4 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -7,17 +7,17 @@ interface PetApiService { suspend fun addPet(pet: Pet): Unit - suspend fun deletePet(petId: Long, apiKey: String?): Unit + suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit - fun findPetsByStatus(status: List): Flow + fun findPetsByStatus(status: kotlin.collections.List): Flow - fun findPetsByTags(tags: List, maxCount: Int?): Flow + fun findPetsByTags(tags: kotlin.collections.List): Flow - suspend fun getPetById(petId: Long): Pet + suspend fun getPetById(petId: kotlin.Long): Pet suspend fun updatePet(pet: Pet): Unit - suspend fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit + suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit - suspend fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse + suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt index 009f039d86..e6db20b52c 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt @@ -11,19 +11,19 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override suspend fun deletePet(petId: Long, apiKey: String?): Unit { + override suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit { TODO("Implement me") } - override fun findPetsByStatus(status: List): Flow { + override fun findPetsByStatus(status: kotlin.collections.List): Flow { TODO("Implement me") } - override fun findPetsByTags(tags: List, maxCount: Int?): Flow { + override fun findPetsByTags(tags: kotlin.collections.List): Flow { TODO("Implement me") } - override suspend fun getPetById(petId: Long): Pet { + override suspend fun getPetById(petId: kotlin.Long): Pet { TODO("Implement me") } @@ -31,11 +31,11 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override suspend fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit { + override suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit { TODO("Implement me") } - override suspend fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse { + override suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse { TODO("Implement me") } } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt index 2ee42a7723..9bbe9fa466 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -44,66 +44,66 @@ import kotlin.collections.Map class StoreApiController(@Autowired(required = true) val service: StoreApiService) { @ApiOperation( - value = "Delete purchase order by ID", - nickname = "deleteOrder", - notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors") + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors") @ApiResponses( - value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) + value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) @RequestMapping( - value = ["/store/order/{orderId}"], - method = [RequestMethod.DELETE]) - suspend fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: String + value = ["/store/order/{orderId}"], + method = [RequestMethod.DELETE]) + suspend fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: kotlin.String ): ResponseEntity { - return ResponseEntity(service.deleteOrder(orderId), HttpStatus.OK) + return ResponseEntity(service.deleteOrder(orderId), HttpStatus.valueOf(400)) } @ApiOperation( - value = "Returns pet inventories by status", - nickname = "getInventory", - notes = "Returns a map of status codes to quantities", - response = Int::class, - responseContainer = "Map", - authorizations = [Authorization(value = "api_key")]) + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = kotlin.Int::class, + responseContainer = "Map", + authorizations = [Authorization(value = "api_key")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Map::class, responseContainer = "Map")]) + value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")]) @RequestMapping( - value = ["/store/inventory"], - produces = ["application/json"], - method = [RequestMethod.GET]) - suspend fun getInventory(): ResponseEntity> { - return ResponseEntity(service.getInventory(), HttpStatus.OK) + value = ["/store/inventory"], + produces = ["application/json"], + method = [RequestMethod.GET]) + suspend fun getInventory(): ResponseEntity> { + return ResponseEntity(service.getInventory(), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Find purchase order by ID", - nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - response = Order::class) + value = "Find purchase order by ID", + nickname = "getOrderById", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + response = Order::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) + value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) @RequestMapping( - value = ["/store/order/{orderId}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) - suspend fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: Long + value = ["/store/order/{orderId}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: kotlin.Long ): ResponseEntity { - return ResponseEntity(service.getOrderById(orderId), HttpStatus.OK) + return ResponseEntity(service.getOrderById(orderId), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Place an order for a pet", - nickname = "placeOrder", - notes = "", - response = Order::class) + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid Order")]) + value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid Order")]) @RequestMapping( - value = ["/store/order"], - produces = ["application/xml", "application/json"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + value = ["/store/order"], + produces = ["application/xml", "application/json"], + consumes = ["application/json"], + method = [RequestMethod.POST]) suspend fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody order: Order ): ResponseEntity { - return ResponseEntity(service.placeOrder(order), HttpStatus.OK) + return ResponseEntity(service.placeOrder(order), HttpStatus.valueOf(200)) } } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt index 84dc283705..89393699d3 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -4,11 +4,11 @@ import org.openapitools.model.Order import kotlinx.coroutines.flow.Flow; interface StoreApiService { - suspend fun deleteOrder(orderId: String): Unit + suspend fun deleteOrder(orderId: kotlin.String): Unit - suspend fun getInventory(): Map + suspend fun getInventory(): Map - suspend fun getOrderById(orderId: Long): Order + suspend fun getOrderById(orderId: kotlin.Long): Order suspend fun placeOrder(order: Order): Order } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt index f29e7e08c2..52fc3ff57c 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiServiceImpl.kt @@ -6,15 +6,15 @@ import org.springframework.stereotype.Service @Service class StoreApiServiceImpl : StoreApiService { - override suspend fun deleteOrder(orderId: String): Unit { + override suspend fun deleteOrder(orderId: kotlin.String): Unit { TODO("Implement me") } - override suspend fun getInventory(): Map { + override suspend fun getInventory(): Map { TODO("Implement me") } - override suspend fun getOrderById(orderId: Long): Order { + override suspend fun getOrderById(orderId: kotlin.Long): Order { TODO("Implement me") } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt index 1aed45eebd..0a0c2492d3 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -44,129 +44,129 @@ import kotlin.collections.Map class UserApiController(@Autowired(required = true) val service: UserApiService) { @ApiOperation( - value = "Create user", - nickname = "createUser", - notes = "This can only be done by the logged in user.", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user.", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation")]) + value = [ApiResponse(code = 200, message = "successful operation")]) @RequestMapping( - value = ["/user"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + value = ["/user"], + consumes = ["application/json"], + method = [RequestMethod.POST]) suspend fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody user: User ): ResponseEntity { - return ResponseEntity(service.createUser(user), HttpStatus.OK) + return ResponseEntity(service.createUser(user), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Creates list of users with given input array", - nickname = "createUsersWithArrayInput", - notes = "", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation")]) + value = [ApiResponse(code = 200, message = "successful operation")]) @RequestMapping( - value = ["/user/createWithArray"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + value = ["/user/createWithArray"], + consumes = ["application/json"], + method = [RequestMethod.POST]) suspend fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: Flow ): ResponseEntity { - return ResponseEntity(service.createUsersWithArrayInput(user), HttpStatus.OK) + return ResponseEntity(service.createUsersWithArrayInput(user), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Creates list of users with given input array", - nickname = "createUsersWithListInput", - notes = "", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation")]) + value = [ApiResponse(code = 200, message = "successful operation")]) @RequestMapping( - value = ["/user/createWithList"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + value = ["/user/createWithList"], + consumes = ["application/json"], + method = [RequestMethod.POST]) suspend fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: Flow ): ResponseEntity { - return ResponseEntity(service.createUsersWithListInput(user), HttpStatus.OK) + return ResponseEntity(service.createUsersWithListInput(user), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Delete user", - nickname = "deleteUser", - notes = "This can only be done by the logged in user.", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user.", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) + value = [ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) @RequestMapping( - value = ["/user/{username}"], - method = [RequestMethod.DELETE]) - suspend fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: String + value = ["/user/{username}"], + method = [RequestMethod.DELETE]) + suspend fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { - return ResponseEntity(service.deleteUser(username), HttpStatus.OK) + return ResponseEntity(service.deleteUser(username), HttpStatus.valueOf(400)) } @ApiOperation( - value = "Get user by user name", - nickname = "getUserByName", - notes = "", - response = User::class) + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = User::class),ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) + value = [ApiResponse(code = 200, message = "successful operation", response = User::class),ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) @RequestMapping( - value = ["/user/{username}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) - suspend fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: String + value = ["/user/{username}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { - return ResponseEntity(service.getUserByName(username), HttpStatus.OK) + return ResponseEntity(service.getUserByName(username), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Logs user into the system", - nickname = "loginUser", - notes = "", - response = String::class) + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = kotlin.String::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) + value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) @RequestMapping( - value = ["/user/login"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) - suspend fun loginUser(@NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: String -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: String -): ResponseEntity { - return ResponseEntity(service.loginUser(username, password), HttpStatus.OK) + value = ["/user/login"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) + suspend fun loginUser(@NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: kotlin.String +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: kotlin.String +): ResponseEntity { + return ResponseEntity(service.loginUser(username, password), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Logs out current logged in user session", - nickname = "logoutUser", - notes = "", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation")]) + value = [ApiResponse(code = 200, message = "successful operation")]) @RequestMapping( - value = ["/user/logout"], - method = [RequestMethod.GET]) + value = ["/user/logout"], + method = [RequestMethod.GET]) suspend fun logoutUser(): ResponseEntity { - return ResponseEntity(service.logoutUser(), HttpStatus.OK) + return ResponseEntity(service.logoutUser(), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Updated user", - nickname = "updateUser", - notes = "This can only be done by the logged in user.", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user.", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 400, message = "Invalid user supplied"),ApiResponse(code = 404, message = "User not found")]) + value = [ApiResponse(code = 400, message = "Invalid user supplied"),ApiResponse(code = 404, message = "User not found")]) @RequestMapping( - value = ["/user/{username}"], - consumes = ["application/json"], - method = [RequestMethod.PUT]) - suspend fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: String + value = ["/user/{username}"], + consumes = ["application/json"], + method = [RequestMethod.PUT]) + suspend fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: kotlin.String ,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody user: User ): ResponseEntity { - return ResponseEntity(service.updateUser(username, user), HttpStatus.OK) + return ResponseEntity(service.updateUser(username, user), HttpStatus.valueOf(400)) } } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt index 999ae4f407..43dd4b0a38 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiService.kt @@ -10,13 +10,13 @@ interface UserApiService { suspend fun createUsersWithListInput(user: Flow): Unit - suspend fun deleteUser(username: String): Unit + suspend fun deleteUser(username: kotlin.String): Unit - suspend fun getUserByName(username: String): User + suspend fun getUserByName(username: kotlin.String): User - suspend fun loginUser(username: String, password: String): String + suspend fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String suspend fun logoutUser(): Unit - suspend fun updateUser(username: String, user: User): Unit + suspend fun updateUser(username: kotlin.String, user: User): Unit } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt index 8872d309e4..251bd92774 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt @@ -18,15 +18,15 @@ class UserApiServiceImpl : UserApiService { TODO("Implement me") } - override suspend fun deleteUser(username: String): Unit { + override suspend fun deleteUser(username: kotlin.String): Unit { TODO("Implement me") } - override suspend fun getUserByName(username: String): User { + override suspend fun getUserByName(username: kotlin.String): User { TODO("Implement me") } - override suspend fun loginUser(username: String, password: String): String { + override suspend fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String { TODO("Implement me") } @@ -34,7 +34,7 @@ class UserApiServiceImpl : UserApiService { TODO("Implement me") } - override suspend fun updateUser(username: String, user: User): Unit { + override suspend fun updateUser(username: kotlin.String, user: User): Unit { TODO("Implement me") } } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt index e042a7f997..4be27d1974 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt @@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty data class Category ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: String? = null + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt index e998bc995c..ee034530c6 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt @@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty data class InlineObject ( @ApiModelProperty(example = "null", value = "Updated name of the pet") - @JsonProperty("name") val name: String? = null, + @JsonProperty("name") val name: kotlin.String? = null, @ApiModelProperty(example = "null", value = "Updated status of the pet") - @JsonProperty("status") val status: String? = null + @JsonProperty("status") val status: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt index d29578fd0c..a289d8c05f 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt @@ -19,7 +19,7 @@ import io.swagger.annotations.ApiModelProperty data class InlineObject1 ( @ApiModelProperty(example = "null", value = "Additional data to pass to server") - @JsonProperty("additionalMetadata") val additionalMetadata: String? = null, + @JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null, @ApiModelProperty(example = "null", value = "file to upload") @JsonProperty("file") val file: org.springframework.core.io.Resource? = null diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 2f844a9c35..0e86b28e93 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -20,13 +20,13 @@ import io.swagger.annotations.ApiModelProperty data class ModelApiResponse ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("code") val code: Int? = null, + @JsonProperty("code") val code: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("type") val type: String? = null, + @JsonProperty("type") val type: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("message") val message: String? = null + @JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index e20d850491..08726893f7 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -24,13 +24,13 @@ import io.swagger.annotations.ApiModelProperty data class Order ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("petId") val petId: Long? = null, + @JsonProperty("petId") val petId: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("quantity") val quantity: Int? = null, + @JsonProperty("quantity") val quantity: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, @@ -39,14 +39,14 @@ data class Order ( @JsonProperty("status") val status: Order.Status? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("complete") val complete: Boolean? = null + @JsonProperty("complete") val complete: kotlin.Boolean? = null ) { /** * Order Status * Values: placed,approved,delivered */ - enum class Status(val value: String) { + enum class Status(val value: kotlin.String) { @JsonProperty("placed") placed("placed"), diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index 9e054ac22f..4a2e9d26cb 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -27,20 +27,20 @@ data class Pet ( @get:NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty("name") val name: String, + @JsonProperty("name") val name: kotlin.String, @get:NotNull @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("photoUrls") val photoUrls: List, + @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") @JsonProperty("category") val category: Category? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") val tags: List? = null, + @JsonProperty("tags") val tags: kotlin.collections.List? = null, @ApiModelProperty(example = "null", value = "pet status in the store") @JsonProperty("status") val status: Pet.Status? = null @@ -50,7 +50,7 @@ data class Pet ( * pet status in the store * Values: available,pending,sold */ - enum class Status(val value: String) { + enum class Status(val value: kotlin.String) { @JsonProperty("available") available("available"), diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt index 40ef1b9a86..df04dcd035 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt @@ -19,10 +19,10 @@ import io.swagger.annotations.ApiModelProperty data class Tag ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: String? = null + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt index 95fe12aa46..619b2e7c2c 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt @@ -25,28 +25,28 @@ import io.swagger.annotations.ApiModelProperty data class User ( @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: Long? = null, + @JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("username") val username: String? = null, + @JsonProperty("username") val username: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("firstName") val firstName: String? = null, + @JsonProperty("firstName") val firstName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("lastName") val lastName: String? = null, + @JsonProperty("lastName") val lastName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("email") val email: String? = null, + @JsonProperty("email") val email: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("password") val password: String? = null, + @JsonProperty("password") val password: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @JsonProperty("phone") val phone: String? = null, + @JsonProperty("phone") val phone: kotlin.String? = null, @ApiModelProperty(example = "null", value = "User Status") - @JsonProperty("userStatus") val userStatus: Int? = null + @JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION index 06b5019af3..0e97bd19ef 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.1.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/kotlin-springboot/pom.xml b/samples/openapi3/server/petstore/kotlin-springboot/pom.xml index 10720393bf..38491e8939 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/pom.xml +++ b/samples/openapi3/server/petstore/kotlin-springboot/pom.xml @@ -86,6 +86,12 @@ swagger-annotations 1.5.21 + + + com.google.code.findbugs + jsr305 + 3.0.2 + com.fasterxml.jackson.dataformat jackson-dataformat-yaml diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt index 7b397708c7..4a111fdb7f 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -44,142 +44,141 @@ import kotlin.collections.Map class PetApiController(@Autowired(required = true) val service: PetApiService) { @ApiOperation( - value = "Add a new pet to the store", - nickname = "addPet", - notes = "", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 405, message = "Invalid input")]) + value = [ApiResponse(code = 405, message = "Invalid input")]) @RequestMapping( - value = ["/pet"], - consumes = ["application/json", "application/xml"], - method = [RequestMethod.POST]) + value = ["/pet"], + consumes = ["application/json", "application/xml"], + method = [RequestMethod.POST]) fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet ): ResponseEntity { - return ResponseEntity(service.addPet(pet), HttpStatus.OK) + return ResponseEntity(service.addPet(pet), HttpStatus.valueOf(405)) } @ApiOperation( - value = "Deletes a pet", - nickname = "deletePet", - notes = "", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 400, message = "Invalid pet value")]) + value = [ApiResponse(code = 400, message = "Invalid pet value")]) @RequestMapping( - value = ["/pet/{petId}"], - method = [RequestMethod.DELETE]) + value = ["/pet/{petId}"], + method = [RequestMethod.DELETE]) fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: kotlin.String? ): ResponseEntity { - return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.OK) + return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.valueOf(400)) } @ApiOperation( - value = "Finds Pets by status", - nickname = "findPetsByStatus", - notes = "Multiple status values can be provided with comma separated strings", - response = Pet::class, - responseContainer = "List", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet::class, + responseContainer = "List", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")]) + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")]) @RequestMapping( - value = ["/pet/findByStatus"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + value = ["/pet/findByStatus"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) fun 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) status: kotlin.collections.List ): ResponseEntity> { - return ResponseEntity(service.findPetsByStatus(status), HttpStatus.OK) + return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Finds Pets by tags", - nickname = "findPetsByTags", - notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - response = Pet::class, - responseContainer = "List", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet::class, + responseContainer = "List", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) @RequestMapping( - value = ["/pet/findByTags"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + value = ["/pet/findByTags"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List -,@ApiParam(value = "Maximum number of items to return") @Valid @RequestParam(value = "maxCount", required = false) maxCount: kotlin.Int? ): ResponseEntity> { - return ResponseEntity(service.findPetsByTags(tags, maxCount), HttpStatus.OK) + return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Find pet by ID", - nickname = "getPetById", - notes = "Returns a single pet", - response = Pet::class, - authorizations = [Authorization(value = "api_key")]) + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet::class, + authorizations = [Authorization(value = "api_key")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")]) + value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")]) @RequestMapping( - value = ["/pet/{petId}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + value = ["/pet/{petId}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: kotlin.Long ): ResponseEntity { - return ResponseEntity(service.getPetById(petId), HttpStatus.OK) + return ResponseEntity(service.getPetById(petId), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Update an existing pet", - nickname = "updatePet", - notes = "", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")]) + value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")]) @RequestMapping( - value = ["/pet"], - consumes = ["application/json", "application/xml"], - method = [RequestMethod.PUT]) + value = ["/pet"], + consumes = ["application/json", "application/xml"], + method = [RequestMethod.PUT]) fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet ): ResponseEntity { - return ResponseEntity(service.updatePet(pet), HttpStatus.OK) + return ResponseEntity(service.updatePet(pet), HttpStatus.valueOf(400)) } @ApiOperation( - value = "Updates a pet in the store with form data", - nickname = "updatePetWithForm", - notes = "", - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 405, message = "Invalid input")]) + value = [ApiResponse(code = 405, message = "Invalid input")]) @RequestMapping( - value = ["/pet/{petId}"], - consumes = ["application/x-www-form-urlencoded"], - method = [RequestMethod.POST]) + value = ["/pet/{petId}"], + consumes = ["application/x-www-form-urlencoded"], + method = [RequestMethod.POST]) fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: kotlin.String? ,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: kotlin.String? ): ResponseEntity { - return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.OK) + return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @ApiOperation( - value = "uploads an image", - nickname = "uploadFile", - notes = "", - response = ModelApiResponse::class, - authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse::class, + authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)]) + value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)]) @RequestMapping( - value = ["/pet/{petId}/uploadImage"], - produces = ["application/json"], - consumes = ["multipart/form-data"], - method = [RequestMethod.POST]) + value = ["/pet/{petId}/uploadImage"], + produces = ["application/json"], + consumes = ["multipart/form-data"], + method = [RequestMethod.POST]) fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? ): ResponseEntity { - return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.OK) + return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt index 89bae4c1ce..364f027cf8 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -10,7 +10,7 @@ interface PetApiService { fun findPetsByStatus(status: kotlin.collections.List): List - fun findPetsByTags(tags: kotlin.collections.List, maxCount: kotlin.Int?): List + fun findPetsByTags(tags: kotlin.collections.List): List fun getPetById(petId: kotlin.Long): Pet diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt index 26900dc599..a4e09c0f15 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt @@ -18,7 +18,7 @@ class PetApiServiceImpl : PetApiService { TODO("Implement me") } - override fun findPetsByTags(tags: kotlin.collections.List, maxCount: kotlin.Int?): List { + override fun findPetsByTags(tags: kotlin.collections.List): List { TODO("Implement me") } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt index 16104fb0d2..435631042e 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -43,66 +43,66 @@ import kotlin.collections.Map class StoreApiController(@Autowired(required = true) val service: StoreApiService) { @ApiOperation( - value = "Delete purchase order by ID", - nickname = "deleteOrder", - notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors") + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors") @ApiResponses( - value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) + value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) @RequestMapping( - value = ["/store/order/{orderId}"], - method = [RequestMethod.DELETE]) + value = ["/store/order/{orderId}"], + method = [RequestMethod.DELETE]) fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: kotlin.String ): ResponseEntity { - return ResponseEntity(service.deleteOrder(orderId), HttpStatus.OK) + return ResponseEntity(service.deleteOrder(orderId), HttpStatus.valueOf(400)) } @ApiOperation( - value = "Returns pet inventories by status", - nickname = "getInventory", - notes = "Returns a map of status codes to quantities", - response = kotlin.Int::class, - responseContainer = "Map", - authorizations = [Authorization(value = "api_key")]) + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = kotlin.Int::class, + responseContainer = "Map", + authorizations = [Authorization(value = "api_key")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")]) + value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")]) @RequestMapping( - value = ["/store/inventory"], - produces = ["application/json"], - method = [RequestMethod.GET]) + value = ["/store/inventory"], + produces = ["application/json"], + method = [RequestMethod.GET]) fun getInventory(): ResponseEntity> { - return ResponseEntity(service.getInventory(), HttpStatus.OK) + return ResponseEntity(service.getInventory(), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Find purchase order by ID", - nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - response = Order::class) + value = "Find purchase order by ID", + nickname = "getOrderById", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + response = Order::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) + value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) @RequestMapping( - value = ["/store/order/{orderId}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + value = ["/store/order/{orderId}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: kotlin.Long ): ResponseEntity { - return ResponseEntity(service.getOrderById(orderId), HttpStatus.OK) + return ResponseEntity(service.getOrderById(orderId), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Place an order for a pet", - nickname = "placeOrder", - notes = "", - response = Order::class) + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid Order")]) + value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid Order")]) @RequestMapping( - value = ["/store/order"], - produces = ["application/xml", "application/json"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + value = ["/store/order"], + produces = ["application/xml", "application/json"], + consumes = ["application/json"], + method = [RequestMethod.POST]) fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody order: Order ): ResponseEntity { - return ResponseEntity(service.placeOrder(order), HttpStatus.OK) + return ResponseEntity(service.placeOrder(order), HttpStatus.valueOf(200)) } } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt index bd7583274b..f1f7d6eba4 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -43,129 +43,129 @@ import kotlin.collections.Map class UserApiController(@Autowired(required = true) val service: UserApiService) { @ApiOperation( - value = "Create user", - nickname = "createUser", - notes = "This can only be done by the logged in user.", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user.", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation")]) + value = [ApiResponse(code = 200, message = "successful operation")]) @RequestMapping( - value = ["/user"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + value = ["/user"], + consumes = ["application/json"], + method = [RequestMethod.POST]) fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody user: User ): ResponseEntity { - return ResponseEntity(service.createUser(user), HttpStatus.OK) + return ResponseEntity(service.createUser(user), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Creates list of users with given input array", - nickname = "createUsersWithArrayInput", - notes = "", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation")]) + value = [ApiResponse(code = 200, message = "successful operation")]) @RequestMapping( - value = ["/user/createWithArray"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + value = ["/user/createWithArray"], + consumes = ["application/json"], + method = [RequestMethod.POST]) fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: kotlin.collections.List ): ResponseEntity { - return ResponseEntity(service.createUsersWithArrayInput(user), HttpStatus.OK) + return ResponseEntity(service.createUsersWithArrayInput(user), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Creates list of users with given input array", - nickname = "createUsersWithListInput", - notes = "", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation")]) + value = [ApiResponse(code = 200, message = "successful operation")]) @RequestMapping( - value = ["/user/createWithList"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + value = ["/user/createWithList"], + consumes = ["application/json"], + method = [RequestMethod.POST]) fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: kotlin.collections.List ): ResponseEntity { - return ResponseEntity(service.createUsersWithListInput(user), HttpStatus.OK) + return ResponseEntity(service.createUsersWithListInput(user), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Delete user", - nickname = "deleteUser", - notes = "This can only be done by the logged in user.", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user.", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) + value = [ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) @RequestMapping( - value = ["/user/{username}"], - method = [RequestMethod.DELETE]) + value = ["/user/{username}"], + method = [RequestMethod.DELETE]) fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { - return ResponseEntity(service.deleteUser(username), HttpStatus.OK) + return ResponseEntity(service.deleteUser(username), HttpStatus.valueOf(400)) } @ApiOperation( - value = "Get user by user name", - nickname = "getUserByName", - notes = "", - response = User::class) + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = User::class),ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) + value = [ApiResponse(code = 200, message = "successful operation", response = User::class),ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) @RequestMapping( - value = ["/user/{username}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + value = ["/user/{username}"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { - return ResponseEntity(service.getUserByName(username), HttpStatus.OK) + return ResponseEntity(service.getUserByName(username), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Logs user into the system", - nickname = "loginUser", - notes = "", - response = kotlin.String::class) + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = kotlin.String::class) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) + value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) @RequestMapping( - value = ["/user/login"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + value = ["/user/login"], + produces = ["application/xml", "application/json"], + method = [RequestMethod.GET]) fun loginUser(@NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: kotlin.String ,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: kotlin.String ): ResponseEntity { - return ResponseEntity(service.loginUser(username, password), HttpStatus.OK) + return ResponseEntity(service.loginUser(username, password), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Logs out current logged in user session", - nickname = "logoutUser", - notes = "", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 200, message = "successful operation")]) + value = [ApiResponse(code = 200, message = "successful operation")]) @RequestMapping( - value = ["/user/logout"], - method = [RequestMethod.GET]) + value = ["/user/logout"], + method = [RequestMethod.GET]) fun logoutUser(): ResponseEntity { - return ResponseEntity(service.logoutUser(), HttpStatus.OK) + return ResponseEntity(service.logoutUser(), HttpStatus.valueOf(200)) } @ApiOperation( - value = "Updated user", - nickname = "updateUser", - notes = "This can only be done by the logged in user.", - authorizations = [Authorization(value = "auth_cookie")]) + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user.", + authorizations = [Authorization(value = "auth_cookie")]) @ApiResponses( - value = [ApiResponse(code = 400, message = "Invalid user supplied"),ApiResponse(code = 404, message = "User not found")]) + value = [ApiResponse(code = 400, message = "Invalid user supplied"),ApiResponse(code = 404, message = "User not found")]) @RequestMapping( - value = ["/user/{username}"], - consumes = ["application/json"], - method = [RequestMethod.PUT]) + value = ["/user/{username}"], + consumes = ["application/json"], + method = [RequestMethod.PUT]) fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: kotlin.String ,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody user: User ): ResponseEntity { - return ResponseEntity(service.updateUser(username, user), HttpStatus.OK) + return ResponseEntity(service.updateUser(username, user), HttpStatus.valueOf(400)) } } diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION index 0e97bd19ef..c3a2c7076f 100644 --- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-api-server/.openapi-generator/VERSION index 0e97bd19ef..c3a2c7076f 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-api-server/go/README.md b/samples/server/petstore/go-api-server/go/README.md deleted file mode 100644 index fbcf4ae661..0000000000 --- a/samples/server/petstore/go-api-server/go/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Go API Server for petstoreserver - -This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - -## Overview -This server was generated by the [openapi-generator] -(https://openapi-generator.tech) project. -By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. -- - -To see how to make this your own, look here: - -[README](https://openapi-generator.tech) - -- API version: 1.0.0 - - -### Running the server -To run the server, follow these simple steps: - -``` -go run main.go -``` - -To run the server in a docker container -``` -docker build --network=host -t petstoreserver . -``` - -Once image is built use -``` -docker run --rm -it petstoreserver -``` - - diff --git a/samples/server/petstore/go-api-server/go/model_inline_object.go b/samples/server/petstore/go-api-server/go/model_inline_object.go deleted file mode 100644 index ee13c18c29..0000000000 --- a/samples/server/petstore/go-api-server/go/model_inline_object.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * OpenAPI Petstore - * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type InlineObject struct { - - // Updated name of the pet - Name string `json:"name,omitempty"` - - // Updated status of the pet - Status string `json:"status,omitempty"` -} diff --git a/samples/server/petstore/go-api-server/go/model_inline_object_1.go b/samples/server/petstore/go-api-server/go/model_inline_object_1.go deleted file mode 100644 index a41e0bff7d..0000000000 --- a/samples/server/petstore/go-api-server/go/model_inline_object_1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * OpenAPI Petstore - * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "os" -) - -type InlineObject1 struct { - - // Additional data to pass to server - AdditionalMetadata string `json:"additionalMetadata,omitempty"` - - // file to upload - File **os.File `json:"file,omitempty"` -} diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiController.java index 1344ffe7af..ef66614c27 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiController.java @@ -17,6 +17,9 @@ import java.io.File; import openapitools.OpenAPIUtils; import com.fasterxml.jackson.core.type.TypeReference; +import java.util.concurrent.CompletionStage; +import java.util.concurrent.CompletableFuture; + import javax.validation.constraints.*; import play.Configuration; @@ -38,7 +41,7 @@ public class PetApiController extends Controller { @ApiAction - public Result addPet() throws Exception { + public CompletionStage addPet() throws Exception { JsonNode nodebody = request().body().asJson(); Pet body; if (nodebody != null) { @@ -49,12 +52,14 @@ public class PetApiController extends Controller { } else { throw new IllegalArgumentException("'body' parameter is required"); } - imp.addPet(body); - return ok(); + return CompletableFuture.supplyAsync(() -> { + imp.addPet(body) + return ok(); + }); } @ApiAction - public Result deletePet(Long petId) throws Exception { + public CompletionStage deletePet(Long petId) throws Exception { String valueapiKey = request().getHeader("api_key"); String apiKey; if (valueapiKey != null) { @@ -62,12 +67,14 @@ public class PetApiController extends Controller { } else { apiKey = null; } - imp.deletePet(petId, apiKey); - return ok(); + return CompletableFuture.supplyAsync(() -> { + imp.deletePet(petId, apiKey) + return ok(); + }); } @ApiAction - public Result findPetsByStatus() throws Exception { + public CompletionStage findPetsByStatus() throws Exception { String[] statusArray = request().queryString().get("status"); if (statusArray == null) { throw new IllegalArgumentException("'status' parameter is required"); @@ -80,18 +87,22 @@ public class PetApiController extends Controller { status.add(curParam); } } - List obj = imp.findPetsByStatus(status); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + CompletionStage> stage = imp.findPetsByStatus(status).thenApply(obj -> { + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } - JsonNode result = mapper.valueToTree(obj); - return ok(result); + return obj; + }); + stage.thenApply(obj -> { + JsonNode result = mapper.valueToTree(obj); + return ok(result); + }); } @ApiAction - public Result findPetsByTags() throws Exception { + public CompletionStage findPetsByTags() throws Exception { String[] tagsArray = request().queryString().get("tags"); if (tagsArray == null) { throw new IllegalArgumentException("'tags' parameter is required"); @@ -104,28 +115,36 @@ public class PetApiController extends Controller { tags.add(curParam); } } - List obj = imp.findPetsByTags(tags); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + CompletionStage> stage = imp.findPetsByTags(tags).thenApply(obj -> { + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } - JsonNode result = mapper.valueToTree(obj); - return ok(result); + return obj; + }); + stage.thenApply(obj -> { + JsonNode result = mapper.valueToTree(obj); + return ok(result); + }); } @ApiAction - public Result getPetById(Long petId) throws Exception { - Pet obj = imp.getPetById(petId); - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - JsonNode result = mapper.valueToTree(obj); - return ok(result); + public CompletionStage getPetById(Long petId) throws Exception { + CompletionStage stage = imp.getPetById(petId).thenApply(obj -> { + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + return obj; + }); + stage.thenApply(obj -> { + JsonNode result = mapper.valueToTree(obj); + return ok(result); + }); } @ApiAction - public Result updatePet() throws Exception { + public CompletionStage updatePet() throws Exception { JsonNode nodebody = request().body().asJson(); Pet body; if (nodebody != null) { @@ -136,12 +155,14 @@ public class PetApiController extends Controller { } else { throw new IllegalArgumentException("'body' parameter is required"); } - imp.updatePet(body); - return ok(); + return CompletableFuture.supplyAsync(() -> { + imp.updatePet(body) + return ok(); + }); } @ApiAction - public Result updatePetWithForm(Long petId) throws Exception { + public CompletionStage updatePetWithForm(Long petId) throws Exception { String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; String name; if (valuename != null) { @@ -156,12 +177,14 @@ public class PetApiController extends Controller { } else { status = null; } - imp.updatePetWithForm(petId, name, status); - return ok(); + return CompletableFuture.supplyAsync(() -> { + imp.updatePetWithForm(petId, name, status) + return ok(); + }); } @ApiAction - public Result uploadFile(Long petId) throws Exception { + public CompletionStage uploadFile(Long petId) throws Exception { String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; String additionalMetadata; if (valueadditionalMetadata != null) { @@ -170,11 +193,15 @@ public class PetApiController extends Controller { additionalMetadata = null; } Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file"); - ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file); - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - JsonNode result = mapper.valueToTree(obj); - return ok(result); + CompletionStage stage = imp.uploadFile(petId, additionalMetadata, file).thenApply(obj -> { + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + return obj; + }); + stage.thenApply(obj -> { + JsonNode result = mapper.valueToTree(obj); + return ok(result); + }); } } diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImp.java index c025993f7c..550cb37143 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImp.java @@ -23,21 +23,27 @@ public class PetApiControllerImp implements PetApiControllerImpInterface { } @Override - public List findPetsByStatus( @NotNull List status) throws Exception { + public CompletionStage> findPetsByStatus( @NotNull List status) throws Exception { //Do your magic!!! - return new ArrayList(); + return CompletableFuture.supplyAsync(() -> { + return new ArrayList(); + }); } @Override - public List findPetsByTags( @NotNull List tags) throws Exception { + public CompletionStage> findPetsByTags( @NotNull List tags) throws Exception { //Do your magic!!! - return new ArrayList(); + return CompletableFuture.supplyAsync(() -> { + return new ArrayList(); + }); } @Override - public Pet getPetById(Long petId) throws Exception { + public CompletionStage getPetById(Long petId) throws Exception { //Do your magic!!! - return new Pet(); + return CompletableFuture.supplyAsync(() -> { + return new Pet(); + }); } @Override @@ -51,9 +57,11 @@ public class PetApiControllerImp implements PetApiControllerImpInterface { } @Override - public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception { + public CompletionStage uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception { //Do your magic!!! - return new ModelApiResponse(); + return CompletableFuture.supplyAsync(() -> { + return new ModelApiResponse(); + }); } } diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java index 307c6c18cf..7e4026b84c 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java @@ -8,6 +8,8 @@ import play.mvc.Http; import java.util.List; import java.util.ArrayList; import java.util.HashMap; +import java.util.concurrent.CompletionStage; +import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; @@ -17,16 +19,16 @@ public interface PetApiControllerImpInterface { void deletePet(Long petId, String apiKey) throws Exception; - List findPetsByStatus( @NotNull List status) throws Exception; + CompletionStage> findPetsByStatus( @NotNull List status) throws Exception; - List findPetsByTags( @NotNull List tags) throws Exception; + CompletionStage> findPetsByTags( @NotNull List tags) throws Exception; - Pet getPetById(Long petId) throws Exception; + CompletionStage getPetById(Long petId) throws Exception; void updatePet(Pet body) throws Exception; void updatePetWithForm(Long petId, String name, String status) throws Exception; - ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception; + CompletionStage uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception; } diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiController.java index 831f15dfe3..257e0f0e33 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiController.java @@ -16,6 +16,9 @@ import java.io.File; import openapitools.OpenAPIUtils; import com.fasterxml.jackson.core.type.TypeReference; +import java.util.concurrent.CompletionStage; +import java.util.concurrent.CompletableFuture; + import javax.validation.constraints.*; import play.Configuration; @@ -37,30 +40,40 @@ public class StoreApiController extends Controller { @ApiAction - public Result deleteOrder(String orderId) throws Exception { - imp.deleteOrder(orderId); - return ok(); + public CompletionStage deleteOrder(String orderId) throws Exception { + return CompletableFuture.supplyAsync(() -> { + imp.deleteOrder(orderId) + return ok(); + }); } @ApiAction - public Result getInventory() throws Exception { - Map obj = imp.getInventory(); - JsonNode result = mapper.valueToTree(obj); - return ok(result); + public CompletionStage getInventory() throws Exception { + CompletionStage> stage = imp.getInventory().thenApply(obj -> { + return obj; + }); + stage.thenApply(obj -> { + JsonNode result = mapper.valueToTree(obj); + return ok(result); + }); } @ApiAction - public Result getOrderById( @Min(1) @Max(5)Long orderId) throws Exception { - Order obj = imp.getOrderById(orderId); - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - JsonNode result = mapper.valueToTree(obj); - return ok(result); + public CompletionStage getOrderById( @Min(1) @Max(5)Long orderId) throws Exception { + CompletionStage stage = imp.getOrderById(orderId).thenApply(obj -> { + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + return obj; + }); + stage.thenApply(obj -> { + JsonNode result = mapper.valueToTree(obj); + return ok(result); + }); } @ApiAction - public Result placeOrder() throws Exception { + public CompletionStage placeOrder() throws Exception { JsonNode nodebody = request().body().asJson(); Order body; if (nodebody != null) { @@ -71,11 +84,15 @@ public class StoreApiController extends Controller { } else { throw new IllegalArgumentException("'body' parameter is required"); } - Order obj = imp.placeOrder(body); - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - JsonNode result = mapper.valueToTree(obj); - return ok(result); + CompletionStage stage = imp.placeOrder(body).thenApply(obj -> { + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + return obj; + }); + stage.thenApply(obj -> { + JsonNode result = mapper.valueToTree(obj); + return ok(result); + }); } } diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImp.java index 7c57d3d096..2d7cea1cf0 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImp.java @@ -17,21 +17,27 @@ public class StoreApiControllerImp implements StoreApiControllerImpInterface { } @Override - public Map getInventory() throws Exception { + public CompletionStage> getInventory() throws Exception { //Do your magic!!! - return new HashMap(); + return CompletableFuture.supplyAsync(() -> { + return new HashMap(); + }); } @Override - public Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception { + public CompletionStage getOrderById( @Min(1) @Max(5)Long orderId) throws Exception { //Do your magic!!! - return new Order(); + return CompletableFuture.supplyAsync(() -> { + return new Order(); + }); } @Override - public Order placeOrder(Order body) throws Exception { + public CompletionStage placeOrder(Order body) throws Exception { //Do your magic!!! - return new Order(); + return CompletableFuture.supplyAsync(() -> { + return new Order(); + }); } } diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java index b42e4d6d3d..60022bb1d2 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java @@ -7,6 +7,8 @@ import play.mvc.Http; import java.util.List; import java.util.ArrayList; import java.util.HashMap; +import java.util.concurrent.CompletionStage; +import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; @@ -14,10 +16,10 @@ import javax.validation.constraints.*; public interface StoreApiControllerImpInterface { void deleteOrder(String orderId) throws Exception; - Map getInventory() throws Exception; + CompletionStage> getInventory() throws Exception; - Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception; + CompletionStage getOrderById( @Min(1) @Max(5)Long orderId) throws Exception; - Order placeOrder(Order body) throws Exception; + CompletionStage placeOrder(Order body) throws Exception; } diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java index aa3bbd80ba..d003410d26 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java @@ -16,6 +16,9 @@ import java.io.File; import openapitools.OpenAPIUtils; import com.fasterxml.jackson.core.type.TypeReference; +import java.util.concurrent.CompletionStage; +import java.util.concurrent.CompletableFuture; + import javax.validation.constraints.*; import play.Configuration; @@ -37,7 +40,7 @@ public class UserApiController extends Controller { @ApiAction - public Result createUser() throws Exception { + public CompletionStage createUser() throws Exception { JsonNode nodebody = request().body().asJson(); User body; if (nodebody != null) { @@ -48,12 +51,14 @@ public class UserApiController extends Controller { } else { throw new IllegalArgumentException("'body' parameter is required"); } - imp.createUser(body); - return ok(); + return CompletableFuture.supplyAsync(() -> { + imp.createUser(body) + return ok(); + }); } @ApiAction - public Result createUsersWithArrayInput() throws Exception { + public CompletionStage createUsersWithArrayInput() throws Exception { JsonNode nodebody = request().body().asJson(); List body; if (nodebody != null) { @@ -66,12 +71,14 @@ public class UserApiController extends Controller { } else { throw new IllegalArgumentException("'body' parameter is required"); } - imp.createUsersWithArrayInput(body); - return ok(); + return CompletableFuture.supplyAsync(() -> { + imp.createUsersWithArrayInput(body) + return ok(); + }); } @ApiAction - public Result createUsersWithListInput() throws Exception { + public CompletionStage createUsersWithListInput() throws Exception { JsonNode nodebody = request().body().asJson(); List body; if (nodebody != null) { @@ -84,28 +91,36 @@ public class UserApiController extends Controller { } else { throw new IllegalArgumentException("'body' parameter is required"); } - imp.createUsersWithListInput(body); - return ok(); + return CompletableFuture.supplyAsync(() -> { + imp.createUsersWithListInput(body) + return ok(); + }); } @ApiAction - public Result deleteUser(String username) throws Exception { - imp.deleteUser(username); - return ok(); + public CompletionStage deleteUser(String username) throws Exception { + return CompletableFuture.supplyAsync(() -> { + imp.deleteUser(username) + return ok(); + }); } @ApiAction - public Result getUserByName(String username) throws Exception { - User obj = imp.getUserByName(username); - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - JsonNode result = mapper.valueToTree(obj); - return ok(result); + public CompletionStage getUserByName(String username) throws Exception { + CompletionStage stage = imp.getUserByName(username).thenApply(obj -> { + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + return obj; + }); + stage.thenApply(obj -> { + JsonNode result = mapper.valueToTree(obj); + return ok(result); + }); } @ApiAction - public Result loginUser() throws Exception { + public CompletionStage loginUser() throws Exception { String valueusername = request().getQueryString("username"); String username; if (valueusername != null) { @@ -120,19 +135,25 @@ public class UserApiController extends Controller { } else { throw new IllegalArgumentException("'password' parameter is required"); } - String obj = imp.loginUser(username, password); - JsonNode result = mapper.valueToTree(obj); - return ok(result); + CompletionStage stage = imp.loginUser(username, password).thenApply(obj -> { + return obj; + }); + stage.thenApply(obj -> { + JsonNode result = mapper.valueToTree(obj); + return ok(result); + }); } @ApiAction - public Result logoutUser() throws Exception { - imp.logoutUser(); - return ok(); + public CompletionStage logoutUser() throws Exception { + return CompletableFuture.supplyAsync(() -> { + imp.logoutUser() + return ok(); + }); } @ApiAction - public Result updateUser(String username) throws Exception { + public CompletionStage updateUser(String username) throws Exception { JsonNode nodebody = request().body().asJson(); User body; if (nodebody != null) { @@ -143,7 +164,9 @@ public class UserApiController extends Controller { } else { throw new IllegalArgumentException("'body' parameter is required"); } - imp.updateUser(username, body); - return ok(); + return CompletableFuture.supplyAsync(() -> { + imp.updateUser(username, body) + return ok(); + }); } } diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java index 0ea7a808b9..fa6028517c 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java @@ -32,15 +32,19 @@ public class UserApiControllerImp implements UserApiControllerImpInterface { } @Override - public User getUserByName(String username) throws Exception { + public CompletionStage getUserByName(String username) throws Exception { //Do your magic!!! - return new User(); + return CompletableFuture.supplyAsync(() -> { + return new User(); + }); } @Override - public String loginUser( @NotNull String username, @NotNull String password) throws Exception { + public CompletionStage loginUser( @NotNull String username, @NotNull String password) throws Exception { //Do your magic!!! - return new String(); + return CompletableFuture.supplyAsync(() -> { + return new String(); + }); } @Override diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java index 1290c84835..09b1d5042f 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java @@ -7,6 +7,8 @@ import play.mvc.Http; import java.util.List; import java.util.ArrayList; import java.util.HashMap; +import java.util.concurrent.CompletionStage; +import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; @@ -20,9 +22,9 @@ public interface UserApiControllerImpInterface { void deleteUser(String username) throws Exception; - User getUserByName(String username) throws Exception; + CompletionStage getUserByName(String username) throws Exception; - String loginUser( @NotNull String username, @NotNull String password) throws Exception; + CompletionStage loginUser( @NotNull String username, @NotNull String password) throws Exception; void logoutUser() throws Exception; diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java index efb3cbcbfb..e3c3887af6 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java @@ -147,7 +147,7 @@ public class PetApi { }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) { + public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId, @FormParam(value = "name") String name, @FormParam(value = "status") String status) { return delegate.updatePetWithForm(petId, name, status, securityContext); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java index bb7cb6103c..92a1a7f0ba 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -62,7 +62,7 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body + public Response call123testSpecialTags(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.call123testSpecialTags(body, securityContext); 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 dcf098f961..5b12b7a16f 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 @@ -72,7 +72,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true) @NotNull @Valid XmlItem xmlItem + public Response createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @NotNull @Valid XmlItem xmlItem ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createXmlItem(xmlItem, securityContext); @@ -84,7 +84,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body + public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") Boolean body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterBooleanSerialize(body, securityContext); @@ -96,7 +96,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid OuterComposite body + public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid OuterComposite body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterCompositeSerialize(body, securityContext); @@ -108,7 +108,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) BigDecimal body + public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") BigDecimal body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterNumberSerialize(body, securityContext); @@ -120,7 +120,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) }) - public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) String body + public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") String body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterStringSerialize(body, securityContext); @@ -132,7 +132,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass body + public Response testBodyWithFileSchema(@ApiParam(value = "", required = true) @NotNull @Valid FileSchemaTestClass body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithFileSchema(body, securityContext); @@ -144,8 +144,8 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithQueryParams(@ApiParam(value = "",required=true)@QueryParam("query") String query -,@ApiParam(value = "" ,required=true) @NotNull @Valid User body + public Response testBodyWithQueryParams(@ApiParam(value = "", required = true) @QueryParam("query") @NotNull String query +,@ApiParam(value = "", required = true) @NotNull @Valid User body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithQueryParams(query, body, securityContext); @@ -157,7 +157,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClientModel(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body + public Response testClientModel(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testClientModel(body, securityContext); @@ -204,10 +204,10 @@ public class FakeApi { @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList<>()")@HeaderParam("enum_header_string_array") List enumHeaderStringArray ,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)")@QueryParam("enum_query_string_array") List enumQueryStringArray -,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg")@QueryParam("enum_query_string") String enumQueryString -,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2")@QueryParam("enum_query_integer") Integer enumQueryInteger -,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2")@QueryParam("enum_query_double") Double enumQueryDouble +,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray +,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble ,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray ,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString ,@Context SecurityContext securityContext) @@ -221,12 +221,12 @@ public class FakeApi { @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 = "Required String in group parameters",required=true)@QueryParam("required_string_group") Integer requiredStringGroup + public Response testGroupParameters(@ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup ,@ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup -,@ApiParam(value = "Required Integer in group parameters",required=true)@QueryParam("required_int64_group") Long requiredInt64Group -,@ApiParam(value = "String in group parameters")@QueryParam("string_group") Integer stringGroup +,@ApiParam(value = "Required Integer in group parameters", required = true) @QueryParam("required_int64_group") @NotNull Long requiredInt64Group +,@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 +,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, securityContext); @@ -238,7 +238,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @NotNull @Valid Map param + public Response testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @NotNull @Valid Map param ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testInlineAdditionalProperties(param, securityContext); @@ -263,11 +263,11 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "To test the collection format in query parameters", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testQueryParameterCollectionFormat(@ApiParam(value = "",required=true)@QueryParam("pipe") List pipe -,@ApiParam(value = "",required=true)@QueryParam("ioutil") List ioutil -,@ApiParam(value = "",required=true)@QueryParam("http") List http -,@ApiParam(value = "",required=true)@QueryParam("url") List url -,@ApiParam(value = "",required=true)@QueryParam("context") List context + public Response testQueryParameterCollectionFormat(@ApiParam(value = "", required = true) @QueryParam("pipe") @NotNull @Valid List pipe +,@ApiParam(value = "", required = true) @QueryParam("ioutil") @NotNull @Valid List ioutil +,@ApiParam(value = "", required = true) @QueryParam("http") @NotNull @Valid List http +,@ApiParam(value = "", required = true) @QueryParam("url") @NotNull @Valid List url +,@ApiParam(value = "", required = true) @QueryParam("context") @NotNull @Valid List context ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, securityContext); @@ -284,7 +284,7 @@ public class FakeApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId , @FormDataParam("requiredFile") InputStream requiredFileInputStream, @FormDataParam("requiredFile") FormDataContentDisposition requiredFileDetail diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index c8ba907c3e..7fad74fd76 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -64,7 +64,7 @@ public class FakeClassnameTestApi { }, tags={ "fake_classname_tags 123#$%^", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClassname(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body + public Response testClassname(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testClassname(body, securityContext); diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java index c2ea4f9151..782ed5b415 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java @@ -71,7 +71,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body + public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body, securityContext); @@ -90,7 +90,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId + public Response deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey ,@Context SecurityContext securityContext) throws NotFoundException { @@ -110,7 +110,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true)@QueryParam("status") List status + public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true) @QueryParam("status") @NotNull @Valid List status ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status, securityContext); @@ -129,7 +129,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true)@QueryParam("tags") List tags + public Response findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @QueryParam("tags") @NotNull @Valid List tags ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags, securityContext); @@ -147,7 +147,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) - public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId + public Response getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathParam("petId") @NotNull Long petId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId, securityContext); @@ -170,7 +170,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body + public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body, securityContext); @@ -187,7 +187,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId + public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name ,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status ,@Context SecurityContext securityContext) @@ -206,7 +206,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId + public Response uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata , @FormDataParam("file") InputStream fileInputStream, diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java index eddcbfe0a3..84ad5abd70 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java @@ -65,7 +65,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId + public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathParam("order_id") @NotNull String orderId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId, securityContext); @@ -94,7 +94,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathParam("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId, securityContext); @@ -108,7 +108,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order body + public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @NotNull @Valid Order body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body, securityContext); diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java index 01bc4f0e6f..47f5f22b6c 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java @@ -63,7 +63,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUser(@ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User body + public Response createUser(@ApiParam(value = "Created user object", required = true) @NotNull @Valid User body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body, securityContext); @@ -75,7 +75,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body, securityContext); @@ -87,7 +87,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body + public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body, securityContext); @@ -101,7 +101,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username + public Response deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathParam("username") @NotNull String username ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username, securityContext); @@ -117,7 +117,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathParam("username") String username + public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathParam("username") @NotNull String username ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username, securityContext); @@ -131,8 +131,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser(@ApiParam(value = "The user name for login",required=true)@QueryParam("username") String username -,@ApiParam(value = "The password for login in clear text",required=true)@QueryParam("password") String password + public Response loginUser(@ApiParam(value = "The user name for login", required = true) @QueryParam("username") @NotNull String username +,@ApiParam(value = "The password for login in clear text", required = true) @QueryParam("password") @NotNull String password ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username, password, securityContext); @@ -157,8 +157,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username -,@ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User body + public Response updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathParam("username") @NotNull String username +,@ApiParam(value = "Updated user object", required = true) @NotNull @Valid User body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(username, body, securityContext); diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApi.java index ab8c77a01d..576639b673 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -62,7 +62,7 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client client + public Response call123testSpecialTags(@ApiParam(value = "client model", required = true) @NotNull @Valid Client client ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.call123testSpecialTags(client, securityContext); 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 c97675926f..fe96bc3730 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 @@ -82,7 +82,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body + public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") Boolean body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterBooleanSerialize(body, securityContext); @@ -94,7 +94,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid OuterComposite outerComposite + public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid OuterComposite outerComposite ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterCompositeSerialize(outerComposite, securityContext); @@ -106,7 +106,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) BigDecimal body + public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") BigDecimal body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterNumberSerialize(body, securityContext); @@ -118,7 +118,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) }) - public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) String body + public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") String body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterStringSerialize(body, securityContext); @@ -130,7 +130,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass fileSchemaTestClass + public Response testBodyWithFileSchema(@ApiParam(value = "", required = true) @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithFileSchema(fileSchemaTestClass, securityContext); @@ -142,8 +142,8 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithQueryParams(@ApiParam(value = "",required=true)@QueryParam("query") String query -,@ApiParam(value = "" ,required=true) @NotNull @Valid User user + public Response testBodyWithQueryParams(@ApiParam(value = "", required = true) @QueryParam("query") @NotNull String query +,@ApiParam(value = "", required = true) @NotNull @Valid User user ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithQueryParams(query, user, securityContext); @@ -155,7 +155,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClientModel(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client client + public Response testClientModel(@ApiParam(value = "client model", required = true) @NotNull @Valid Client client ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testClientModel(client, securityContext); @@ -202,10 +202,10 @@ public class FakeApi { @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList()")@HeaderParam("enum_header_string_array") List enumHeaderStringArray ,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)")@QueryParam("enum_query_string_array") List enumQueryStringArray -,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg")@QueryParam("enum_query_string") String enumQueryString -,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2")@QueryParam("enum_query_integer") Integer enumQueryInteger -,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2")@QueryParam("enum_query_double") Double enumQueryDouble +,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray +,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble ,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray ,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString ,@Context SecurityContext securityContext) @@ -221,12 +221,12 @@ public class FakeApi { }, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) - public Response testGroupParameters(@ApiParam(value = "Required String in group parameters",required=true)@QueryParam("required_string_group") Integer requiredStringGroup + public Response testGroupParameters(@ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup ,@ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup -,@ApiParam(value = "Required Integer in group parameters",required=true)@QueryParam("required_int64_group") Long requiredInt64Group -,@ApiParam(value = "String in group parameters")@QueryParam("string_group") Integer stringGroup +,@ApiParam(value = "Required Integer in group parameters", required = true) @QueryParam("required_int64_group") @NotNull Long requiredInt64Group +,@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 +,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, securityContext); @@ -238,7 +238,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @NotNull @Valid Map requestBody + public Response testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @NotNull @Valid Map requestBody ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testInlineAdditionalProperties(requestBody, securityContext); @@ -263,11 +263,11 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "To test the collection format in query parameters", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testQueryParameterCollectionFormat(@ApiParam(value = "",required=true)@QueryParam("pipe") List pipe -,@ApiParam(value = "",required=true)@QueryParam("ioutil") List ioutil -,@ApiParam(value = "",required=true)@QueryParam("http") List http -,@ApiParam(value = "",required=true)@QueryParam("url") List url -,@ApiParam(value = "",required=true)@QueryParam("context") List context + public Response testQueryParameterCollectionFormat(@ApiParam(value = "", required = true) @QueryParam("pipe") @NotNull @Valid List pipe +,@ApiParam(value = "", required = true) @QueryParam("ioutil") @NotNull @Valid List ioutil +,@ApiParam(value = "", required = true) @QueryParam("http") @NotNull @Valid List http +,@ApiParam(value = "", required = true) @QueryParam("url") @NotNull @Valid List url +,@ApiParam(value = "", required = true) @QueryParam("context") @NotNull @Valid List context ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, securityContext); @@ -284,7 +284,7 @@ public class FakeApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId , @FormDataParam("requiredFile") InputStream requiredFileInputStream, @FormDataParam("requiredFile") FormDataContentDisposition requiredFileDetail diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index cd9ff77fd3..c7eea20825 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -64,7 +64,7 @@ public class FakeClassnameTestApi { }, tags={ "fake_classname_tags 123#$%^", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClassname(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client client + public Response testClassname(@ApiParam(value = "client model", required = true) @NotNull @Valid Client client ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testClassname(client, securityContext); diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java index d237caf9f7..98f5cdf040 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java @@ -69,7 +69,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet pet + public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet pet ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(pet, securityContext); @@ -86,7 +86,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId + public Response deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey ,@Context SecurityContext securityContext) throws NotFoundException { @@ -106,7 +106,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true)@QueryParam("status") List status + public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true) @QueryParam("status") @NotNull @Valid List status ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status, securityContext); @@ -125,7 +125,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true)@QueryParam("tags") List tags + public Response findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @QueryParam("tags") @NotNull @Valid List tags ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags, securityContext); @@ -143,7 +143,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) - public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId + public Response getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathParam("petId") @NotNull Long petId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId, securityContext); @@ -164,7 +164,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet pet + public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet pet ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(pet, securityContext); @@ -181,7 +181,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId + public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name ,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status ,@Context SecurityContext securityContext) @@ -200,7 +200,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId + public Response uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata , @FormDataParam("file") InputStream fileInputStream, diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java index 1257406af1..cda2845ecc 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java @@ -65,7 +65,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId + public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathParam("order_id") @NotNull String orderId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId, securityContext); @@ -94,7 +94,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathParam("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId, securityContext); @@ -108,7 +108,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order order + public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @NotNull @Valid Order order ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(order, securityContext); diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java index 69cc02e8d7..0d3f8936e8 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java @@ -63,7 +63,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUser(@ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User user + public Response createUser(@ApiParam(value = "Created user object", required = true) @NotNull @Valid User user ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(user, securityContext); @@ -75,7 +75,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List user + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List user ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(user, securityContext); @@ -87,7 +87,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List user + public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List user ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(user, securityContext); @@ -101,7 +101,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username + public Response deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathParam("username") @NotNull String username ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username, securityContext); @@ -117,7 +117,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathParam("username") String username + public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathParam("username") @NotNull String username ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username, securityContext); @@ -131,8 +131,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser(@ApiParam(value = "The user name for login",required=true)@QueryParam("username") String username -,@ApiParam(value = "The password for login in clear text",required=true)@QueryParam("password") String password + public Response loginUser(@ApiParam(value = "The user name for login", required = true) @QueryParam("username") @NotNull String username +,@ApiParam(value = "The password for login in clear text", required = true) @QueryParam("password") @NotNull String password ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username, password, securityContext); @@ -157,8 +157,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username -,@ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User user + public Response updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathParam("username") @NotNull String username +,@ApiParam(value = "Updated user object", required = true) @NotNull @Valid User user ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(username, user, securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 5c34ad6a4f..385acd4edb 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -41,7 +41,7 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response call123testSpecialTags( - @ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body, + @ApiParam(value = "client model", required = true) @NotNull @Valid Client body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.call123testSpecialTags(body,securityContext); 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 856c8fefbb..ef661e676b 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 @@ -49,7 +49,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createXmlItem( - @ApiParam(value = "XmlItem Body" ,required=true) @NotNull @Valid XmlItem xmlItem, + @ApiParam(value = "XmlItem Body", required = true) @NotNull @Valid XmlItem xmlItem, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createXmlItem(xmlItem,securityContext); @@ -62,7 +62,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) public Response fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body" ) Boolean body, + @ApiParam(value = "Input boolean as post body") Boolean body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterBooleanSerialize(body,securityContext); @@ -75,7 +75,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) public Response fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body" ) @Valid OuterComposite body, + @ApiParam(value = "Input composite as post body") @Valid OuterComposite body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterCompositeSerialize(body,securityContext); @@ -88,7 +88,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) public Response fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body" ) BigDecimal body, + @ApiParam(value = "Input number as post body") BigDecimal body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterNumberSerialize(body,securityContext); @@ -101,7 +101,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) }) public Response fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body" ) String body, + @ApiParam(value = "Input string as post body") String body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterStringSerialize(body,securityContext); @@ -114,7 +114,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) public Response testBodyWithFileSchema( - @ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass body, + @ApiParam(value = "", required = true) @NotNull @Valid FileSchemaTestClass body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithFileSchema(body,securityContext); @@ -127,8 +127,8 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) public Response testBodyWithQueryParams( - @ApiParam(value = "",required=true)@QueryParam("query") String query, - @ApiParam(value = "" ,required=true) @NotNull @Valid User body, + @ApiParam(value = "", required = true) @QueryParam("query") @NotNull String query, + @ApiParam(value = "", required = true) @NotNull @Valid User body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithQueryParams(query,body,securityContext); @@ -141,7 +141,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response testClientModel( - @ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body, + @ApiParam(value = "client model", required = true) @NotNull @Valid Client body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testClientModel(body,securityContext); @@ -187,10 +187,10 @@ public class FakeApi { public Response testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList()")@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)")@QueryParam("enum_query_string_array") List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg")@QueryParam("enum_query_string") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2")@QueryParam("enum_query_integer") Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2")@QueryParam("enum_query_double") Double enumQueryDouble, + @ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString, @Context SecurityContext securityContext) @@ -205,12 +205,12 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) public Response testGroupParameters( - @ApiParam(value = "Required String in group parameters",required=true)@QueryParam("required_string_group") Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup, @ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, - @ApiParam(value = "Required Integer in group parameters",required=true)@QueryParam("required_int64_group") Long requiredInt64Group, - @ApiParam(value = "String in group parameters")@QueryParam("string_group") Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @QueryParam("required_int64_group") @NotNull Long requiredInt64Group, + @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, + @ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testGroupParameters(requiredStringGroup,requiredBooleanGroup,requiredInt64Group,stringGroup,booleanGroup,int64Group,securityContext); @@ -223,7 +223,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response testInlineAdditionalProperties( - @ApiParam(value = "request body" ,required=true) @NotNull @Valid Map param, + @ApiParam(value = "request body", required = true) @NotNull @Valid Map param, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testInlineAdditionalProperties(param,securityContext); @@ -250,11 +250,11 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) public Response testQueryParameterCollectionFormat( - @ApiParam(value = "",required=true)@QueryParam("pipe") List pipe, - @ApiParam(value = "",required=true)@QueryParam("ioutil") List ioutil, - @ApiParam(value = "",required=true)@QueryParam("http") List http, - @ApiParam(value = "",required=true)@QueryParam("url") List url, - @ApiParam(value = "",required=true)@QueryParam("context") List context, + @ApiParam(value = "", required = true) @QueryParam("pipe") @NotNull @Valid List pipe, + @ApiParam(value = "", required = true) @QueryParam("ioutil") @NotNull @Valid List ioutil, + @ApiParam(value = "", required = true) @QueryParam("http") @NotNull @Valid List http, + @ApiParam(value = "", required = true) @QueryParam("url") @NotNull @Valid List url, + @ApiParam(value = "", required = true) @QueryParam("context") @NotNull @Valid List context, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testQueryParameterCollectionFormat(pipe,ioutil,http,url,context,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java index 3560a62810..89131417c5 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -43,7 +43,7 @@ public class FakeClassnameTags123Api { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response testClassname( - @ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body, + @ApiParam(value = "client model", required = true) @NotNull @Valid Client body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testClassname(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java index e47b16290a..64c45c3b9a 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java @@ -49,7 +49,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response addPet( - @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body, + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body,securityContext); @@ -68,7 +68,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) public Response deletePet( - @ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathParam("petId") @NotNull Long petId, @ApiParam(value = "" )@HeaderParam("api_key") String apiKey, @Context SecurityContext securityContext) throws NotFoundException { @@ -88,7 +88,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) public Response findPetsByStatus( - @ApiParam(value = "Status values that need to be considered for filter",required=true)@QueryParam("status") List status, + @ApiParam(value = "Status values that need to be considered for filter", required = true) @QueryParam("status") @NotNull @Valid List status, @Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status,securityContext); @@ -107,7 +107,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) public Response findPetsByTags( - @ApiParam(value = "Tags to filter by",required=true)@QueryParam("tags") List tags, + @ApiParam(value = "Tags to filter by", required = true) @QueryParam("tags") @NotNull @Valid List tags, @Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags,securityContext); @@ -124,7 +124,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) public Response getPetById( - @ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId, + @ApiParam(value = "ID of pet to return", required = true) @PathParam("petId") @NotNull Long petId, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId,securityContext); @@ -145,7 +145,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) public Response updatePet( - @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body, + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body,securityContext); @@ -163,7 +163,7 @@ public class PetApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId, + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathParam("petId") @NotNull Long petId, @ApiParam(value = "Updated name of the pet") @FormParam("name") String name, @ApiParam(value = "Updated status of the pet") @FormParam("status") String status, @Context SecurityContext securityContext) @@ -183,7 +183,7 @@ public class PetApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile( - @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, + @ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId, @FormDataParam("additionalMetadata") String additionalMetadata, @FormDataParam("file") InputStream inputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @@ -204,7 +204,7 @@ public class PetApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, + @ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId, @FormDataParam("requiredFile") InputStream inputStream, @FormDataParam("requiredFile") FormDataContentDisposition fileDetail, @FormDataParam("additionalMetadata") String additionalMetadata, diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/StoreApi.java index d1f1b873c3..ac06e7d70f 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/StoreApi.java @@ -43,7 +43,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) public Response deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId, + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathParam("order_id") @NotNull String orderId, @Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId,securityContext); @@ -72,7 +72,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) public Response getOrderById( - @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId, + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathParam("order_id") @NotNull @Min(1L) @Max(5L) Long orderId, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId,securityContext); @@ -86,7 +86,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) public Response placeOrder( - @ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order body, + @ApiParam(value = "order placed for purchasing the pet", required = true) @NotNull @Valid Order body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApi.java index 4ba0884b63..32d1dd4fdf 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApi.java @@ -42,7 +42,7 @@ public class UserApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUser( - @ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User body, + @ApiParam(value = "Created user object", required = true) @NotNull @Valid User body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body,securityContext); @@ -55,7 +55,7 @@ public class UserApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUsersWithArrayInput( - @ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body, + @ApiParam(value = "List of user object", required = true) @NotNull @Valid List body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body,securityContext); @@ -68,7 +68,7 @@ public class UserApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUsersWithListInput( - @ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body, + @ApiParam(value = "List of user object", required = true) @NotNull @Valid List body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body,securityContext); @@ -82,7 +82,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response deleteUser( - @ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username, + @ApiParam(value = "The name that needs to be deleted", required = true) @PathParam("username") @NotNull String username, @Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username,securityContext); @@ -97,7 +97,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathParam("username") String username, + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathParam("username") @NotNull String username, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username,securityContext); @@ -111,8 +111,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) public Response loginUser( - @ApiParam(value = "The user name for login",required=true)@QueryParam("username") String username, - @ApiParam(value = "The password for login in clear text",required=true)@QueryParam("password") String password, + @ApiParam(value = "The user name for login", required = true) @QueryParam("username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @QueryParam("password") @NotNull String password, @Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username,password,securityContext); @@ -138,8 +138,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response updateUser( - @ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username, - @ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User body, + @ApiParam(value = "name that need to be deleted", required = true) @PathParam("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @NotNull @Valid User body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(username,body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 06e2e22168..9a6e7bc979 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -41,7 +41,7 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response call123testSpecialTags( - @ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body, + @ApiParam(value = "client model", required = true) @NotNull @Valid Client body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.call123testSpecialTags(body,securityContext); 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 0da73135d8..c494293f05 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 @@ -50,7 +50,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createXmlItem( - @ApiParam(value = "XmlItem Body" ,required=true) @NotNull @Valid XmlItem xmlItem, + @ApiParam(value = "XmlItem Body", required = true) @NotNull @Valid XmlItem xmlItem, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createXmlItem(xmlItem,securityContext); @@ -63,7 +63,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) public Response fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body" ) Boolean body, + @ApiParam(value = "Input boolean as post body") Boolean body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterBooleanSerialize(body,securityContext); @@ -76,7 +76,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) public Response fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body" ) @Valid OuterComposite body, + @ApiParam(value = "Input composite as post body") @Valid OuterComposite body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterCompositeSerialize(body,securityContext); @@ -89,7 +89,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) public Response fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body" ) BigDecimal body, + @ApiParam(value = "Input number as post body") BigDecimal body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterNumberSerialize(body,securityContext); @@ -102,7 +102,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) }) public Response fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body" ) String body, + @ApiParam(value = "Input string as post body") String body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterStringSerialize(body,securityContext); @@ -115,7 +115,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) public Response testBodyWithFileSchema( - @ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass body, + @ApiParam(value = "", required = true) @NotNull @Valid FileSchemaTestClass body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithFileSchema(body,securityContext); @@ -128,8 +128,8 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) public Response testBodyWithQueryParams( - @ApiParam(value = "",required=true)@QueryParam("query") String query, - @ApiParam(value = "" ,required=true) @NotNull @Valid User body, + @ApiParam(value = "", required = true) @QueryParam("query") @NotNull String query, + @ApiParam(value = "", required = true) @NotNull @Valid User body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithQueryParams(query,body,securityContext); @@ -142,7 +142,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response testClientModel( - @ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body, + @ApiParam(value = "client model", required = true) @NotNull @Valid Client body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testClientModel(body,securityContext); @@ -188,10 +188,10 @@ public class FakeApi { public Response testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList()")@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)")@QueryParam("enum_query_string_array") List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg")@QueryParam("enum_query_string") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2")@QueryParam("enum_query_integer") Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2")@QueryParam("enum_query_double") Double enumQueryDouble, + @ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString, @Context SecurityContext securityContext) @@ -206,12 +206,12 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) public Response testGroupParameters( - @ApiParam(value = "Required String in group parameters",required=true)@QueryParam("required_string_group") Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup, @ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, - @ApiParam(value = "Required Integer in group parameters",required=true)@QueryParam("required_int64_group") Long requiredInt64Group, - @ApiParam(value = "String in group parameters")@QueryParam("string_group") Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @QueryParam("required_int64_group") @NotNull Long requiredInt64Group, + @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, + @ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testGroupParameters(requiredStringGroup,requiredBooleanGroup,requiredInt64Group,stringGroup,booleanGroup,int64Group,securityContext); @@ -224,7 +224,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response testInlineAdditionalProperties( - @ApiParam(value = "request body" ,required=true) @NotNull @Valid Map param, + @ApiParam(value = "request body", required = true) @NotNull @Valid Map param, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testInlineAdditionalProperties(param,securityContext); @@ -251,11 +251,11 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) public Response testQueryParameterCollectionFormat( - @ApiParam(value = "",required=true)@QueryParam("pipe") List pipe, - @ApiParam(value = "",required=true)@QueryParam("ioutil") List ioutil, - @ApiParam(value = "",required=true)@QueryParam("http") List http, - @ApiParam(value = "",required=true)@QueryParam("url") List url, - @ApiParam(value = "",required=true)@QueryParam("context") List context, + @ApiParam(value = "", required = true) @QueryParam("pipe") @NotNull @Valid List pipe, + @ApiParam(value = "", required = true) @QueryParam("ioutil") @NotNull @Valid List ioutil, + @ApiParam(value = "", required = true) @QueryParam("http") @NotNull @Valid List http, + @ApiParam(value = "", required = true) @QueryParam("url") @NotNull @Valid List url, + @ApiParam(value = "", required = true) @QueryParam("context") @NotNull @Valid List context, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testQueryParameterCollectionFormat(pipe,ioutil,http,url,context,securityContext); @@ -273,7 +273,7 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, + @ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId, @FormDataParam("requiredFile") InputStream inputStream, @FormDataParam("requiredFile") FormDataContentDisposition fileDetail, @FormDataParam("additionalMetadata") String additionalMetadata, diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index f7040e448d..b25d5cf9c8 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -43,7 +43,7 @@ public class FakeClassnameTestApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response testClassname( - @ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body, + @ApiParam(value = "client model", required = true) @NotNull @Valid Client body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testClassname(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java index 0df43d04f6..cde1c24428 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java @@ -49,7 +49,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response addPet( - @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body, + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body,securityContext); @@ -68,7 +68,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) public Response deletePet( - @ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathParam("petId") @NotNull Long petId, @ApiParam(value = "" )@HeaderParam("api_key") String apiKey, @Context SecurityContext securityContext) throws NotFoundException { @@ -88,7 +88,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) public Response findPetsByStatus( - @ApiParam(value = "Status values that need to be considered for filter",required=true)@QueryParam("status") List status, + @ApiParam(value = "Status values that need to be considered for filter", required = true) @QueryParam("status") @NotNull @Valid List status, @Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status,securityContext); @@ -107,7 +107,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) public Response findPetsByTags( - @ApiParam(value = "Tags to filter by",required=true)@QueryParam("tags") List tags, + @ApiParam(value = "Tags to filter by", required = true) @QueryParam("tags") @NotNull @Valid List tags, @Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags,securityContext); @@ -124,7 +124,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) public Response getPetById( - @ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId, + @ApiParam(value = "ID of pet to return", required = true) @PathParam("petId") @NotNull Long petId, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId,securityContext); @@ -145,7 +145,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) public Response updatePet( - @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body, + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body,securityContext); @@ -163,7 +163,7 @@ public class PetApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId, + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathParam("petId") @NotNull Long petId, @ApiParam(value = "Updated name of the pet") @FormParam("name") String name, @ApiParam(value = "Updated status of the pet") @FormParam("status") String status, @Context SecurityContext securityContext) @@ -183,7 +183,7 @@ public class PetApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile( - @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, + @ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId, @FormDataParam("additionalMetadata") String additionalMetadata, @FormDataParam("file") InputStream inputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/StoreApi.java index feacbbfb7e..f6f657854f 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/StoreApi.java @@ -43,7 +43,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) public Response deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId, + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathParam("order_id") @NotNull String orderId, @Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId,securityContext); @@ -72,7 +72,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) public Response getOrderById( - @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId, + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathParam("order_id") @NotNull @Min(1L) @Max(5L) Long orderId, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId,securityContext); @@ -86,7 +86,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) public Response placeOrder( - @ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order body, + @ApiParam(value = "order placed for purchasing the pet", required = true) @NotNull @Valid Order body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApi.java index 38d938aa6f..f4559c2779 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApi.java @@ -42,7 +42,7 @@ public class UserApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUser( - @ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User body, + @ApiParam(value = "Created user object", required = true) @NotNull @Valid User body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body,securityContext); @@ -55,7 +55,7 @@ public class UserApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUsersWithArrayInput( - @ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body, + @ApiParam(value = "List of user object", required = true) @NotNull @Valid List body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body,securityContext); @@ -68,7 +68,7 @@ public class UserApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUsersWithListInput( - @ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body, + @ApiParam(value = "List of user object", required = true) @NotNull @Valid List body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body,securityContext); @@ -82,7 +82,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response deleteUser( - @ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username, + @ApiParam(value = "The name that needs to be deleted", required = true) @PathParam("username") @NotNull String username, @Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username,securityContext); @@ -97,7 +97,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathParam("username") String username, + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathParam("username") @NotNull String username, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username,securityContext); @@ -111,8 +111,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) public Response loginUser( - @ApiParam(value = "The user name for login",required=true)@QueryParam("username") String username, - @ApiParam(value = "The password for login in clear text",required=true)@QueryParam("password") String password, + @ApiParam(value = "The user name for login", required = true) @QueryParam("username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @QueryParam("password") @NotNull String password, @Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username,password,securityContext); @@ -138,8 +138,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response updateUser( - @ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username, - @ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User body, + @ApiParam(value = "name that need to be deleted", required = true) @PathParam("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @NotNull @Valid User body, @Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(username,body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java index ca6c1b1cea..9e514280fa 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -62,7 +62,7 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body + public Response call123testSpecialTags(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.call123testSpecialTags(body, securityContext); 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 4d1751d9ee..cf04a03a49 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 @@ -70,7 +70,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true) @NotNull @Valid XmlItem xmlItem + public Response createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @NotNull @Valid XmlItem xmlItem ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createXmlItem(xmlItem, securityContext); @@ -82,7 +82,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body + public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") Boolean body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterBooleanSerialize(body, securityContext); @@ -94,7 +94,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid OuterComposite body + public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid OuterComposite body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterCompositeSerialize(body, securityContext); @@ -106,7 +106,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) BigDecimal body + public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") BigDecimal body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterNumberSerialize(body, securityContext); @@ -118,7 +118,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) }) - public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) String body + public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") String body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterStringSerialize(body, securityContext); @@ -130,7 +130,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass body + public Response testBodyWithFileSchema(@ApiParam(value = "", required = true) @NotNull @Valid FileSchemaTestClass body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithFileSchema(body, securityContext); @@ -142,8 +142,8 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithQueryParams(@ApiParam(value = "",required=true)@QueryParam("query") String query -,@ApiParam(value = "" ,required=true) @NotNull @Valid User body + public Response testBodyWithQueryParams(@ApiParam(value = "", required = true) @QueryParam("query") @NotNull String query +,@ApiParam(value = "", required = true) @NotNull @Valid User body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithQueryParams(query, body, securityContext); @@ -155,7 +155,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClientModel(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body + public Response testClientModel(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testClientModel(body, securityContext); @@ -202,10 +202,10 @@ public class FakeApi { @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList()")@HeaderParam("enum_header_string_array") List enumHeaderStringArray ,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)")@QueryParam("enum_query_string_array") List enumQueryStringArray -,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg")@QueryParam("enum_query_string") String enumQueryString -,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2")@QueryParam("enum_query_integer") Integer enumQueryInteger -,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2")@QueryParam("enum_query_double") Double enumQueryDouble +,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray +,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble ,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray ,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString ,@Context SecurityContext securityContext) @@ -219,12 +219,12 @@ public class FakeApi { @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 = "Required String in group parameters",required=true)@QueryParam("required_string_group") Integer requiredStringGroup + public Response testGroupParameters(@ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup ,@ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup -,@ApiParam(value = "Required Integer in group parameters",required=true)@QueryParam("required_int64_group") Long requiredInt64Group -,@ApiParam(value = "String in group parameters")@QueryParam("string_group") Integer stringGroup +,@ApiParam(value = "Required Integer in group parameters", required = true) @QueryParam("required_int64_group") @NotNull Long requiredInt64Group +,@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 +,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, securityContext); @@ -236,7 +236,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @NotNull @Valid Map param + public Response testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @NotNull @Valid Map param ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testInlineAdditionalProperties(param, securityContext); @@ -261,11 +261,11 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "To test the collection format in query parameters", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testQueryParameterCollectionFormat(@ApiParam(value = "",required=true)@QueryParam("pipe") List pipe -,@ApiParam(value = "",required=true)@QueryParam("ioutil") List ioutil -,@ApiParam(value = "",required=true)@QueryParam("http") List http -,@ApiParam(value = "",required=true)@QueryParam("url") List url -,@ApiParam(value = "",required=true)@QueryParam("context") List context + public Response testQueryParameterCollectionFormat(@ApiParam(value = "", required = true) @QueryParam("pipe") @NotNull @Valid List pipe +,@ApiParam(value = "", required = true) @QueryParam("ioutil") @NotNull @Valid List ioutil +,@ApiParam(value = "", required = true) @QueryParam("http") @NotNull @Valid List http +,@ApiParam(value = "", required = true) @QueryParam("url") @NotNull @Valid List url +,@ApiParam(value = "", required = true) @QueryParam("context") @NotNull @Valid List context ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, securityContext); diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java index 5851aa45c4..19b1e709af 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -64,7 +64,7 @@ public class FakeClassnameTags123Api { }, tags={ "fake_classname_tags 123#$%^", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClassname(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body + public Response testClassname(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testClassname(body, securityContext); diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java index 755190bee7..d4947d0538 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java @@ -71,7 +71,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body + public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body, securityContext); @@ -90,7 +90,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId + public Response deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey ,@Context SecurityContext securityContext) throws NotFoundException { @@ -110,7 +110,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true)@QueryParam("status") List status + public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true) @QueryParam("status") @NotNull @Valid List status ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status, securityContext); @@ -129,7 +129,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true)@QueryParam("tags") List tags + public Response findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @QueryParam("tags") @NotNull @Valid List tags ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags, securityContext); @@ -147,7 +147,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) - public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId + public Response getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathParam("petId") @NotNull Long petId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId, securityContext); @@ -170,7 +170,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body + public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body, securityContext); @@ -187,7 +187,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId + public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name ,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status ,@Context SecurityContext securityContext) @@ -206,7 +206,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId + public Response uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata , @FormDataParam("file") InputStream fileInputStream, @@ -227,7 +227,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId , @FormDataParam("requiredFile") InputStream requiredFileInputStream, @FormDataParam("requiredFile") FormDataContentDisposition requiredFileDetail diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java index da1b49d927..1ee425dd10 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java @@ -65,7 +65,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId + public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathParam("order_id") @NotNull String orderId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId, securityContext); @@ -94,7 +94,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathParam("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId, securityContext); @@ -108,7 +108,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order body + public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @NotNull @Valid Order body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body, securityContext); diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java index 9b9ad90ad2..fe10e07e50 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java @@ -63,7 +63,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUser(@ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User body + public Response createUser(@ApiParam(value = "Created user object", required = true) @NotNull @Valid User body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body, securityContext); @@ -75,7 +75,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body, securityContext); @@ -87,7 +87,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body + public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body, securityContext); @@ -101,7 +101,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username + public Response deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathParam("username") @NotNull String username ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username, securityContext); @@ -117,7 +117,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathParam("username") String username + public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathParam("username") @NotNull String username ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username, securityContext); @@ -131,8 +131,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser(@ApiParam(value = "The user name for login",required=true)@QueryParam("username") String username -,@ApiParam(value = "The password for login in clear text",required=true)@QueryParam("password") String password + public Response loginUser(@ApiParam(value = "The user name for login", required = true) @QueryParam("username") @NotNull String username +,@ApiParam(value = "The password for login in clear text", required = true) @QueryParam("password") @NotNull String password ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username, password, securityContext); @@ -157,8 +157,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username -,@ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User body + public Response updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathParam("username") @NotNull String username +,@ApiParam(value = "Updated user object", required = true) @NotNull @Valid User body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(username, body, securityContext); diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java index bb7cb6103c..92a1a7f0ba 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -62,7 +62,7 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body + public Response call123testSpecialTags(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.call123testSpecialTags(body, securityContext); 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 ce969dddcc..a08fe744f6 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 @@ -71,7 +71,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true) @NotNull @Valid XmlItem xmlItem + public Response createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @NotNull @Valid XmlItem xmlItem ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createXmlItem(xmlItem, securityContext); @@ -83,7 +83,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body + public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") Boolean body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterBooleanSerialize(body, securityContext); @@ -95,7 +95,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid OuterComposite body + public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid OuterComposite body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterCompositeSerialize(body, securityContext); @@ -107,7 +107,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) BigDecimal body + public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") BigDecimal body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterNumberSerialize(body, securityContext); @@ -119,7 +119,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) }) - public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) String body + public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") String body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterStringSerialize(body, securityContext); @@ -131,7 +131,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass body + public Response testBodyWithFileSchema(@ApiParam(value = "", required = true) @NotNull @Valid FileSchemaTestClass body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithFileSchema(body, securityContext); @@ -143,8 +143,8 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithQueryParams(@ApiParam(value = "",required=true)@QueryParam("query") String query -,@ApiParam(value = "" ,required=true) @NotNull @Valid User body + public Response testBodyWithQueryParams(@ApiParam(value = "", required = true) @QueryParam("query") @NotNull String query +,@ApiParam(value = "", required = true) @NotNull @Valid User body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testBodyWithQueryParams(query, body, securityContext); @@ -156,7 +156,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClientModel(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body + public Response testClientModel(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testClientModel(body, securityContext); @@ -203,10 +203,10 @@ public class FakeApi { @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList()")@HeaderParam("enum_header_string_array") List enumHeaderStringArray ,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)")@QueryParam("enum_query_string_array") List enumQueryStringArray -,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg")@QueryParam("enum_query_string") String enumQueryString -,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2")@QueryParam("enum_query_integer") Integer enumQueryInteger -,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2")@QueryParam("enum_query_double") Double enumQueryDouble +,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray +,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble ,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray ,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString ,@Context SecurityContext securityContext) @@ -220,12 +220,12 @@ public class FakeApi { @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 = "Required String in group parameters",required=true)@QueryParam("required_string_group") Integer requiredStringGroup + public Response testGroupParameters(@ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup ,@ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup -,@ApiParam(value = "Required Integer in group parameters",required=true)@QueryParam("required_int64_group") Long requiredInt64Group -,@ApiParam(value = "String in group parameters")@QueryParam("string_group") Integer stringGroup +,@ApiParam(value = "Required Integer in group parameters", required = true) @QueryParam("required_int64_group") @NotNull Long requiredInt64Group +,@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 +,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, securityContext); @@ -237,7 +237,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @NotNull @Valid Map param + public Response testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @NotNull @Valid Map param ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testInlineAdditionalProperties(param, securityContext); @@ -262,11 +262,11 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "To test the collection format in query parameters", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testQueryParameterCollectionFormat(@ApiParam(value = "",required=true)@QueryParam("pipe") List pipe -,@ApiParam(value = "",required=true)@QueryParam("ioutil") List ioutil -,@ApiParam(value = "",required=true)@QueryParam("http") List http -,@ApiParam(value = "",required=true)@QueryParam("url") List url -,@ApiParam(value = "",required=true)@QueryParam("context") List context + public Response testQueryParameterCollectionFormat(@ApiParam(value = "", required = true) @QueryParam("pipe") @NotNull @Valid List pipe +,@ApiParam(value = "", required = true) @QueryParam("ioutil") @NotNull @Valid List ioutil +,@ApiParam(value = "", required = true) @QueryParam("http") @NotNull @Valid List http +,@ApiParam(value = "", required = true) @QueryParam("url") @NotNull @Valid List url +,@ApiParam(value = "", required = true) @QueryParam("context") @NotNull @Valid List context ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, securityContext); @@ -283,7 +283,7 @@ public class FakeApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId , @FormDataParam("requiredFile") InputStream requiredFileInputStream, @FormDataParam("requiredFile") FormDataContentDisposition requiredFileDetail diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index c8ba907c3e..7fad74fd76 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -64,7 +64,7 @@ public class FakeClassnameTestApi { }, tags={ "fake_classname_tags 123#$%^", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClassname(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body + public Response testClassname(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testClassname(body, securityContext); diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java index c2ea4f9151..782ed5b415 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java @@ -71,7 +71,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body + public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body, securityContext); @@ -90,7 +90,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId + public Response deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey ,@Context SecurityContext securityContext) throws NotFoundException { @@ -110,7 +110,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true)@QueryParam("status") List status + public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true) @QueryParam("status") @NotNull @Valid List status ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status, securityContext); @@ -129,7 +129,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true)@QueryParam("tags") List tags + public Response findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @QueryParam("tags") @NotNull @Valid List tags ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags, securityContext); @@ -147,7 +147,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) - public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId + public Response getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathParam("petId") @NotNull Long petId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId, securityContext); @@ -170,7 +170,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body + public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body, securityContext); @@ -187,7 +187,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId + public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name ,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status ,@Context SecurityContext securityContext) @@ -206,7 +206,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId + public Response uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathParam("petId") @NotNull Long petId ,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata , @FormDataParam("file") InputStream fileInputStream, diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java index eddcbfe0a3..84ad5abd70 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java @@ -65,7 +65,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId + public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathParam("order_id") @NotNull String orderId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId, securityContext); @@ -94,7 +94,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathParam("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId, securityContext); @@ -108,7 +108,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order body + public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @NotNull @Valid Order body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body, securityContext); diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java index 01bc4f0e6f..47f5f22b6c 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java @@ -63,7 +63,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUser(@ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User body + public Response createUser(@ApiParam(value = "Created user object", required = true) @NotNull @Valid User body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body, securityContext); @@ -75,7 +75,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body, securityContext); @@ -87,7 +87,7 @@ public class UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body + public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body, securityContext); @@ -101,7 +101,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username + public Response deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathParam("username") @NotNull String username ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username, securityContext); @@ -117,7 +117,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathParam("username") String username + public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathParam("username") @NotNull String username ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username, securityContext); @@ -131,8 +131,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser(@ApiParam(value = "The user name for login",required=true)@QueryParam("username") String username -,@ApiParam(value = "The password for login in clear text",required=true)@QueryParam("password") String password + public Response loginUser(@ApiParam(value = "The user name for login", required = true) @QueryParam("username") @NotNull String username +,@ApiParam(value = "The password for login in clear text", required = true) @QueryParam("password") @NotNull String password ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username, password, securityContext); @@ -157,8 +157,8 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username -,@ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User body + public Response updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathParam("username") @NotNull String username +,@ApiParam(value = "Updated user object", required = true) @NotNull @Valid User body ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(username, body, securityContext); diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt index 5ced7087da..f5835ca651 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt @@ -23,10 +23,10 @@ data class ApiResponse ( val code: kotlin.Int? = null, val type: kotlin.String? = null, val message: kotlin.String? = null -) -: Serializable - +) : Serializable { - + companion object { + private const val serialVersionUID: Long = 123 + } } diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt index a347a27877..4ca711e4ac 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt @@ -21,10 +21,10 @@ import java.io.Serializable data class Category ( val id: kotlin.Long? = null, val name: kotlin.String? = null -) -: Serializable - +) : Serializable { - + companion object { + private const val serialVersionUID: Long = 123 + } } diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt index f3eba3816e..dc79ef79e7 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -30,24 +30,19 @@ data class Order ( /* Order Status */ val status: Order.Status? = null, val complete: kotlin.Boolean? = null -) -: Serializable - +) : Serializable { - + companion object { + private const val serialVersionUID: Long = 123 + } /** * Order Status * Values: placed,approved,delivered */ enum class Status(val value: kotlin.String){ - placed("placed"), - approved("approved"), - delivered("delivered"); - } - } diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt index 07644fc8bd..acf21c3e9f 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt @@ -32,24 +32,19 @@ data class Pet ( val tags: kotlin.Array? = null, /* pet status in the store */ val status: Pet.Status? = null -) -: Serializable - +) : Serializable { - + companion object { + private const val serialVersionUID: Long = 123 + } /** * pet status in the store * Values: available,pending,sold */ enum class Status(val value: kotlin.String){ - available("available"), - pending("pending"), - sold("sold"); - } - } diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt index aa13b7ca76..dab1c21898 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt @@ -21,10 +21,10 @@ import java.io.Serializable data class Tag ( val id: kotlin.Long? = null, val name: kotlin.String? = null -) -: Serializable - +) : Serializable { - + companion object { + private const val serialVersionUID: Long = 123 + } } diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt index 0aa8a67299..77f8f02f38 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt @@ -34,10 +34,10 @@ data class User ( val phone: kotlin.String? = null, /* User Status */ val userStatus: kotlin.Int? = null -) -: Serializable - +) : Serializable { - + companion object { + private const val serialVersionUID: Long = 123 + } } diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/HasOnlyReadOnly.md b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/HasOnlyReadOnly.md index 7b2247f9c3..0cbfaa8127 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/HasOnlyReadOnly.md +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [default to None] -**foo** | **String** | | [optional] [default to None] +**bar** | **String** | | [optional] [readonly] [default to None] +**foo** | **String** | | [optional] [readonly] [default to None] [[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/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/Name.md b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/Name.md index 621a8f15b9..50d93f90b0 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/Name.md +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **i32** | | -**snake_case** | **i32** | | [optional] [default to None] +**snake_case** | **i32** | | [optional] [readonly] [default to None] **property** | **String** | | [optional] [default to None] -**_123_number** | **isize** | | [optional] [default to None] +**_123_number** | **isize** | | [optional] [readonly] [default to None] [[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/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/ReadOnlyFirst.md b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/ReadOnlyFirst.md index 5db7a05e59..f2a31640b2 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/ReadOnlyFirst.md +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [default to None] +**bar** | **String** | | [optional] [readonly] [default to None] **baz** | **String** | | [optional] [default to None] [[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/website/i18n/en.json b/website/i18n/en.json index 254fe09c38..523607df86 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -44,370 +44,511 @@ "title": "Generators List" }, "generators/ada-server": { - "title": "generators/ada-server" + "title": "Config Options for ada-server", + "sidebar_label": "ada-server" }, "generators/ada": { - "title": "generators/ada" + "title": "Config Options for ada", + "sidebar_label": "ada" }, "generators/android": { - "title": "generators/android" + "title": "Config Options for android", + "sidebar_label": "android" }, "generators/apache2": { - "title": "generators/apache2" + "title": "Config Options for apache2", + "sidebar_label": "apache2" }, "generators/apex": { - "title": "generators/apex" + "title": "Config Options for apex", + "sidebar_label": "apex" + }, + "generators/asciidoc": { + "title": "Config Options for asciidoc", + "sidebar_label": "asciidoc" }, "generators/aspnetcore": { - "title": "generators/aspnetcore" + "title": "Config Options for aspnetcore", + "sidebar_label": "aspnetcore" }, "generators/avro-schema": { - "title": "generators/avro-schema" + "title": "Config Options for avro-schema", + "sidebar_label": "avro-schema" }, "generators/bash": { - "title": "generators/bash" + "title": "Config Options for bash", + "sidebar_label": "bash" }, "generators/c": { - "title": "generators/c" + "title": "Config Options for c", + "sidebar_label": "c" }, "generators/clojure": { - "title": "generators/clojure" + "title": "Config Options for clojure", + "sidebar_label": "clojure" }, "generators/cpp-pistache-server": { - "title": "generators/cpp-pistache-server" + "title": "Config Options for cpp-pistache-server", + "sidebar_label": "cpp-pistache-server" }, "generators/cpp-qt5-client": { - "title": "generators/cpp-qt5-client" + "title": "Config Options for cpp-qt5-client", + "sidebar_label": "cpp-qt5-client" }, "generators/cpp-qt5-qhttpengine-server": { - "title": "generators/cpp-qt5-qhttpengine-server" + "title": "Config Options for cpp-qt5-qhttpengine-server", + "sidebar_label": "cpp-qt5-qhttpengine-server" }, "generators/cpp-restbed-server": { - "title": "generators/cpp-restbed-server" + "title": "Config Options for cpp-restbed-server", + "sidebar_label": "cpp-restbed-server" }, "generators/cpp-restsdk": { - "title": "generators/cpp-restsdk" + "title": "Config Options for cpp-restsdk", + "sidebar_label": "cpp-restsdk" }, "generators/cpp-tizen": { - "title": "generators/cpp-tizen" + "title": "Config Options for cpp-tizen", + "sidebar_label": "cpp-tizen" }, "generators/csharp-dotnet2": { - "title": "generators/csharp-dotnet2" + "title": "Config Options for csharp-dotnet2", + "sidebar_label": "csharp-dotnet2" }, "generators/csharp-nancyfx": { - "title": "generators/csharp-nancyfx" + "title": "Config Options for csharp-nancyfx", + "sidebar_label": "csharp-nancyfx" }, "generators/csharp-netcore": { - "title": "generators/csharp-netcore" + "title": "Config Options for csharp-netcore", + "sidebar_label": "csharp-netcore" }, "generators/csharp-refactor": { "title": "generators/csharp-refactor" }, "generators/csharp": { - "title": "generators/csharp" + "title": "Config Options for csharp", + "sidebar_label": "csharp" }, "generators/cwiki": { - "title": "generators/cwiki" + "title": "Config Options for cwiki", + "sidebar_label": "cwiki" + }, + "generators/dart-dio": { + "title": "Config Options for dart-dio", + "sidebar_label": "dart-dio" }, "generators/dart-jaguar": { - "title": "generators/dart-jaguar" + "title": "Config Options for dart-jaguar", + "sidebar_label": "dart-jaguar" }, "generators/dart": { - "title": "generators/dart" + "title": "Config Options for dart", + "sidebar_label": "dart" }, "generators/dynamic-html": { - "title": "generators/dynamic-html" + "title": "Config Options for dynamic-html", + "sidebar_label": "dynamic-html" }, "generators/eiffel": { - "title": "generators/eiffel" + "title": "Config Options for eiffel", + "sidebar_label": "eiffel" }, "generators/elixir": { - "title": "generators/elixir" + "title": "Config Options for elixir", + "sidebar_label": "elixir" }, "generators/elm": { - "title": "generators/elm" + "title": "Config Options for elm", + "sidebar_label": "elm" }, "generators/erlang-client": { - "title": "generators/erlang-client" + "title": "Config Options for erlang-client", + "sidebar_label": "erlang-client" }, "generators/erlang-proper": { - "title": "generators/erlang-proper" + "title": "Config Options for erlang-proper", + "sidebar_label": "erlang-proper" }, "generators/erlang-server": { - "title": "generators/erlang-server" + "title": "Config Options for erlang-server", + "sidebar_label": "erlang-server" }, "generators/flash": { - "title": "generators/flash" + "title": "Config Options for flash", + "sidebar_label": "flash" + }, + "generators/fsharp-functions": { + "title": "Config Options for fsharp-functions", + "sidebar_label": "fsharp-functions" }, "generators/fsharp-giraffe-server": { - "title": "generators/fsharp-giraffe-server" + "title": "Config Options for fsharp-giraffe-server", + "sidebar_label": "fsharp-giraffe-server" }, "generators/fsharp-giraffe": { "title": "generators/fsharp-giraffe" }, "generators/go-experimental": { - "title": "generators/go-experimental" + "title": "Config Options for go-experimental", + "sidebar_label": "go-experimental" }, "generators/go-gin-server": { - "title": "generators/go-gin-server" + "title": "Config Options for go-gin-server", + "sidebar_label": "go-gin-server" }, "generators/go-server": { - "title": "generators/go-server" + "title": "Config Options for go-server", + "sidebar_label": "go-server" }, "generators/go": { - "title": "generators/go" + "title": "Config Options for go", + "sidebar_label": "go" }, "generators/graphql-nodejs-express-server": { - "title": "generators/graphql-nodejs-express-server" + "title": "Config Options for graphql-nodejs-express-server", + "sidebar_label": "graphql-nodejs-express-server" }, "generators/graphql-schema": { - "title": "generators/graphql-schema" + "title": "Config Options for graphql-schema", + "sidebar_label": "graphql-schema" }, "generators/graphql-server": { "title": "generators/graphql-server" }, "generators/groovy": { - "title": "generators/groovy" + "title": "Config Options for groovy", + "sidebar_label": "groovy" + }, + "generators/grpc-schema": { + "title": "generators/grpc-schema" }, "generators/haskell-http-client": { - "title": "generators/haskell-http-client" + "title": "Config Options for haskell-http-client", + "sidebar_label": "haskell-http-client" }, "generators/haskell": { - "title": "generators/haskell" + "title": "Config Options for haskell", + "sidebar_label": "haskell" }, "generators/html": { - "title": "generators/html" + "title": "Config Options for html", + "sidebar_label": "html" }, "generators/html2": { - "title": "generators/html2" + "title": "Config Options for html2", + "sidebar_label": "html2" }, "generators/java-inflector": { - "title": "generators/java-inflector" + "title": "Config Options for java-inflector", + "sidebar_label": "java-inflector" }, "generators/java-msf4j": { - "title": "generators/java-msf4j" + "title": "Config Options for java-msf4j", + "sidebar_label": "java-msf4j" }, "generators/java-pkmst": { - "title": "generators/java-pkmst" + "title": "Config Options for java-pkmst", + "sidebar_label": "java-pkmst" }, "generators/java-play-framework": { - "title": "generators/java-play-framework" + "title": "Config Options for java-play-framework", + "sidebar_label": "java-play-framework" }, "generators/java-undertow-server": { - "title": "generators/java-undertow-server" + "title": "Config Options for java-undertow-server", + "sidebar_label": "java-undertow-server" }, "generators/java-vertx": { - "title": "generators/java-vertx" + "title": "Config Options for java-vertx", + "sidebar_label": "java-vertx" }, "generators/java": { - "title": "generators/java" + "title": "Config Options for java", + "sidebar_label": "java" }, "generators/javascript-closure-angular": { - "title": "generators/javascript-closure-angular" + "title": "Config Options for javascript-closure-angular", + "sidebar_label": "javascript-closure-angular" }, "generators/javascript-flowtyped": { - "title": "generators/javascript-flowtyped" + "title": "Config Options for javascript-flowtyped", + "sidebar_label": "javascript-flowtyped" }, "generators/javascript": { - "title": "generators/javascript" + "title": "Config Options for javascript", + "sidebar_label": "javascript" }, "generators/jaxrs-cxf-cdi": { - "title": "generators/jaxrs-cxf-cdi" + "title": "Config Options for jaxrs-cxf-cdi", + "sidebar_label": "jaxrs-cxf-cdi" }, "generators/jaxrs-cxf-client": { - "title": "generators/jaxrs-cxf-client" + "title": "Config Options for jaxrs-cxf-client", + "sidebar_label": "jaxrs-cxf-client" }, "generators/jaxrs-cxf-extended": { - "title": "generators/jaxrs-cxf-extended" + "title": "Config Options for jaxrs-cxf-extended", + "sidebar_label": "jaxrs-cxf-extended" }, "generators/jaxrs-cxf": { - "title": "generators/jaxrs-cxf" + "title": "Config Options for jaxrs-cxf", + "sidebar_label": "jaxrs-cxf" }, "generators/jaxrs-jersey": { - "title": "generators/jaxrs-jersey" + "title": "Config Options for jaxrs-jersey", + "sidebar_label": "jaxrs-jersey" }, "generators/jaxrs-resteasy-eap": { - "title": "generators/jaxrs-resteasy-eap" + "title": "Config Options for jaxrs-resteasy-eap", + "sidebar_label": "jaxrs-resteasy-eap" }, "generators/jaxrs-resteasy": { - "title": "generators/jaxrs-resteasy" + "title": "Config Options for jaxrs-resteasy", + "sidebar_label": "jaxrs-resteasy" }, "generators/jaxrs-spec": { - "title": "generators/jaxrs-spec" + "title": "Config Options for jaxrs-spec", + "sidebar_label": "jaxrs-spec" }, "generators/jmeter": { - "title": "generators/jmeter" + "title": "Config Options for jmeter", + "sidebar_label": "jmeter" }, "generators/kotlin-server": { - "title": "generators/kotlin-server" + "title": "Config Options for kotlin-server", + "sidebar_label": "kotlin-server" }, "generators/kotlin-spring": { - "title": "generators/kotlin-spring" + "title": "Config Options for kotlin-spring", + "sidebar_label": "kotlin-spring" + }, + "generators/kotlin-vertx": { + "title": "Config Options for kotlin-vertx", + "sidebar_label": "kotlin-vertx" }, "generators/kotlin": { - "title": "generators/kotlin" + "title": "Config Options for kotlin", + "sidebar_label": "kotlin" }, "generators/lua": { - "title": "generators/lua" + "title": "Config Options for lua", + "sidebar_label": "lua" }, "generators/mysql-schema": { - "title": "generators/mysql-schema" + "title": "Config Options for mysql-schema", + "sidebar_label": "mysql-schema" + }, + "generators/nim": { + "title": "Config Options for nim", + "sidebar_label": "nim" }, "generators/nodejs-express-server": { - "title": "generators/nodejs-express-server" + "title": "Config Options for nodejs-express-server", + "sidebar_label": "nodejs-express-server" }, "generators/nodejs-server-deprecated": { - "title": "generators/nodejs-server-deprecated" + "title": "Config Options for nodejs-server-deprecated", + "sidebar_label": "nodejs-server-deprecated" }, "generators/nodejs-server": { "title": "generators/nodejs-server" }, "generators/objc": { - "title": "generators/objc" + "title": "Config Options for objc", + "sidebar_label": "objc" }, "generators/ocaml-client": { "title": "generators/ocaml-client" }, "generators/ocaml": { - "title": "generators/ocaml" + "title": "Config Options for ocaml", + "sidebar_label": "ocaml" }, "generators/openapi-yaml": { - "title": "generators/openapi-yaml" + "title": "Config Options for openapi-yaml", + "sidebar_label": "openapi-yaml" }, "generators/openapi": { - "title": "generators/openapi" + "title": "Config Options for openapi", + "sidebar_label": "openapi" }, "generators/perl": { - "title": "generators/perl" + "title": "Config Options for perl", + "sidebar_label": "perl" }, "generators/php-laravel": { - "title": "generators/php-laravel" + "title": "Config Options for php-laravel", + "sidebar_label": "php-laravel" }, "generators/php-lumen": { - "title": "generators/php-lumen" + "title": "Config Options for php-lumen", + "sidebar_label": "php-lumen" }, "generators/php-silex": { - "title": "generators/php-silex" + "title": "Config Options for php-silex", + "sidebar_label": "php-silex" }, "generators/php-slim": { - "title": "generators/php-slim" + "title": "Config Options for php-slim", + "sidebar_label": "php-slim" }, "generators/php-symfony": { - "title": "generators/php-symfony" + "title": "Config Options for php-symfony", + "sidebar_label": "php-symfony" }, "generators/php-ze-ph": { - "title": "generators/php-ze-ph" + "title": "Config Options for php-ze-ph", + "sidebar_label": "php-ze-ph" }, "generators/php": { - "title": "generators/php" + "title": "Config Options for php", + "sidebar_label": "php" }, "generators/powershell": { - "title": "generators/powershell" + "title": "Config Options for powershell", + "sidebar_label": "powershell" + }, + "generators/protobuf-schema": { + "title": "Config Options for protobuf-schema", + "sidebar_label": "protobuf-schema" }, "generators/python-aiohttp": { - "title": "generators/python-aiohttp" + "title": "Config Options for python-aiohttp", + "sidebar_label": "python-aiohttp" }, "generators/python-blueplanet": { - "title": "generators/python-blueplanet" + "title": "Config Options for python-blueplanet", + "sidebar_label": "python-blueplanet" }, "generators/python-experimental": { - "title": "generators/python-experimental" + "title": "Config Options for python-experimental", + "sidebar_label": "python-experimental" }, "generators/python-flask": { - "title": "generators/python-flask" + "title": "Config Options for python-flask", + "sidebar_label": "python-flask" }, "generators/python": { - "title": "generators/python" + "title": "Config Options for python", + "sidebar_label": "python" }, "generators/r": { - "title": "generators/r" + "title": "Config Options for r", + "sidebar_label": "r" }, "generators/README": { "title": "generators/README" }, "generators/ruby-on-rails": { - "title": "generators/ruby-on-rails" + "title": "Config Options for ruby-on-rails", + "sidebar_label": "ruby-on-rails" }, "generators/ruby-sinatra": { - "title": "generators/ruby-sinatra" + "title": "Config Options for ruby-sinatra", + "sidebar_label": "ruby-sinatra" }, "generators/ruby": { - "title": "generators/ruby" + "title": "Config Options for ruby", + "sidebar_label": "ruby" }, "generators/rust-server": { - "title": "generators/rust-server" + "title": "Config Options for rust-server", + "sidebar_label": "rust-server" }, "generators/rust": { - "title": "generators/rust" + "title": "Config Options for rust", + "sidebar_label": "rust" }, "generators/scala-akka": { - "title": "generators/scala-akka" + "title": "Config Options for scala-akka", + "sidebar_label": "scala-akka" }, "generators/scala-finch": { - "title": "generators/scala-finch" + "title": "Config Options for scala-finch", + "sidebar_label": "scala-finch" }, "generators/scala-gatling": { - "title": "generators/scala-gatling" + "title": "Config Options for scala-gatling", + "sidebar_label": "scala-gatling" }, "generators/scala-httpclient-deprecated": { - "title": "generators/scala-httpclient-deprecated" + "title": "Config Options for scala-httpclient-deprecated", + "sidebar_label": "scala-httpclient-deprecated" }, "generators/scala-httpclient": { "title": "generators/scala-httpclient" }, "generators/scala-lagom-server": { - "title": "generators/scala-lagom-server" + "title": "Config Options for scala-lagom-server", + "sidebar_label": "scala-lagom-server" }, "generators/scala-play-framework": { "title": "generators/scala-play-framework" }, "generators/scala-play-server": { - "title": "generators/scala-play-server" + "title": "Config Options for scala-play-server", + "sidebar_label": "scala-play-server" }, "generators/scalatra": { - "title": "generators/scalatra" + "title": "Config Options for scalatra", + "sidebar_label": "scalatra" }, "generators/scalaz": { - "title": "generators/scalaz" + "title": "Config Options for scalaz", + "sidebar_label": "scalaz" }, "generators/spring": { - "title": "generators/spring" + "title": "Config Options for spring", + "sidebar_label": "spring" }, "generators/swift2-deprecated": { - "title": "generators/swift2-deprecated" + "title": "Config Options for swift2-deprecated", + "sidebar_label": "swift2-deprecated" }, "generators/swift3-deprecated": { - "title": "generators/swift3-deprecated" + "title": "Config Options for swift3-deprecated", + "sidebar_label": "swift3-deprecated" }, "generators/swift4": { - "title": "generators/swift4" + "title": "Config Options for swift4", + "sidebar_label": "swift4" }, "generators/typescript-angular": { - "title": "generators/typescript-angular" + "title": "Config Options for typescript-angular", + "sidebar_label": "typescript-angular" }, "generators/typescript-angularjs": { - "title": "generators/typescript-angularjs" + "title": "Config Options for typescript-angularjs", + "sidebar_label": "typescript-angularjs" }, "generators/typescript-aurelia": { - "title": "generators/typescript-aurelia" + "title": "Config Options for typescript-aurelia", + "sidebar_label": "typescript-aurelia" }, "generators/typescript-axios": { - "title": "generators/typescript-axios" + "title": "Config Options for typescript-axios", + "sidebar_label": "typescript-axios" }, "generators/typescript-fetch": { - "title": "generators/typescript-fetch" + "title": "Config Options for typescript-fetch", + "sidebar_label": "typescript-fetch" }, "generators/typescript-inversify": { - "title": "generators/typescript-inversify" + "title": "Config Options for typescript-inversify", + "sidebar_label": "typescript-inversify" }, "generators/typescript-jquery": { - "title": "generators/typescript-jquery" + "title": "Config Options for typescript-jquery", + "sidebar_label": "typescript-jquery" }, "generators/typescript-node": { - "title": "generators/typescript-node" + "title": "Config Options for typescript-node", + "sidebar_label": "typescript-node" }, "generators/typescript-rxjs": { - "title": "generators/typescript-rxjs" + "title": "Config Options for typescript-rxjs", + "sidebar_label": "typescript-rxjs" }, "installation": { "title": "CLI Installation" diff --git a/website/package.json b/website/package.json index f7df0effef..fe0519b7f4 100644 --- a/website/package.json +++ b/website/package.json @@ -9,11 +9,11 @@ "rename-version": "docusaurus-rename-version" }, "devDependencies": { - "docusaurus": "^1.11.1" + "docusaurus": "^1.13.0" }, "dependencies": { "js-yaml": "^3.12.0", - "lodash.template": "^4.5.0", - "lodash.merge": "^4.6.2" + "lodash.merge": "^4.6.2", + "lodash.template": "^4.5.0" } } diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 1ac295e4d6..9111b5efcd 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -158,7 +158,7 @@ class Index extends React.Component { | \`\`\`bash | docker run --rm \\ | -v \${PWD}:/local openapitools/openapi-generator-cli generate \\ - | -i petstore.yaml \\ + | -i /local/petstore.yaml \\ | -g go \\ | -o /local/out/go | \`\`\` diff --git a/website/sidebars.json b/website/sidebars.json index fbc57e0836..c4bb33d573 100755 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -23,12 +23,10 @@ "swagger-codegen-migration", "fork-qna" ], - "Releases": [ "release-summary", "release-3-0-0" ], - "API": [ "generators" ] diff --git a/website/siteConfig.js b/website/siteConfig.js index 98a32f37d9..2918fe67ed 100755 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -31,6 +31,8 @@ const siteConfig = { gaTrackingId: 'UA-132927057-1', + docsSideNavCollapsible: true, + // For no header links in the top nav bar -> headerLinks: [], headerLinks: [ {doc: 'installation', label: 'Get Started'}, @@ -101,6 +103,11 @@ const siteConfig = { // Show documentation's last update time. enableUpdateTime: true, + scrollToTop: true, + scrollToTopOptions: { + zIndex: 100, + }, + // You may provide arbitrary config keys to be used as needed by your // template. For example, if you need your repo's URL... repoUrl: 'https://github.com/OpenAPITools/openapi-generator', diff --git a/website/yarn.lock b/website/yarn.lock index db52f3b285..bf67884eef 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -2,6 +2,13 @@ # yarn lockfile v1 +"@babel/code-frame@7.5.5", "@babel/code-frame@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" + integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== + dependencies: + "@babel/highlight" "^7.0.0" + "@babel/code-frame@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" @@ -9,22 +16,22 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.0.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687" - integrity sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw== +"@babel/core@^7.5.5": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.4.tgz#6ebd9fe00925f6c3e177bb726a188b5f578088ff" + integrity sha512-Rm0HGw101GY8FTzpWSyRbki/jzq+/PkNQJ+nSulrdY6gFGOsNseCqD6KHRYe2E+EdzuBdr2pxCp6s4Uk6eJ+XQ== dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.2.2" - "@babel/helpers" "^7.2.0" - "@babel/parser" "^7.2.2" - "@babel/template" "^7.2.2" - "@babel/traverse" "^7.2.2" - "@babel/types" "^7.2.2" + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.4" + "@babel/helpers" "^7.6.2" + "@babel/parser" "^7.6.4" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.3" + "@babel/types" "^7.6.3" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" - lodash "^4.17.10" + lodash "^4.17.13" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" @@ -40,6 +47,16 @@ source-map "^0.5.0" trim-right "^1.0.1" +"@babel/generator@^7.6.3", "@babel/generator@^7.6.4": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.4.tgz#a4f8437287bf9671b07f483b76e3bb731bc97671" + integrity sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w== + dependencies: + "@babel/types" "^7.6.3" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -63,34 +80,35 @@ "@babel/types" "^7.0.0" esutils "^2.0.0" -"@babel/helper-call-delegate@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" - integrity sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ== +"@babel/helper-call-delegate@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz#87c1f8ca19ad552a736a7a27b1c1fcf8b1ff1f43" + integrity sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ== dependencies: - "@babel/helper-hoist-variables" "^7.0.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/helper-hoist-variables" "^7.4.4" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" -"@babel/helper-create-class-features-plugin@^7.2.3": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.2.3.tgz#f6e719abb90cb7f4a69591e35fd5eb89047c4a7c" - integrity sha512-xO/3Gn+2C7/eOUeb0VRnSP1+yvWHNxlpAot1eMhtoKDCN7POsyQP5excuT5UsV5daHxMWBeIIOeI5cmB8vMRgQ== +"@babel/helper-create-class-features-plugin@^7.5.5": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.6.0.tgz#769711acca889be371e9bc2eb68641d55218021f" + integrity sha512-O1QWBko4fzGju6VoVvrZg0RROCVifcLxiApnGP3OWfWzvxRZFCoBD81K5ur5e3bVY2Vf/5rIJm8cqPKn8HUJng== dependencies: "@babel/helper-function-name" "^7.1.0" - "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-member-expression-to-functions" "^7.5.5" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.2.3" + "@babel/helper-replace-supers" "^7.5.5" + "@babel/helper-split-export-declaration" "^7.4.4" -"@babel/helper-define-map@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" - integrity sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg== +"@babel/helper-define-map@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz#3dec32c2046f37e09b28c93eb0b103fd2a25d369" + integrity sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg== dependencies: "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.0.0" - lodash "^4.17.10" + "@babel/types" "^7.5.5" + lodash "^4.17.13" "@babel/helper-explode-assignable-expression@^7.1.0": version "7.1.0" @@ -116,19 +134,19 @@ dependencies: "@babel/types" "^7.0.0" -"@babel/helper-hoist-variables@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" - integrity sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w== +"@babel/helper-hoist-variables@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a" + integrity sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.4.4" -"@babel/helper-member-expression-to-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" - integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== +"@babel/helper-member-expression-to-functions@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz#1fb5b8ec4453a93c439ee9fe3aeea4a84b76b590" + integrity sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.5.5" "@babel/helper-module-imports@^7.0.0": version "7.0.0" @@ -149,6 +167,18 @@ "@babel/types" "^7.2.2" lodash "^4.17.10" +"@babel/helper-module-transforms@^7.4.4": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz#f84ff8a09038dcbca1fd4355661a500937165b4a" + integrity sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/template" "^7.4.4" + "@babel/types" "^7.5.5" + lodash "^4.17.13" + "@babel/helper-optimise-call-expression@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" @@ -168,6 +198,13 @@ dependencies: lodash "^4.17.10" +"@babel/helper-regex@^7.4.4": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351" + integrity sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw== + dependencies: + lodash "^4.17.13" + "@babel/helper-remap-async-to-generator@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" @@ -179,15 +216,15 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-replace-supers@^7.1.0", "@babel/helper-replace-supers@^7.2.3": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz#19970020cf22677d62b3a689561dbd9644d8c5e5" - integrity sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA== +"@babel/helper-replace-supers@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz#f84ce43df031222d2bad068d2626cb5799c34bc2" + integrity sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg== dependencies: - "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-member-expression-to-functions" "^7.5.5" "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.2.3" - "@babel/types" "^7.0.0" + "@babel/traverse" "^7.5.5" + "@babel/types" "^7.5.5" "@babel/helper-simple-access@^7.1.0": version "7.1.0" @@ -204,6 +241,13 @@ dependencies: "@babel/types" "^7.0.0" +"@babel/helper-split-export-declaration@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" + integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q== + dependencies: + "@babel/types" "^7.4.4" + "@babel/helper-wrap-function@^7.1.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" @@ -214,14 +258,14 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.2.0" -"@babel/helpers@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21" - integrity sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A== +"@babel/helpers@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.2.tgz#681ffe489ea4dcc55f23ce469e58e59c1c045153" + integrity sha512-3/bAUL8zZxYs1cdX2ilEE0WobqbCmKWr/889lf2SS0PpDcpEIY8pb1CCyz0pEcX3pEb+MCbks1jIokz2xLtGTA== dependencies: - "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.5" - "@babel/types" "^7.2.0" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.2" + "@babel/types" "^7.6.0" "@babel/highlight@^7.0.0": version "7.0.0" @@ -237,6 +281,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489" integrity sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA== +"@babel/parser@^7.6.0", "@babel/parser@^7.6.3", "@babel/parser@^7.6.4": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.4.tgz#cb9b36a7482110282d5cb6dd424ec9262b473d81" + integrity sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A== + "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" @@ -246,14 +295,22 @@ "@babel/helper-remap-async-to-generator" "^7.1.0" "@babel/plugin-syntax-async-generators" "^7.2.0" -"@babel/plugin-proposal-class-properties@^7.0.0": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.2.3.tgz#c9e1294363b346cff333007a92080f3203698461" - integrity sha512-FVuQngLoN2iDrpW7LmhPZ2sO4DJxf35FOcwidwB9Ru9tMvI5URthnkVHuG14IStV+TzkMTyLMoOUlSTtrdVwqw== +"@babel/plugin-proposal-class-properties@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz#a974cfae1e37c3110e71f3c6a2e48b8e71958cd4" + integrity sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A== dependencies: - "@babel/helper-create-class-features-plugin" "^7.2.3" + "@babel/helper-create-class-features-plugin" "^7.5.5" "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-proposal-dynamic-import@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz#e532202db4838723691b10a67b8ce509e397c506" + integrity sha512-x/iMjggsKTFHYC6g11PL7Qy58IK8H5zqfm9e6hu4z1iH2IRyAp9u9dL80zA6R76yFovETFLKz2VJIC2iIPBuFw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-dynamic-import" "^7.2.0" + "@babel/plugin-proposal-json-strings@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" @@ -262,10 +319,10 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.2.0" -"@babel/plugin-proposal-object-rest-spread@^7.0.0", "@babel/plugin-proposal-object-rest-spread@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8" - integrity sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg== +"@babel/plugin-proposal-object-rest-spread@^7.5.5", "@babel/plugin-proposal-object-rest-spread@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.6.2.tgz#8ffccc8f3a6545e9f78988b6bf4fe881b88e8096" + integrity sha512-LDBXlmADCsMZV1Y9OQwMc0MyGZ8Ta/zlD9N67BfQT8uYwkRswiu2hU6nJKrjrt/58aH/vqfQlR/9yId/7A2gWw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" @@ -278,14 +335,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" -"@babel/plugin-proposal-unicode-property-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520" - integrity sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw== +"@babel/plugin-proposal-unicode-property-regex@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.6.2.tgz#05413762894f41bfe42b9a5e80919bd575dcc802" + integrity sha512-NxHETdmpeSCtiatMRYWVJo7266rrvAC3DTeG5exQBIH/fMIUK7ejDNznBbn3HQl/o9peymRRg7Yqkx6PdUXmMw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.2.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.6.0" "@babel/plugin-syntax-async-generators@^7.2.0": version "7.2.0" @@ -294,6 +351,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-dynamic-import@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" + integrity sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-json-strings@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" @@ -329,10 +393,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-async-to-generator@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff" - integrity sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ== +"@babel/plugin-transform-async-to-generator@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz#89a3848a0166623b5bc481164b5936ab947e887e" + integrity sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -345,26 +409,26 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4" - integrity sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q== +"@babel/plugin-transform-block-scoping@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.3.tgz#6e854e51fbbaa84351b15d4ddafe342f3a5d542a" + integrity sha512-7hvrg75dubcO3ZI2rjYTzUrEuh1E9IyDEhhB6qfcooxhDA33xx2MasuLVgdxzcP6R/lipAC6n9ub9maNW6RKdw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - lodash "^4.17.10" + lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.2.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz#6c90542f210ee975aa2aa8c8b5af7fa73a126953" - integrity sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ== +"@babel/plugin-transform-classes@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz#d094299d9bd680a14a2a0edae38305ad60fb4de9" + integrity sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.1.0" + "@babel/helper-define-map" "^7.5.5" "@babel/helper-function-name" "^7.1.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/helper-replace-supers" "^7.5.5" + "@babel/helper-split-export-declaration" "^7.4.4" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.2.0": @@ -374,26 +438,26 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-destructuring@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3" - integrity sha512-coVO2Ayv7g0qdDbrNiadE4bU7lvCd9H539m2gMknyVjjMdwF/iCOM7R+E8PkntoqLkltO0rk+3axhpp/0v68VQ== +"@babel/plugin-transform-destructuring@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.6.0.tgz#44bbe08b57f4480094d57d9ffbcd96d309075ba6" + integrity sha512-2bGIS5P1v4+sWTCnKNDZDxbGvEqi0ijeqM/YqHtVGrvG2y0ySgnEEhXErvE9dA0bnIzY9bIzdFK0jFA46ASIIQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49" - integrity sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ== +"@babel/plugin-transform-dotall-regex@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.6.2.tgz#44abb948b88f0199a627024e1508acaf8dc9b2f9" + integrity sha512-KGKT9aqKV+9YMZSkowzYoYEiHqgaDhGmPNZlZxX6UeHC4z30nC1J9IrZuGqbYFB1jaIGdv91ujpze0exiVK8bA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.6.0" -"@babel/plugin-transform-duplicate-keys@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3" - integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw== +"@babel/plugin-transform-duplicate-keys@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz#c5dbf5106bf84cdf691222c0974c12b1df931853" + integrity sha512-igcziksHizyQPlX9gfSjHkE2wmoCH3evvD2qR5w29/Dk0SMKE/eOI7f1HhBdNhR/zxJDqrgpoDTq5YSLH/XMsQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -405,17 +469,17 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-for-of@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" - integrity sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ== +"@babel/plugin-transform-for-of@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz#0267fc735e24c808ba173866c6c4d1440fc3c556" + integrity sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-function-name@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" - integrity sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ== +"@babel/plugin-transform-function-name@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz#e1436116abb0610c2259094848754ac5230922ad" + integrity sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -427,30 +491,40 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-amd@^7.2.0": +"@babel/plugin-transform-member-expression-literals@^7.2.0": version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" - integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw== + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz#fa10aa5c58a2cb6afcf2c9ffa8cb4d8b3d489a2d" + integrity sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-amd@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz#ef00435d46da0a5961aa728a1d2ecff063e4fb91" + integrity sha512-n20UsQMKnWrltocZZm24cRURxQnWIvsABPJlw/fvoy9c6AgHZzoelAIzajDHAQrDpuKFFPPcFGd7ChsYuIUMpg== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" + babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-commonjs@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" - integrity sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ== +"@babel/plugin-transform-modules-commonjs@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.6.0.tgz#39dfe957de4420445f1fcf88b68a2e4aa4515486" + integrity sha512-Ma93Ix95PNSEngqomy5LSBMAQvYKVe3dy+JlVJSHEXZR5ASL9lQBedMiCyVtmTLraIDVRE3ZjTZvmXXD2Ozw3g== dependencies: - "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-module-transforms" "^7.4.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" + babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-systemjs@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz#912bfe9e5ff982924c81d0937c92d24994bb9068" - integrity sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ== +"@babel/plugin-transform-modules-systemjs@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.5.0.tgz#e75266a13ef94202db2a0620977756f51d52d249" + integrity sha512-Q2m56tyoQWmuNGxEtUyeEkm6qJYFqs4c+XyXH5RAuYxObRNz9Zgj/1g2GMnjYp2EUyEy7YTrxliGCXzecl/vJg== dependencies: - "@babel/helper-hoist-variables" "^7.0.0" + "@babel/helper-hoist-variables" "^7.4.4" "@babel/helper-plugin-utils" "^7.0.0" + babel-plugin-dynamic-import-node "^2.3.0" "@babel/plugin-transform-modules-umd@^7.2.0": version "7.2.0" @@ -460,30 +534,44 @@ "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-new-target@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" - integrity sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw== +"@babel/plugin-transform-named-capturing-groups-regex@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.3.tgz#aaa6e409dd4fb2e50b6e2a91f7e3a3149dbce0cf" + integrity sha512-jTkk7/uE6H2s5w6VlMHeWuH+Pcy2lmdwFoeWCVnvIrDUnB5gQqTVI8WfmEAhF2CDEarGrknZcmSFg1+bkfCoSw== + dependencies: + regexpu-core "^4.6.0" + +"@babel/plugin-transform-new-target@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz#18d120438b0cc9ee95a47f2c72bc9768fbed60a5" + integrity sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-object-super@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" - integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== +"@babel/plugin-transform-object-super@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz#c70021df834073c65eb613b8679cc4a381d1a9f9" + integrity sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-replace-supers" "^7.5.5" -"@babel/plugin-transform-parameters@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2" - integrity sha512-kB9+hhUidIgUoBQ0MsxMewhzr8i60nMa2KgeJKQWYrqQpqcBYtnpR+JgkadZVZoaEZ/eKu9mclFaVwhRpLNSzA== +"@babel/plugin-transform-parameters@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz#7556cf03f318bd2719fe4c922d2d808be5571e16" + integrity sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw== dependencies: - "@babel/helper-call-delegate" "^7.1.0" + "@babel/helper-call-delegate" "^7.4.4" "@babel/helper-get-function-arity" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-property-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz#03e33f653f5b25c4eb572c98b9485055b389e905" + integrity sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-react-display-name@^7.0.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.2.0.tgz#ebfaed87834ce8dc4279609a4f0c324c156e3eb0" @@ -516,12 +604,19 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.2.0" -"@babel/plugin-transform-regenerator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" - integrity sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw== +"@babel/plugin-transform-regenerator@^7.4.5": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz#629dc82512c55cee01341fb27bdfcb210354680f" + integrity sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA== dependencies: - regenerator-transform "^0.13.3" + regenerator-transform "^0.14.0" + +"@babel/plugin-transform-reserved-words@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz#4792af87c998a49367597d07fedf02636d2e1634" + integrity sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-shorthand-properties@^7.2.0": version "7.2.0" @@ -530,10 +625,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-spread@^7.2.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" - integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== +"@babel/plugin-transform-spread@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.6.2.tgz#fc77cf798b24b10c46e1b51b1b88c2bf661bb8dd" + integrity sha512-DpSvPFryKdK1x+EDJYCy28nmAaIMdxmhot62jAXF/o99iA33Zj2Lmcp3vDmz+MUh0LNYVPvfj5iC3feb3/+PFg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -545,10 +640,10 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" -"@babel/plugin-transform-template-literals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" - integrity sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg== +"@babel/plugin-transform-template-literals@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz#9d28fea7bbce637fb7612a0750989d8321d4bcb0" + integrity sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -560,69 +655,78 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-unicode-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" - integrity sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA== +"@babel/plugin-transform-unicode-regex@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.6.2.tgz#b692aad888a7e8d8b1b214be6b9dc03d5031f698" + integrity sha512-orZI6cWlR3nk2YmYdb0gImrgCUwb5cBUwjf6Ks6dvNVvXERkwtJWOQaEOjPiu0Gu1Tq6Yq/hruCZZOOi9F34Dw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.6.0" -"@babel/polyfill@^7.0.0": - version "7.2.5" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.2.5.tgz#6c54b964f71ad27edddc567d065e57e87ed7fa7d" - integrity sha512-8Y/t3MWThtMLYr0YNC/Q76tqN1w30+b0uQMeFUYauG2UGTR19zyUtFrAzT23zNtBxPp+LbE5E/nwV/q/r3y6ug== +"@babel/polyfill@^7.4.4": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.6.0.tgz#6d89203f8b6cd323e8d946e47774ea35dc0619cc" + integrity sha512-q5BZJI0n/B10VaQQvln1IlDK3BTBJFbADx7tv+oXDPIDZuTo37H5Adb9jhlXm/fEN4Y7/64qD9mnrJJG7rmaTw== dependencies: - core-js "^2.5.7" - regenerator-runtime "^0.12.0" + core-js "^2.6.5" + regenerator-runtime "^0.13.2" -"@babel/preset-env@^7.0.0": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.3.tgz#948c8df4d4609c99c7e0130169f052ea6a7a8933" - integrity sha512-AuHzW7a9rbv5WXmvGaPX7wADxFkZIqKlbBh1dmZUQp4iwiPpkE/Qnrji6SC4UQCQzvWY/cpHET29eUhXS9cLPw== +"@babel/preset-env@^7.5.5": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.6.3.tgz#9e1bf05a2e2d687036d24c40e4639dc46cef2271" + integrity sha512-CWQkn7EVnwzlOdR5NOm2+pfgSNEZmvGjOhlCHBDq0J8/EStr+G+FvPEiz9B56dR6MoiUFjXhfE4hjLoAKKJtIQ== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-dynamic-import" "^7.5.0" "@babel/plugin-proposal-json-strings" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread" "^7.6.2" "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.2.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.6.2" "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/plugin-syntax-dynamic-import" "^7.2.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" "@babel/plugin-transform-arrow-functions" "^7.2.0" - "@babel/plugin-transform-async-to-generator" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.5.0" "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.2.0" - "@babel/plugin-transform-classes" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.6.3" + "@babel/plugin-transform-classes" "^7.5.5" "@babel/plugin-transform-computed-properties" "^7.2.0" - "@babel/plugin-transform-destructuring" "^7.2.0" - "@babel/plugin-transform-dotall-regex" "^7.2.0" - "@babel/plugin-transform-duplicate-keys" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.6.0" + "@babel/plugin-transform-dotall-regex" "^7.6.2" + "@babel/plugin-transform-duplicate-keys" "^7.5.0" "@babel/plugin-transform-exponentiation-operator" "^7.2.0" - "@babel/plugin-transform-for-of" "^7.2.0" - "@babel/plugin-transform-function-name" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.4.4" + "@babel/plugin-transform-function-name" "^7.4.4" "@babel/plugin-transform-literals" "^7.2.0" - "@babel/plugin-transform-modules-amd" "^7.2.0" - "@babel/plugin-transform-modules-commonjs" "^7.2.0" - "@babel/plugin-transform-modules-systemjs" "^7.2.0" + "@babel/plugin-transform-member-expression-literals" "^7.2.0" + "@babel/plugin-transform-modules-amd" "^7.5.0" + "@babel/plugin-transform-modules-commonjs" "^7.6.0" + "@babel/plugin-transform-modules-systemjs" "^7.5.0" "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-new-target" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.2.0" - "@babel/plugin-transform-parameters" "^7.2.0" - "@babel/plugin-transform-regenerator" "^7.0.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.6.3" + "@babel/plugin-transform-new-target" "^7.4.4" + "@babel/plugin-transform-object-super" "^7.5.5" + "@babel/plugin-transform-parameters" "^7.4.4" + "@babel/plugin-transform-property-literals" "^7.2.0" + "@babel/plugin-transform-regenerator" "^7.4.5" + "@babel/plugin-transform-reserved-words" "^7.2.0" "@babel/plugin-transform-shorthand-properties" "^7.2.0" - "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-spread" "^7.6.2" "@babel/plugin-transform-sticky-regex" "^7.2.0" - "@babel/plugin-transform-template-literals" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.4.4" "@babel/plugin-transform-typeof-symbol" "^7.2.0" - "@babel/plugin-transform-unicode-regex" "^7.2.0" - browserslist "^4.3.4" + "@babel/plugin-transform-unicode-regex" "^7.6.2" + "@babel/types" "^7.6.3" + browserslist "^4.6.0" + core-js-compat "^3.1.1" invariant "^2.2.2" js-levenshtein "^1.1.3" - semver "^5.3.0" + semver "^5.5.0" "@babel/preset-react@^7.0.0": version "7.0.0" @@ -635,20 +739,18 @@ "@babel/plugin-transform-react-jsx-self" "^7.0.0" "@babel/plugin-transform-react-jsx-source" "^7.0.0" -"@babel/register@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0.tgz#fa634bae1bfa429f60615b754fc1f1d745edd827" - integrity sha512-f/+CRmaCe7rVEvcvPvxeA8j5aJhHC3aJie7YuqcMDhUOuyWLA7J/aNrTaHIzoWPEhpHA54mec4Mm8fv8KBlv3g== +"@babel/register@^7.5.5": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.6.2.tgz#25765a922202cb06f8bdac5a3b1e70cd6bf3dd45" + integrity sha512-xgZk2LRZvt6i2SAUWxc7ellk4+OYRgS3Zpsnr13nMS1Qo25w21Uu8o6vTOAqNaxiqrnv30KTYzh9YWY2k21CeQ== dependencies: - core-js "^2.5.7" - find-cache-dir "^1.0.0" - home-or-tmp "^3.0.0" - lodash "^4.17.10" + find-cache-dir "^2.0.0" + lodash "^4.17.13" mkdirp "^0.5.1" pirates "^4.0.0" source-map-support "^0.5.9" -"@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": +"@babel/template@^7.1.0", "@babel/template@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g== @@ -657,7 +759,16 @@ "@babel/parser" "^7.2.2" "@babel/types" "^7.2.2" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2", "@babel/traverse@^7.2.3": +"@babel/template@^7.4.4", "@babel/template@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" + integrity sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" + +"@babel/traverse@^7.1.0": version "7.2.3" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8" integrity sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw== @@ -672,7 +783,22 @@ globals "^11.1.0" lodash "^4.17.10" -"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.2.0", "@babel/types@^7.2.2": +"@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5", "@babel/traverse@^7.6.2", "@babel/traverse@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.3.tgz#66d7dba146b086703c0fb10dd588b7364cec47f9" + integrity sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.3" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.6.3" + "@babel/types" "^7.6.3" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" integrity sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg== @@ -681,6 +807,15 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" +"@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0", "@babel/types@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.3.tgz#3f07d96f854f98e2fbd45c64b0cb942d11e8ba09" + integrity sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -709,6 +844,11 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.1.tgz#48fd98c1561fe718b61733daed46ff115b496e18" integrity sha512-eqz8c/0kwNi/OEHQfvIuJVLTst3in0e7uTKeuY+WL/zfKn0xVujOTp42bS/vUUokhK5P2BppLd9JXMOMHcgbjA== +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -717,7 +857,12 @@ accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -address@1.0.3, address@^1.0.1: +address@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== + +address@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" integrity sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg== @@ -737,10 +882,10 @@ alphanum-sort@^1.0.0: resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= -ansi-escapes@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" - integrity sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw== +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== ansi-red@^0.1.1: version "0.1.1" @@ -759,6 +904,11 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -776,14 +926,27 @@ ansi-wrap@0.1.0: resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= -anymatch@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.0.3.tgz#2fb624fe0e84bccab00afee3d0006ed310f22f09" - integrity sha512-c6IvoeBECQlMVuYUjSwimnhmztImpErfxJzWZhIQinIvQWoGOnB0dLIgifbPHQt5heS6mNlaZG16f06H3C8t1g== +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + arch@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.1.tgz#8f5c2731aa35a30929221bb0640eed65175ec84e" @@ -796,7 +959,15 @@ archive-type@^4.0.0: dependencies: file-type "^4.2.0" -argparse@^1.0.7: +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.10, argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -826,11 +997,6 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-filter@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" - integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= - array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" @@ -841,16 +1007,6 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -array-map@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" - integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI= - -array-reduce@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" - integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= - array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -895,10 +1051,17 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= -async@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +async@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" asynckit@^0.4.0: version "0.4.0" @@ -915,18 +1078,25 @@ autolinker@~0.15.0: resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.15.3.tgz#342417d8f2f3461b14cf09088d5edf8791dc9832" integrity sha1-NCQX2PLzRhsUzwkIjV7fh5HcmDI= -autoprefixer@^9.6.0: - version "9.6.1" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47" - integrity sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw== +autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha1-BlK0kYgYefB3XazgzcoyM5QqTkc= dependencies: - browserslist "^4.6.3" - caniuse-lite "^1.0.30000980" + gulp-header "^1.7.1" + +autoprefixer@^9.6.1: + version "9.6.5" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.5.tgz#98f4afe7e93cccf323287515d426019619775e5e" + integrity sha512-rGd50YV8LgwFQ2WQp4XzOTG69u1qQsXn0amww7tjqV5jJuNazgFKYEVItEBngyyvVITKOg20zr2V+9VsrXJQ2g== + dependencies: + browserslist "^4.7.0" + caniuse-lite "^1.0.30000999" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.17" - postcss-value-parser "^4.0.0" + postcss "^7.0.18" + postcss-value-parser "^4.0.2" aws-sign2@~0.7.0: version "0.7.0" @@ -938,7 +1108,7 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== -babel-code-frame@6.26.0: +babel-code-frame@^6.22.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= @@ -947,7 +1117,14 @@ babel-code-frame@6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babylon@^6.17.4: +babel-plugin-dynamic-import-node@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" + integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== + dependencies: + object.assign "^4.1.0" + +babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== @@ -982,6 +1159,11 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + bin-build@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-3.0.0.tgz#c5780a25a8a9f966d8244217e6c1f5082a143861" @@ -1030,6 +1212,11 @@ bin-wrapper@^4.0.0: os-filter-obj "^2.0.0" pify "^4.0.1" +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + binary-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" @@ -1074,7 +1261,7 @@ boolbase@^1.0.0, boolbase@~1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -brace-expansion@^1.0.0, brace-expansion@^1.1.7: +brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== @@ -1082,7 +1269,7 @@ brace-expansion@^1.0.0, brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^2.3.1: +braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== @@ -1098,14 +1285,23 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.2: +braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" -browserslist@^4.0.0, browserslist@^4.6.3: +browserslist@4.7.0, browserslist@^4.6.0, browserslist@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" + integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== + dependencies: + caniuse-lite "^1.0.30000989" + electron-to-chromium "^1.3.247" + node-releases "^1.1.29" + +browserslist@^4.0.0: version "4.6.4" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.4.tgz#fd0638b3f8867fec2c604ed0ed9300379f8ec7c2" integrity sha512-ErJT8qGfRt/VWHSr1HeqZzz50DvxHtr1fVL1m5wf20aGrG8e1ce8fpZ2EjZEfs09DDZYSvtRaDlMpWslBf8Low== @@ -1114,15 +1310,6 @@ browserslist@^4.0.0, browserslist@^4.6.3: electron-to-chromium "^1.3.188" node-releases "^1.1.25" -browserslist@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.6.tgz#0f9d9081afc66b36f477c6bdf3813f784f42396a" - integrity sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw== - dependencies: - caniuse-lite "^1.0.30000921" - electron-to-chromium "^1.3.92" - node-releases "^1.1.1" - buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" @@ -1249,15 +1436,15 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000981: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981: version "1.0.30000983" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000983.tgz#ab3c70061ca2a3467182a10ac75109b199b647f8" integrity sha512-/llD1bZ6qwNkt41AsvjsmwNOoA4ZB+8iqmf5LVyeSXuBODT/hAMFNVOh84NdUzoiYiSKqo5vQ3ZzeYHSi/olDQ== -caniuse-lite@^1.0.30000921: - version "1.0.30000923" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000923.tgz#148f9bda508024b5ce957b463ae2e8302b451bb2" - integrity sha512-j5ur7eeluOFjjPUkydtXP4KFAsmH3XaQNch5tvWSO+dLHYt5PE+VgJZLWtbVOodfWij6m6zas28T4gB/cLYq1w== +caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000999: + version "1.0.30000999" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" + integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== caseless@~0.12.0: version "0.12.0" @@ -1274,7 +1461,16 @@ caw@^2.0.0, caw@^2.0.1: tunnel-agent "^0.6.0" url-to-options "^1.0.1" -chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.3: +chalk@2.4.2, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= @@ -1294,19 +1490,10 @@ chalk@^2.0.0, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== cheerio@0.22.0: version "0.22.0" @@ -1330,20 +1517,44 @@ cheerio@0.22.0: lodash.reject "^4.4.0" lodash.some "^4.4.0" -chokidar@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.0.2.tgz#0d1cd6d04eb2df0327446188cd13736a3367d681" - integrity sha512-c4PR2egjNjI1um6bamCQ6bUNPDiyofNQruHvKgHQ4gDUP/ITSVSzNsiI5OWtHOsX323i5ha/kk4YmOZ1Ktg7KA== +chokidar@^2.0.4: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== dependencies: - anymatch "^3.0.1" - braces "^3.0.2" - glob-parent "^5.0.0" - is-binary-path "^2.1.0" - is-glob "^4.0.1" + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" normalize-path "^3.0.0" - readdirp "^3.1.1" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" optionalDependencies: - fsevents "^2.0.6" + fsevents "^1.2.7" + +chokidar@^3.0.2: + version "3.2.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.2.1.tgz#4634772a1924512d990d4505957bf3a510611387" + integrity sha512-/j5PPkb5Feyps9e+jo07jUZGvkB5Aj953NrI4s8xSVScrAo/RHeILrtdb4uzR7N6aaFFxxJ+gt8mA8HfNpw76w== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.1.3" + optionalDependencies: + fsevents "~2.1.0" + +chownr@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" + integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== class-utils@^0.3.5: version "0.3.6" @@ -1397,6 +1608,11 @@ coa@^2.0.2, coa@~2.0.1: chalk "^2.4.1" q "^1.1.2" +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + coffee-script@^1.12.4: version "1.12.7" resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.12.7.tgz#c05dae0cb79591d05b3070a8433a98c9a89ccc53" @@ -1505,6 +1721,13 @@ concat-stream@^1.5.2: readable-stream "^2.2.2" typedarray "^0.0.6" +concat-with-sourcemaps@*: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + config-chain@^1.1.11: version "1.1.12" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" @@ -1513,6 +1736,11 @@ config-chain@^1.1.11: ini "^1.3.4" proto-list "~1.2.1" +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + console-stream@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44" @@ -1557,10 +1785,18 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -core-js@^2.5.7: - version "2.6.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.1.tgz#87416ae817de957a3f249b3b5ca475d4aaed6042" - integrity sha512-L72mmmEayPJBejKIWe2pYtGis5r0tQ5NaJekdhyXgeMQTpJoBsH0NL4ElY2LfSoV15xeQWKQ+XTTOZdyero5Xg== +core-js-compat@^3.1.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.3.2.tgz#1096c989c1b929ede06b5b6b4768dc4439078c03" + integrity sha512-gfiK4QnNXhnnHVOIZst2XHdFfdMTPxtR0EGs0TdILMlGIft+087oH6/Sw2xTTIjpWXC9vEwsJA8VG3XTGcmO5g== + dependencies: + browserslist "^4.7.0" + semver "^6.3.0" + +core-js@^2.6.5: + version "2.6.10" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.10.tgz#8a5b8391f8cc7013da703411ce5b585706300d7f" + integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -1577,16 +1813,7 @@ cosmiconfig@^5.0.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cross-spawn@5.1.0, cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^6.0.0, cross-spawn@^6.0.5: +cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -1597,6 +1824,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + crowdin-cli@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/crowdin-cli/-/crowdin-cli-0.3.0.tgz#eac9989a6fe7feaaf33090397afc187c67b46191" @@ -1738,7 +1974,7 @@ cssnano-util-same-parent@^4.0.0: resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== -cssnano@^4.1.0: +cssnano@^4.1.10: version "4.1.10" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" integrity sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ== @@ -1769,19 +2005,21 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -debug@0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" - integrity sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk= - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@^3.1.0: +debug@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" + integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== + dependencies: + ms "^2.1.1" + +debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -1865,10 +2103,15 @@ decompress@^4.0.0, decompress@^4.2.0: pify "^2.3.0" strip-dirs "^2.0.0" -deep-is@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.2.tgz#9ced65ea0bc0b09f42a6d79c1b1903f9d913cc18" - integrity sha1-nO1l6gvAsJ9CptecGxkD+dkTzBg= +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" @@ -1909,6 +2152,11 @@ delegate@^3.1.2: resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -1919,6 +2167,11 @@ destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + detect-port-alt@1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" @@ -1940,59 +2193,60 @@ dir-glob@2.0.0: arrify "^1.0.1" path-type "^3.0.0" -docusaurus@^1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/docusaurus/-/docusaurus-1.11.1.tgz#786bae93946bc21ab7ef457c5672e2e2bd930b25" - integrity sha512-oIdftD4E8dnzXcNohTdE6MICsiJIR1pAmKa/sRHDiG3T3v8f2eiq9nt88CidSIPpyEw50TbCr3bOoExHS90UGg== +docusaurus@^1.13.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/docusaurus/-/docusaurus-1.13.0.tgz#628c4491227ec422400b7421961b8603e389a2ae" + integrity sha512-3L/0p7CVM4jzAKoUzDDO4IFvLAJ6aA/8zin00tvLk32VQSdw+6S8JggE2ZFKOg+c+oxQ5MQUnsUxL/n5HyBtVg== dependencies: - "@babel/core" "^7.0.0" - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/polyfill" "^7.0.0" - "@babel/preset-env" "^7.0.0" + "@babel/core" "^7.5.5" + "@babel/plugin-proposal-class-properties" "^7.5.5" + "@babel/plugin-proposal-object-rest-spread" "^7.5.5" + "@babel/polyfill" "^7.4.4" + "@babel/preset-env" "^7.5.5" "@babel/preset-react" "^7.0.0" - "@babel/register" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.1.2" - autoprefixer "^9.6.0" - babylon "^6.17.4" + "@babel/register" "^7.5.5" + "@babel/traverse" "^7.5.5" + "@babel/types" "^7.5.5" + autoprefixer "^9.6.1" + babylon "^6.18.0" chalk "^2.4.2" - chokidar "^3.0.1" + chokidar "^3.0.2" classnames "^2.2.6" color "^2.0.1" commander "^2.20.0" cross-spawn "^6.0.5" crowdin-cli "^0.3.0" - cssnano "^4.1.0" - escape-string-regexp "^1.0.5" + cssnano "^4.1.10" + escape-string-regexp "^2.0.0" express "^4.17.1" feed "^1.1.0" - fs-extra "^5.0.0" - gaze "^1.1.2" + fs-extra "^8.1.0" + gaze "^1.1.3" glob "^7.1.3" - highlight.js "^9.12.0" + highlight.js "^9.15.8" imagemin "^6.0.0" imagemin-gifsicle "^6.0.1" imagemin-jpegtran "^6.0.0" imagemin-optipng "^6.0.0" imagemin-svgo "^7.0.0" - lodash "^4.17.11" + lodash "^4.17.15" markdown-toc "^1.2.0" mkdirp "^0.5.1" - portfinder "^1.0.17" - postcss "^7.0.1" - prismjs "^1.15.0" - react "^16.5.0" - react-dev-utils "^5.0.2" - react-dom "^16.5.0" - remarkable "^1.7.1" - request "^2.87.0" + portfinder "^1.0.21" + postcss "^7.0.17" + prismjs "^1.17.1" + react "^16.8.4" + react-dev-utils "^9.0.1" + react-dom "^16.8.4" + remarkable "^1.7.4" + request "^2.88.0" shelljs "^0.8.3" - sitemap "^1.13.0" - tcp-port-used "^0.1.2" + sitemap "^3.2.2" + striptags "^3.1.1" + tcp-port-used "^1.0.1" tiny-lr "^1.1.1" tree-node-cli "^1.2.5" - truncate-html "^1.0.1" + truncate-html "^1.0.2" dom-serializer@0, dom-serializer@~0.1.0: version "0.1.0" @@ -2105,10 +2359,15 @@ electron-to-chromium@^1.3.188: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.190.tgz#5bf599519983bfffd9d4387817039a3ed7ca085f" integrity sha512-cs9WnTnGBGnYYVFMCtLmr9jXNTOkdp95RLz5VhwzDn7dErg1Lnt9o4d01gEH69XlmRKWUr91Yu1hA+Hi8qW0PA== -electron-to-chromium@^1.3.92: - version "1.3.96" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.96.tgz#25770ec99b8b07706dedf3a5f43fa50cb54c4f9a" - integrity sha512-ZUXBUyGLeoJxp4Nt6G/GjBRLnyz8IKQGexZ2ndWaoegThgMGFO1tdDYID5gBV32/1S83osjJHyfzvanE/8HY4Q== +electron-to-chromium@^1.3.247: + version "1.3.282" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.282.tgz#16118ae9c79a32ea93a17591d5b16e28d10fc08d" + integrity sha512-irSaDeCGgfMu1OA30bhqIBr+dx+pDJjRbwCpob7YWqVZbzXblybNzPGklVnWqv4EXxbkEAzQYqiNCqNTgu00lQ== + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= encodeurl@~1.0.2: version "1.0.2" @@ -2184,6 +2443,11 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -2199,12 +2463,12 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= -eventsource@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" - integrity sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI= +eventsource@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" + integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== dependencies: - original ">=0.0.5" + original "^1.0.0" exec-buffer@^3.0.0: version "3.2.0" @@ -2270,13 +2534,6 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" - integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= - dependencies: - homedir-polyfill "^1.0.1" - express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -2348,13 +2605,13 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^2.0.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" - integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" + chardet "^0.7.0" + iconv-lite "^0.4.24" tmp "^0.0.33" extglob@^2.0.4: @@ -2410,10 +2667,10 @@ faye-websocket@~0.10.0: dependencies: websocket-driver ">=0.5.1" -faye-websocket@~0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" - integrity sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg= +faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== dependencies: websocket-driver ">=0.5.1" @@ -2490,10 +2747,10 @@ filenamify@^2.0.0: strip-outer "^1.0.0" trim-repeated "^1.0.0" -filesize@3.5.11: - version "3.5.11" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee" - integrity sha512-ZH7loueKBoDb7yG9esn1U+fgq7BzlzW6NRi5/rMdxIZ05dj7GFD/Xc5rq2CDt5Yq86CyfSYVyx4242QQNZbx1g== +filesize@3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" + integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== fill-range@^2.1.0: version "2.2.4" @@ -2536,14 +2793,21 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-cache-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" - integrity sha1-kojj6ePMN0hxfTnq3hfPcfww7m8= +find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== dependencies: commondir "^1.0.1" - make-dir "^1.0.0" - pkg-dir "^2.0.0" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" find-up@^1.0.0: version "1.1.2" @@ -2578,6 +2842,20 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +fork-ts-checker-webpack-plugin@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.5.0.tgz#ce1d77190b44d81a761b10b6284a373795e41f0c" + integrity sha512-zEhg7Hz+KhZlBhILYpXy+Beu96gwvkROWJiTXOCyOOMMrdBIRPvsBpBqgTI4jfJGrJXcqGwJR8zsBGDmzY0jsA== + dependencies: + babel-code-frame "^6.22.0" + chalk "^2.4.1" + chokidar "^2.0.4" + micromatch "^3.1.10" + minimatch "^3.0.4" + semver "^5.6.0" + tapable "^1.0.0" + worker-rpc "^0.1.0" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -2617,31 +2895,60 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" - integrity sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ== +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== dependencies: - graceful-fs "^4.1.2" + graceful-fs "^4.2.0" jsonfile "^4.0.0" universalify "^0.1.0" +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.0.6: - version "2.0.7" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.0.7.tgz#382c9b443c6cbac4c57187cdda23aa3bf1ccfc2a" - integrity sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ== +fsevents@^1.2.7: + version "1.2.9" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" + integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== + dependencies: + nan "^2.12.1" + node-pre-gyp "^0.12.0" + +fsevents@~2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.1.tgz#74c64e21df71721845d0c44fe54b7f56b82995a9" + integrity sha512-4FRPXWETxtigtJW/gxzEDsX1LVbPAM93VleB83kZB+ellqbHMkyt2aJfuzNLRvFPnGi6bcE5SvfxgbXPeKteJw== function-bind@^1.1.0, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -gaze@^1.1.2: +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gaze@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" integrity sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g== @@ -2710,10 +3017,10 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954" - integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg== +glob-parent@~5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" + integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== dependencies: is-glob "^4.0.1" @@ -2746,32 +3053,28 @@ glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -global-modules@1.0.0, global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== +global-modules@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" + global-prefix "^3.0.0" -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" - integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" globals@^11.1.0: version "11.9.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249" integrity sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg== -globby@^8.0.1: +globby@8.0.2, globby@^8.0.1: version "8.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d" integrity sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w== @@ -2848,6 +3151,11 @@ graceful-fs@^4.1.10: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== +graceful-fs@^4.1.11, graceful-fs@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" + integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== + graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" @@ -2869,12 +3177,22 @@ gray-matter@^2.1.0: js-yaml "^3.8.1" toml "^2.3.2" -gzip-size@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520" - integrity sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA= +gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + +gzip-size@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" + integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== dependencies: duplexer "^0.1.1" + pify "^4.0.1" har-schema@^2.0.0: version "2.0.0" @@ -2918,6 +3236,11 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -2961,22 +3284,10 @@ hex-color-regex@^1.1.0: resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== -highlight.js@^9.12.0: - version "9.13.1" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e" - integrity sha512-Sc28JNQNDzaH6PORtRLMvif9RSn1mYuOoX3omVjnb0+HbpPygU2ALBI0R/wsiqCb4/fcp07Gdo8g+fhtFrQl6A== - -home-or-tmp@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb" - integrity sha1-V6j+JM8zzdUkhgoVgh3cJchmcfs= - -homedir-polyfill@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" - integrity sha1-TCu8inWJmP7r9e1oWA921GdotLw= - dependencies: - parse-passwd "^1.0.0" +highlight.js@^9.15.8: + version "9.15.10" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.10.tgz#7b18ed75c90348c045eef9ed08ca1319a2219ad2" + integrity sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw== hosted-git-info@^2.1.4: version "2.7.1" @@ -3051,7 +3362,7 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -iconv-lite@0.4.24, iconv-lite@^0.4.17: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -3063,6 +3374,13 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== +ignore-walk@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== + dependencies: + minimatch "^3.0.4" + ignore@^3.3.5: version "3.3.10" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" @@ -3115,6 +3433,11 @@ imagemin@^6.0.0: pify "^4.0.1" replace-ext "^1.0.0" +immer@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/immer/-/immer-1.10.0.tgz#bad67605ba9c810275d91e1c2a47d4582e98286d" + integrity sha512-O3sR1/opvCDGLEVcvrGTMtLac8GJ5IwZC4puPrLuRj3l7ICKvkmA0vGuU9OW8mV9WIBRnaxp5GJh9IEAaNOoYg== + import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -3158,29 +3481,28 @@ inherits@2.0.4: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.4: +ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -inquirer@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - integrity sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== +inquirer@6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.0.tgz#2303317efc9a4ea7ec2e2df6f86569b734accf42" + integrity sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA== dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" + ansi-escapes "^3.2.0" + chalk "^2.4.2" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^2.0.4" + external-editor "^3.0.3" figures "^2.0.0" - lodash "^4.3.0" + lodash "^4.17.12" mute-stream "0.0.7" run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" + rxjs "^6.4.0" string-width "^2.1.0" - strip-ansi "^4.0.0" + strip-ansi "^5.1.0" through "^2.3.6" interpret@^1.0.0: @@ -3203,6 +3525,11 @@ invariant@^2.2.2: dependencies: loose-envify "^1.0.0" +ip-regex@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" + integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= + ipaddr.js@1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" @@ -3237,7 +3564,14 @@ is-arrayish@^0.3.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== -is-binary-path@^2.1.0: +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== @@ -3339,6 +3673,13 @@ is-finite@^1.0.0: dependencies: number-is-nan "^1.0.0" +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" @@ -3358,7 +3699,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -3448,10 +3789,10 @@ is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= -is-root@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-root/-/is-root-1.0.0.tgz#07b6c233bc394cd9d02ba15c966bd6660d6342d5" - integrity sha1-B7bCM7w5TNnQK6FclmvWZg1jQtU= +is-root@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" + integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== is-stream@^1.0.0, is-stream@^1.1.0: version "1.1.0" @@ -3477,12 +3818,17 @@ is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-url@^1.2.2: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== + is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-windows@^1.0.1, is-windows@^1.0.2: +is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -3492,12 +3838,14 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= -is2@0.0.9: - version "0.0.9" - resolved "https://registry.yarnpkg.com/is2/-/is2-0.0.9.tgz#119556d1d1651a41ba105af803267c80b299f629" - integrity sha1-EZVW0dFlGkG6EFr4AyZ8gLKZ9ik= +is2@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.1.tgz#8ac355644840921ce435d94f05d3a94634d3481a" + integrity sha512-+WaJvnaA7aJySz2q/8sLjMb2Mw14KTplHmSwcSpZ/fWJPkUmqw3YTzSWbPJ7OAwRvdYTWF2Wg+yYJ1AdP5Z8CA== dependencies: - deep-is "0.1.2" + deep-is "^0.1.3" + ip-regex "^2.1.0" + is-url "^1.2.2" isarray@1.0.0, isarray@~1.0.0: version "1.0.0" @@ -3619,6 +3967,13 @@ json3@^3.3.2: resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" integrity sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE= +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + json5@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" @@ -3633,11 +3988,6 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -3712,6 +4062,15 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +loader-utils@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -3720,6 +4079,14 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -3735,6 +4102,11 @@ lodash.bind@^4.1.4: resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= +lodash.chunk@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" + integrity sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw= + lodash.defaults@^4.0.1: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" @@ -3775,6 +4147,11 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.padstart@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" + integrity sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs= + lodash.pick@^4.2.1: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" @@ -3795,7 +4172,12 @@ lodash.some@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= -lodash.template@^4.5.0: +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + +lodash.template@^4.4.0, lodash.template@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== @@ -3815,11 +4197,16 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.17.10, lodash@^4.17.11, lodash@^4.3.0, lodash@~4.17.10: +lodash@^4.17.10, lodash@~4.17.10: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== +lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + logalot@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552" @@ -3883,6 +4270,14 @@ make-dir@^1.0.0, make-dir@^1.2.0: dependencies: pify "^3.0.0" +make-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -3969,7 +4364,12 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -micromatch@^3.1.10: +microevent.ts@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" + integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== + +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -4027,14 +4427,7 @@ mimic-response@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== -minimatch@3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - integrity sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q= - dependencies: - brace-expansion "^1.0.0" - -minimatch@^3.0.4, minimatch@~3.0.2: +minimatch@3.0.4, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -4051,6 +4444,21 @@ minimist@^1.1.3, minimist@^1.2.0: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + mixin-deep@^1.1.3: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" @@ -4067,7 +4475,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.x, mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -4089,6 +4497,11 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +nan@^2.12.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -4106,6 +4519,15 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +needle@^2.2.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" + integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -4121,12 +4543,21 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-releases@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.2.tgz#93c17fba5eec8650ad908de5433fa8763baebe4d" - integrity sha512-j1gEV/zX821yxdWp/1vBMN0pSUjuH9oGUdLCb4PfUko6ZW7KdRs3Z+QGGwDUhYtSpQvdVVyLd2V0YvLsmdg5jQ== +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" semver "^5.3.0" + tar "^4" node-releases@^1.1.25: version "1.1.25" @@ -4135,6 +4566,21 @@ node-releases@^1.1.25: dependencies: semver "^5.3.0" +node-releases@^1.1.29: + version "1.1.35" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.35.tgz#32a74a3cd497aa77f23d509f483475fd160e4c48" + integrity sha512-JGcM/wndCN/2elJlU0IGdVEJQQnJwsLbgPCFd2pY7V0mxf17bZ0Gb/lgOtL29ZQhvEX5shnVhxQyZz3ex94N8w== + dependencies: + semver "^6.3.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= + dependencies: + abbrev "1" + osenv "^0.1.4" + normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" @@ -4145,7 +4591,14 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^3.0.0: +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -4169,6 +4622,11 @@ normalize-url@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== +npm-bundled@^1.0.1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" + integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== + npm-conf@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" @@ -4177,6 +4635,14 @@ npm-conf@^1.1.0: config-chain "^1.1.11" pify "^3.0.0" +npm-packlist@^1.1.6: + version "1.4.6" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.6.tgz#53ba3ed11f8523079f1457376dd379ee4ea42ff4" + integrity sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -4184,6 +4650,16 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + nth-check@^1.0.2, nth-check@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" @@ -4220,6 +4696,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-keys@^1.0.11: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + object-keys@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" @@ -4232,6 +4713,16 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + object.getownpropertydescriptors@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" @@ -4288,10 +4779,10 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -opn@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.2.0.tgz#71fdf934d6827d676cecbea1531f95d354641225" - integrity sha512-Jd/GpzPyHF4P2/aNOVmS3lfMSWV9J7cOhCG1s08XCEAsPkB7lp6ddiU0J7XzyQRDUh8BqJ7PchfINjR8jyofRQ== +open@^6.3.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" + integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== dependencies: is-wsl "^1.1.0" @@ -4304,7 +4795,7 @@ optipng-bin@^5.0.0: bin-wrapper "^4.0.0" logalot "^2.0.0" -original@>=0.0.5: +original@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== @@ -4318,11 +4809,24 @@ os-filter-obj@^2.0.0: dependencies: arch "^2.1.0" -os-tmpdir@~1.0.2: +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + p-cancelable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" @@ -4364,6 +4868,13 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" +p-limit@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537" + integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg== + dependencies: + p-try "^2.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -4371,6 +4882,13 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + p-map-series@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" @@ -4407,6 +4925,11 @@ p-try@^1.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -4422,11 +4945,6 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= - parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -4539,21 +5057,28 @@ pirates@^4.0.0: dependencies: node-modules-regexp "^1.0.0" -pkg-dir@^2.0.0: +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +pkg-up@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= dependencies: find-up "^2.1.0" -portfinder@^1.0.17: - version "1.0.20" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.20.tgz#bea68632e54b2e13ab7b0c4775e9b41bf270e44a" - integrity sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw== +portfinder@^1.0.21: + version "1.0.25" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" + integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== dependencies: - async "^1.5.2" - debug "^2.2.0" - mkdirp "0.5.x" + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.1" posix-character-classes@^0.1.0: version "0.1.1" @@ -4831,10 +5356,10 @@ postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.1: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-value-parser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.0.tgz#99a983d365f7b2ad8d0f9b8c3094926eab4b936d" - integrity sha512-ESPktioptiSUchCKgggAkzdmkgzKfmp0EU8jXH+5kbIUB+unr0Y4CY9SRMvibuvYUBjNh1ACLbxqYNpdTQOteQ== +postcss-value-parser@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" + integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== postcss@^7.0.0, postcss@^7.0.17, postcss@^7.0.5: version "7.0.17" @@ -4854,6 +5379,15 @@ postcss@^7.0.1: source-map "^0.6.1" supports-color "^5.5.0" +postcss@^7.0.18: + version "7.0.18" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" + integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -4864,10 +5398,10 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prismjs@^1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.15.0.tgz#8801d332e472091ba8def94976c8877ad60398d9" - integrity sha512-Lf2JrFYx8FanHrjoV5oL8YHCclLQgbJcVZR+gikGGMqz6ub5QVWDTM6YIwm3BuPxM/LOV+rKns3LssXNLIf+DA== +prismjs@^1.17.1: + version "1.17.1" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.17.1.tgz#e669fcbd4cdd873c35102881c33b14d0d68519be" + integrity sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q== optionalDependencies: clipboard "^2.0.0" @@ -4930,11 +5464,6 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -q@0.9.7: - version "0.9.7" - resolved "https://registry.yarnpkg.com/q/-/q-0.9.7.tgz#4de2e6cb3b29088c9e4cbc03bf9d42fb96ce2f75" - integrity sha1-TeLmyzspCIyeTLwDv51C+5bOL3U= - q@^1.1.2: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -5001,54 +5530,70 @@ raw-body@~1.1.0: bytes "1" string_decoder "0.10" -react-dev-utils@^5.0.2: - version "5.0.3" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-5.0.3.tgz#92f97668f03deb09d7fa11ea288832a8c756e35e" - integrity sha512-Mvs6ofsc2xTjeZIrMaIfbXfsPVrbdVy/cVqq6SAacnqfMlcBpDuivhWZ1ODGeJ8HgmyWTLH971PYjj/EPCDVAw== +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: - address "1.0.3" - babel-code-frame "6.26.0" - chalk "1.1.3" - cross-spawn "5.1.0" + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-dev-utils@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-9.1.0.tgz#3ad2bb8848a32319d760d0a84c56c14bdaae5e81" + integrity sha512-X2KYF/lIGyGwP/F/oXgGDF24nxDA2KC4b7AFto+eqzc/t838gpSGiaU8trTqHXOohuLxxc5qi1eDzsl9ucPDpg== + dependencies: + "@babel/code-frame" "7.5.5" + address "1.1.2" + browserslist "4.7.0" + chalk "2.4.2" + cross-spawn "6.0.5" detect-port-alt "1.1.6" escape-string-regexp "1.0.5" - filesize "3.5.11" - global-modules "1.0.0" - gzip-size "3.0.0" - inquirer "3.3.0" - is-root "1.0.0" - opn "5.2.0" - react-error-overlay "^4.0.1" - recursive-readdir "2.2.1" - shell-quote "1.6.1" - sockjs-client "1.1.5" - strip-ansi "3.0.1" + filesize "3.6.1" + find-up "3.0.0" + fork-ts-checker-webpack-plugin "1.5.0" + global-modules "2.0.0" + globby "8.0.2" + gzip-size "5.1.1" + immer "1.10.0" + inquirer "6.5.0" + is-root "2.1.0" + loader-utils "1.2.3" + open "^6.3.0" + pkg-up "2.0.0" + react-error-overlay "^6.0.3" + recursive-readdir "2.2.2" + shell-quote "1.7.2" + sockjs-client "1.4.0" + strip-ansi "5.2.0" text-table "0.2.0" -react-dom@^16.5.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.7.0.tgz#a17b2a7ca89ee7390bc1ed5eb81783c7461748b8" - integrity sha512-D0Ufv1ExCAmF38P2Uh1lwpminZFRXEINJe53zRAbm4KPwSyd6DY/uDoS0Blj9jvPpn1+wivKpZYc8aAAN/nAkg== +react-dom@^16.8.4: + version "16.10.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.10.2.tgz#4840bce5409176bc3a1f2bd8cb10b92db452fda6" + integrity sha512-kWGDcH3ItJK4+6Pl9DZB16BXYAZyrYQItU4OMy0jAkv5aNqc+mAKb4TpFtAteI6TJZu+9ZlNhaeNQSVQDHJzkw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.12.0" + scheduler "^0.16.2" -react-error-overlay@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-4.0.1.tgz#417addb0814a90f3a7082eacba7cee588d00da89" - integrity sha512-xXUbDAZkU08aAkjtUvldqbvI04ogv+a1XdHxvYuHPYKIVk/42BIOD0zSKTHAWV4+gDy3yGm283z2072rA2gdtw== +react-error-overlay@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.3.tgz#c378c4b0a21e88b2e159a3e62b2f531fd63bf60d" + integrity sha512-bOUvMWFQVk5oz8Ded9Xb7WVdEi3QGLC8tH7HmYP0Fdp4Bn3qw0tRFmr5TW6mvahzvmrK4a6bqWGfCevBflP+Xw== -react@^16.5.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.7.0.tgz#b674ec396b0a5715873b350446f7ea0802ab6381" - integrity sha512-StCz3QY8lxTb5cl2HJxjwLFOXPIFQp+p+hxQfc8WE0QiLfCtIlKj8/+5tjjKm8uSTlAW+fCPaavGFS06V9Ar3A== +react@^16.8.4: + version "16.10.2" + resolved "https://registry.yarnpkg.com/react/-/react-16.10.2.tgz#a5ede5cdd5c536f745173c8da47bda64797a4cf0" + integrity sha512-MFVIq0DpIhrHFyqLU0S3+4dIcBhhOvBE8bJ/5kHPVOVaGdo0KuiQzpcjCPsf585WvhypqtrMILyoE2th6dT+Lw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.12.0" read-pkg-up@^1.0.1: version "1.0.1" @@ -5067,7 +5612,7 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -readable-stream@^2.0.0, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5: +readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== @@ -5089,10 +5634,19 @@ readable-stream@^3.0.6: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdirp@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.1.1.tgz#b158123ac343c8b0f31d65680269cc0fc1025db1" - integrity sha512-XXdSXZrQuvqoETj50+JAitxz1UPdt5dupjT6T5nVB+WvjMv2XKYj+s7hPeAVCXvmJrL36O4YYyWlIC3an2ePiQ== +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +readdirp@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.1.3.tgz#d6e011ed5b9240a92f08651eeb40f7942ceb6cc1" + integrity sha512-ZOsfTGkjO2kqeR5Mzr5RYDbTGYneSkdNKX2fOX2P5jF7vMrd/GNnIAUtDldeHHumHUCQ3V05YfWUdxMPAsRu9Q== dependencies: picomatch "^2.0.4" @@ -5103,12 +5657,12 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -recursive-readdir@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.1.tgz#90ef231d0778c5ce093c9a48d74e5c5422d13a99" - integrity sha1-kO8jHQd4xc4JPJpI105cVCLROpk= +recursive-readdir@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" + integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== dependencies: - minimatch "3.0.3" + minimatch "3.0.4" redent@^1.0.0: version "1.0.0" @@ -5118,10 +5672,10 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" -regenerate-unicode-properties@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" - integrity sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw== +regenerate-unicode-properties@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e" + integrity sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA== dependencies: regenerate "^1.4.0" @@ -5130,15 +5684,15 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== -regenerator-runtime@^0.12.0: - version "0.12.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" - integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== - -regenerator-transform@^0.13.3: +regenerator-runtime@^0.13.2: version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" - integrity sha512-5ipTrZFSq5vU2YoGoww4uaRVAK4wyYC4TSICibbfEPOruUu8FFP7ErV0BjmbIOEpn3O/k9na9UEdYR/3m7N6uA== + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" + integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== + +regenerator-transform@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb" + integrity sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ== dependencies: private "^0.1.6" @@ -5150,17 +5704,17 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpu-core@^4.1.3, regexpu-core@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32" - integrity sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA== +regexpu-core@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" + integrity sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg== dependencies: regenerate "^1.4.0" - regenerate-unicode-properties "^7.0.0" + regenerate-unicode-properties "^8.1.0" regjsgen "^0.5.0" regjsparser "^0.6.0" unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.0.2" + unicode-match-property-value-ecmascript "^1.1.0" regjsgen@^0.5.0: version "0.5.0" @@ -5182,6 +5736,19 @@ remarkable@^1.7.1: argparse "~0.1.15" autolinker "~0.15.0" +remarkable@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + repeat-element@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" @@ -5204,7 +5771,7 @@ replace-ext@^1.0.0: resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= -request@^2.53.0, request@^2.87.0: +request@^2.53.0, request@^2.88.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== @@ -5235,14 +5802,6 @@ requires-port@^1.0.0: resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= -resolve-dir@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" - integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -5297,6 +5856,13 @@ rimraf@^2.5.4: dependencies: glob "^7.0.5" +rimraf@^2.6.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -5304,17 +5870,12 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - integrity sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= +rxjs@^6.4.0: + version "6.5.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" + integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA== dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= + tslib "^1.9.0" safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" @@ -5338,15 +5899,15 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sax@~1.2.4: +sax@^1.2.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.12.0.tgz#8ab17699939c0aedc5a196a657743c496538647b" - integrity sha512-t7MBR28Akcp4Jm+QoR63XgAi9YgCUmgvDHqf5otgAj4QvdoBE4ImCX0ffehefePPG+aitiYHp0g/mW6s4Tp+dw== +scheduler@^0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.16.2.tgz#f74cd9d33eff6fc554edfb79864868e4819132c1" + integrity sha512-BqYVWqwz6s1wZMhjFvLfVR5WXP7ZY32M/wYPo04CcuPM7XZEbV2TBNW7Z0UkguPTl0dWMA59VbNXxK6q+pHItg== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -5385,6 +5946,11 @@ semver@^5.6.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -5414,6 +5980,11 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + set-getter@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" @@ -5448,15 +6019,10 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= -shell-quote@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" - integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c= - dependencies: - array-filter "~0.0.0" - array-map "~0.0.0" - array-reduce "~0.0.0" - jsonify "~0.0.0" +shell-quote@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" + integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== shelljs@^0.8.3: version "0.8.3" @@ -5479,13 +6045,15 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sitemap@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-1.13.0.tgz#569cbe2180202926a62a266cd3de09c9ceb43f83" - integrity sha1-Vpy+IYAgKSamKiZs094Jyc60P4M= +sitemap@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-3.2.2.tgz#3f77c358fa97b555c879e457098e39910095c62b" + integrity sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg== dependencies: - underscore "^1.7.0" - url-join "^1.1.0" + lodash.chunk "^4.2.0" + lodash.padstart "^4.6.1" + whatwg-url "^7.0.0" + xmlbuilder "^13.0.0" slash@^1.0.0: version "1.0.0" @@ -5522,17 +6090,17 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -sockjs-client@1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.5.tgz#1bb7c0f7222c40f42adf14f4442cbd1269771a83" - integrity sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM= +sockjs-client@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" + integrity sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g== dependencies: - debug "^2.6.6" - eventsource "0.1.6" - faye-websocket "~0.11.0" - inherits "^2.0.1" + debug "^3.2.5" + eventsource "^1.0.7" + faye-websocket "~0.11.1" + inherits "^2.0.3" json3 "^3.3.2" - url-parse "^1.1.8" + url-parse "^1.4.3" sort-keys-length@^1.0.0: version "1.0.1" @@ -5679,7 +6247,16 @@ string-template@~0.2.1: resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= -string-width@^2.1.0: +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -5706,7 +6283,14 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@3.0.1, strip-ansi@^3.0.0: +strip-ansi@5.2.0, strip-ansi@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= @@ -5751,6 +6335,11 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + strip-outer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" @@ -5758,6 +6347,11 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" +striptags@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.1.1.tgz#c8c3e7fdd6fb4bb3a32a3b752e5b5e3e38093ebd" + integrity sha1-yMPn/db7S7OjKjt1LltePjgJPr0= + stylehacks@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" @@ -5826,6 +6420,11 @@ svgo@^1.0.5: unquote "~1.1.1" util.promisify "~1.0.0" +tapable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + tar-stream@^1.5.2: version "1.6.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" @@ -5839,14 +6438,26 @@ tar-stream@^1.5.2: to-buffer "^1.1.1" xtend "^4.0.0" -tcp-port-used@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/tcp-port-used/-/tcp-port-used-0.1.2.tgz#9450e8768c83b416fd4d1a6a9449eeccbf496c29" - integrity sha1-lFDodoyDtBb9TRpqlEnuzL9JbCk= +tar@^4: + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== dependencies: - debug "0.7.4" - is2 "0.0.9" - q "0.9.7" + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.8.6" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + +tcp-port-used@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tcp-port-used/-/tcp-port-used-1.0.1.tgz#46061078e2d38c73979a2c2c12b5a674e6689d70" + integrity sha512-rwi5xJeU6utXoEIiMvVBMc9eJ2/ofzB+7nLOdnZuFTmNCLqRiQh2sMG9MqCxHU/69VC/Fwp5dV9306Qd54ll1Q== + dependencies: + debug "4.1.0" + is2 "2.0.1" temp-dir@^1.0.0: version "1.0.0" @@ -5866,6 +6477,14 @@ text-table@0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= +through2@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + through@^2.3.6, through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -5965,6 +6584,13 @@ tough-cookie@~2.4.3: psl "^1.1.24" punycode "^1.4.1" +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + dependencies: + punycode "^2.1.0" + tree-node-cli@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/tree-node-cli/-/tree-node-cli-1.2.5.tgz#afd75437976bbf2cc0c52b9949798e7530e8fd8c" @@ -5989,14 +6615,19 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= -truncate-html@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/truncate-html/-/truncate-html-1.0.1.tgz#6f1d03cbb2308bfda266f9ce8f25e62c66919d4f" - integrity sha512-4Yw02HZAhGTGZsW2aNB7GtoF/SG4yPVlS4V42tehY1ZorZhIIZpdUuocdGB7W30J8WHzgOYmyhBzMTx/362Cew== +truncate-html@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/truncate-html/-/truncate-html-1.0.3.tgz#0166dfc7890626130c2e4174c6b73d4d63993e5f" + integrity sha512-1o1prdRv+iehXcGwn29YgXU17DotHkr+OK3ijVEG7FGMwHNG9RyobXwimw6djDvbIc24rhmz3tjNNvNESjkNkQ== dependencies: "@types/cheerio" "^0.22.8" cheerio "0.22.0" +tslib@^1.9.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" + integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -6035,11 +6666,6 @@ underscore.string@~2.4.0: resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-2.4.0.tgz#8cdd8fbac4e2d2ea1e7e2e8097c42f442280f85b" integrity sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs= -underscore@^1.7.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== - underscore@~1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209" @@ -6058,10 +6684,10 @@ unicode-match-property-ecmascript@^1.0.4: unicode-canonical-property-names-ecmascript "^1.0.4" unicode-property-aliases-ecmascript "^1.0.4" -unicode-match-property-value-ecmascript@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" - integrity sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ== +unicode-match-property-value-ecmascript@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" + integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== unicode-property-aliases-ecmascript@^1.0.4: version "1.0.4" @@ -6111,6 +6737,11 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -6123,11 +6754,6 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-join@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/url-join/-/url-join-1.1.0.tgz#741c6c2f4596c4830d6718460920d0c92202dc78" - integrity sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg= - url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" @@ -6142,7 +6768,7 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-parse@^1.1.8, url-parse@^1.4.3: +url-parse@^1.4.3: version "1.4.4" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.4.tgz#cac1556e95faa0303691fec5cf9d5a1bc34648f8" integrity sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg== @@ -6210,6 +6836,11 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + websocket-driver@>=0.5.1: version "0.7.0" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" @@ -6223,18 +6854,41 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== -which@^1.2.14, which@^1.2.9: +whatwg-url@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" + integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= +worker-rpc@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/worker-rpc/-/worker-rpc-0.1.1.tgz#cb565bd6d7071a8f16660686051e969ad32f54d5" + integrity sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg== + dependencies: + microevent.ts "~0.1.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -6245,16 +6899,31 @@ xml@^1.0.1: resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= +xmlbuilder@^13.0.0: + version "13.0.2" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7" + integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ== + xtend@^4.0.0, xtend@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= +xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= +yallist@^3.0.0, yallist@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + yamljs@^0.2.1: version "0.2.10" resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.2.10.tgz#481cc7c25ca73af59f591f0c96e3ce56c757a40f"